Skip to content

Commit 0350d7a

Browse files
TTalpeysmfrench
authored andcommitted
Fix formatting of client smbdirect RDMA logging
Make the debug logging more consistent in formatting of addresses, lengths, and bitfields. Acked-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Tom Talpey <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent adeb964 commit 0350d7a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

fs/cifs/smbdirect.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static void send_done(struct ib_cq *cq, struct ib_wc *wc)
270270
struct smbd_request *request =
271271
container_of(wc->wr_cqe, struct smbd_request, cqe);
272272

273-
log_rdma_send(INFO, "smbd_request %p completed wc->status=%d\n",
273+
log_rdma_send(INFO, "smbd_request 0x%p completed wc->status=%d\n",
274274
request, wc->status);
275275

276276
if (wc->status != IB_WC_SUCCESS || wc->opcode != IB_WC_SEND) {
@@ -448,7 +448,7 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc)
448448
struct smbd_connection *info = response->info;
449449
int data_length = 0;
450450

451-
log_rdma_recv(INFO, "response=%p type=%d wc status=%d wc opcode %d byte_len=%d pkey_index=%x\n",
451+
log_rdma_recv(INFO, "response=0x%p type=%d wc status=%d wc opcode %d byte_len=%d pkey_index=%u\n",
452452
response, response->type, wc->status, wc->opcode,
453453
wc->byte_len, wc->pkey_index);
454454

@@ -723,7 +723,7 @@ static int smbd_post_send_negotiate_req(struct smbd_connection *info)
723723
send_wr.opcode = IB_WR_SEND;
724724
send_wr.send_flags = IB_SEND_SIGNALED;
725725

726-
log_rdma_send(INFO, "sge addr=%llx length=%x lkey=%x\n",
726+
log_rdma_send(INFO, "sge addr=0x%llx length=%u lkey=0x%x\n",
727727
request->sge[0].addr,
728728
request->sge[0].length, request->sge[0].lkey);
729729

@@ -792,7 +792,7 @@ static int smbd_post_send(struct smbd_connection *info,
792792

793793
for (i = 0; i < request->num_sge; i++) {
794794
log_rdma_send(INFO,
795-
"rdma_request sge[%d] addr=%llu length=%u\n",
795+
"rdma_request sge[%d] addr=0x%llx length=%u\n",
796796
i, request->sge[i].addr, request->sge[i].length);
797797
ib_dma_sync_single_for_device(
798798
info->id->device,
@@ -1079,7 +1079,7 @@ static int smbd_negotiate(struct smbd_connection *info)
10791079

10801080
response->type = SMBD_NEGOTIATE_RESP;
10811081
rc = smbd_post_recv(info, response);
1082-
log_rdma_event(INFO, "smbd_post_recv rc=%d iov.addr=%llx iov.length=%x iov.lkey=%x\n",
1082+
log_rdma_event(INFO, "smbd_post_recv rc=%d iov.addr=0x%llx iov.length=%u iov.lkey=0x%x\n",
10831083
rc, response->sge.addr,
10841084
response->sge.length, response->sge.lkey);
10851085
if (rc)
@@ -1539,7 +1539,7 @@ static struct smbd_connection *_smbd_get_connection(
15391539

15401540
if (smbd_send_credit_target > info->id->device->attrs.max_cqe ||
15411541
smbd_send_credit_target > info->id->device->attrs.max_qp_wr) {
1542-
log_rdma_event(ERR, "consider lowering send_credit_target = %d. Possible CQE overrun, device reporting max_cpe %d max_qp_wr %d\n",
1542+
log_rdma_event(ERR, "consider lowering send_credit_target = %d. Possible CQE overrun, device reporting max_cqe %d max_qp_wr %d\n",
15431543
smbd_send_credit_target,
15441544
info->id->device->attrs.max_cqe,
15451545
info->id->device->attrs.max_qp_wr);
@@ -1548,7 +1548,7 @@ static struct smbd_connection *_smbd_get_connection(
15481548

15491549
if (smbd_receive_credit_max > info->id->device->attrs.max_cqe ||
15501550
smbd_receive_credit_max > info->id->device->attrs.max_qp_wr) {
1551-
log_rdma_event(ERR, "consider lowering receive_credit_max = %d. Possible CQE overrun, device reporting max_cpe %d max_qp_wr %d\n",
1551+
log_rdma_event(ERR, "consider lowering receive_credit_max = %d. Possible CQE overrun, device reporting max_cqe %d max_qp_wr %d\n",
15521552
smbd_receive_credit_max,
15531553
info->id->device->attrs.max_cqe,
15541554
info->id->device->attrs.max_qp_wr);

0 commit comments

Comments
 (0)