]> Gentwo Git Trees - linux/.git/commit
smb: client: allocate enough space for MR WRs and ib_drain_qp()
authorStefan Metzmacher <metze@samba.org>
Thu, 16 Oct 2025 10:54:21 +0000 (12:54 +0200)
committerSteve French <stfrench@microsoft.com>
Mon, 20 Oct 2025 01:59:38 +0000 (20:59 -0500)
commite607ef686ab95fbcb0dfd16f49aea7918be626e1
treee41e61fc9d8e1c4822aff36b8b63ec6de30dab39
parent211ddde0823f1442e4ad052a2f30f050145ccada
smb: client: allocate enough space for MR WRs and ib_drain_qp()

The IB_WR_REG_MR and IB_WR_LOCAL_INV operations for smbdirect_mr_io
structures should never fail because the submission or completion queues
are too small. So we allocate more send_wr depending on the (local) max
number of MRs.

While there also add additional space for ib_drain_qp().

This should make sure ib_post_send() will never fail
because the submission queue is full.

Fixes: f198186aa9bb ("CIFS: SMBD: Establish SMB Direct connection")
Fixes: cc55f65dd352 ("smb: client: make use of common smbdirect_socket_parameters")
Cc: stable@vger.kernel.org
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smbdirect.c