Whamcloud - gitweb
LU-15851 gnilnd: Remove invalid ASSERT from kgnilnd_send() 20/47320/3
authorChris Horn <chris.horn@hpe.com>
Wed, 20 Apr 2022 21:45:35 +0000 (16:45 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 11 Jun 2022 06:01:28 +0000 (06:01 +0000)
commit0703fa84c0f2dc69025a0849ba13f0d0d1a97738
tree97ebb4cda0b6c6a9ce710b529a61f5871a6ac6f2
parent597665de6ee4e77b259a82f126d95cb2d60bb260
LU-15851 gnilnd: Remove invalid ASSERT from kgnilnd_send()

An LNet user can allocate a large contiguous MD. That MD can have
LNET_MAX_IOV pages which causes some LNDs to assert on either niov
argument passed to lnd_recv() or the value stored in
lnet_msg::msg_niov. This is true even in cases where the actual
transfer size is <= LNET_MTU and will not exceed limits in the
LNDs.

Remove the assert on msg_niov from kgnilnd_send(). kgnilnd will
return an error to upper layer if its unable to set up a buffer for
the send.

Move the ASSERT in kgnilnd_setup_immediate_buffer() so that we only
check niov after accounting for offset.

HPE-bug-id: LUS-10915
Test-Parameters: trivial
Fixes: 857f11169f ("LU-13004 lnet: always put a page list into struct lnet_libmd")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ide39f0745686784b1a2402c578bd472196f372b8
Reviewed-on: https://review.whamcloud.com/47320
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/gnilnd/gnilnd_cb.c