Skip to content

Commit ff30b89

Browse files
longlimsftsmfrench
authored andcommitted
cifs: smbd: Dump SMB packet when configured
When sending through SMB Direct, also dump the packet in SMB send path. Also fixed a typo in debug message. Signed-off-by: Long Li <longli@microsoft.com> Cc: stable@vger.kernel.org Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
1 parent ab60ee7 commit ff30b89

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fs/cifs/smbdirect.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ static int smbd_post_send(struct smbd_connection *info,
10281028
for (i = 0; i < request->num_sge; i++) {
10291029
log_rdma_send(INFO,
10301030
"rdma_request sge[%d] addr=%llu length=%u\n",
1031-
i, request->sge[0].addr, request->sge[0].length);
1031+
i, request->sge[i].addr, request->sge[i].length);
10321032
ib_dma_sync_single_for_device(
10331033
info->id->device,
10341034
request->sge[i].addr,
@@ -2139,6 +2139,10 @@ int smbd_send(struct smbd_connection *info, struct smb_rqst *rqst)
21392139
goto done;
21402140
}
21412141

2142+
cifs_dbg(FYI, "Sending smb (RDMA): smb_len=%u\n", buflen);
2143+
for (i = 0; i < rqst->rq_nvec-1; i++)
2144+
dump_smb(iov[i].iov_base, iov[i].iov_len);
2145+
21422146
remaining_data_length = buflen;
21432147

21442148
log_write(INFO, "rqst->rq_nvec=%d rqst->rq_npages=%d rq_pagesz=%d "

0 commit comments

Comments
 (0)