]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb: client: make use of SMBDIRECT_RECV_IO_MAX_SGE
authorStefan Metzmacher <metze@samba.org>
Wed, 6 Aug 2025 17:35:49 +0000 (19:35 +0200)
committerSteve French <stfrench@microsoft.com>
Wed, 6 Aug 2025 20:18:58 +0000 (15:18 -0500)
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
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
fs/smb/client/smbdirect.h

index 5217a8122a9445ddb24bf99a5a490c5a1b2b13ab..5d1fa83583f607da4201a1ce2aff263dd49c8083 100644 (file)
@@ -1563,7 +1563,7 @@ static struct smbd_connection *_smbd_get_connection(
        sp->keepalive_interval_msec = smbd_keep_alive_interval * 1000;
 
        if (sc->ib.dev->attrs.max_send_sge < SMBDIRECT_MAX_SEND_SGE ||
-           sc->ib.dev->attrs.max_recv_sge < SMBDIRECT_MAX_RECV_SGE) {
+           sc->ib.dev->attrs.max_recv_sge < SMBDIRECT_RECV_IO_MAX_SGE) {
                log_rdma_event(ERR,
                        "device %.*s max_send_sge/max_recv_sge = %d/%d too small\n",
                        IB_DEVICE_NAME_MAX,
@@ -1595,7 +1595,7 @@ static struct smbd_connection *_smbd_get_connection(
        qp_attr.cap.max_send_wr = sp->send_credit_target;
        qp_attr.cap.max_recv_wr = sp->recv_credit_max;
        qp_attr.cap.max_send_sge = SMBDIRECT_MAX_SEND_SGE;
-       qp_attr.cap.max_recv_sge = SMBDIRECT_MAX_RECV_SGE;
+       qp_attr.cap.max_recv_sge = SMBDIRECT_RECV_IO_MAX_SGE;
        qp_attr.cap.max_inline_data = 0;
        qp_attr.sq_sig_type = IB_SIGNAL_REQ_WR;
        qp_attr.qp_type = IB_QPT_RC;
index 0463fde1bf2647ec6b67d8acabd6050265a873b6..81b55c0de55214c218f61dbe853cf4eb5f79c5dd 100644 (file)
@@ -139,9 +139,6 @@ struct smbd_request {
        u8 packet[];
 };
 
-/* Maximum number of SGEs used by smbdirect.c in any receive work request */
-#define SMBDIRECT_MAX_RECV_SGE 1
-
 /* Create a SMBDirect session */
 struct smbd_connection *smbd_get_connection(
        struct TCP_Server_Info *server, struct sockaddr *dstaddr);