Skip to content

Commit 8b5964a

Browse files
metze-sambasmfrench
authored andcommitted
smb: client: make use of SMBDIRECT_RECV_IO_MAX_SGE
Cc: Steve French <[email protected]> Cc: Tom Talpey <[email protected]> Cc: Long Li <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Stefan Metzmacher <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 3515aa6 commit 8b5964a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

fs/smb/client/smbdirect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,7 @@ static struct smbd_connection *_smbd_get_connection(
15631563
sp->keepalive_interval_msec = smbd_keep_alive_interval * 1000;
15641564

15651565
if (sc->ib.dev->attrs.max_send_sge < SMBDIRECT_MAX_SEND_SGE ||
1566-
sc->ib.dev->attrs.max_recv_sge < SMBDIRECT_MAX_RECV_SGE) {
1566+
sc->ib.dev->attrs.max_recv_sge < SMBDIRECT_RECV_IO_MAX_SGE) {
15671567
log_rdma_event(ERR,
15681568
"device %.*s max_send_sge/max_recv_sge = %d/%d too small\n",
15691569
IB_DEVICE_NAME_MAX,
@@ -1595,7 +1595,7 @@ static struct smbd_connection *_smbd_get_connection(
15951595
qp_attr.cap.max_send_wr = sp->send_credit_target;
15961596
qp_attr.cap.max_recv_wr = sp->recv_credit_max;
15971597
qp_attr.cap.max_send_sge = SMBDIRECT_MAX_SEND_SGE;
1598-
qp_attr.cap.max_recv_sge = SMBDIRECT_MAX_RECV_SGE;
1598+
qp_attr.cap.max_recv_sge = SMBDIRECT_RECV_IO_MAX_SGE;
15991599
qp_attr.cap.max_inline_data = 0;
16001600
qp_attr.sq_sig_type = IB_SIGNAL_REQ_WR;
16011601
qp_attr.qp_type = IB_QPT_RC;

fs/smb/client/smbdirect.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@ struct smbd_request {
139139
u8 packet[];
140140
};
141141

142-
/* Maximum number of SGEs used by smbdirect.c in any receive work request */
143-
#define SMBDIRECT_MAX_RECV_SGE 1
144-
145142
/* Create a SMBDirect session */
146143
struct smbd_connection *smbd_get_connection(
147144
struct TCP_Server_Info *server, struct sockaddr *dstaddr);

0 commit comments

Comments
 (0)