From: Tom Talpey <tom@talpey.com>
Date: Fri, 23 Sep 2022 21:54:00 +0000
Subject: [PATCH] Fix formatting of client smbdirect RDMA logging
Git-commit: 0350d7a39c7f8175fca001b6d6a39481da5ef22c
References: bsc#1190317
Patch-mainline: v6.1-rc1
Make the debug logging more consistent in formatting of addresses,
lengths, and bitfields.
Acked-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Tom Talpey <tom@talpey.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Acked-by: Enzo Matsumiya <ematsumiya@suse.de>
---
fs/cifs/smbdirect.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- a/fs/cifs/smbdirect.c
+++ b/fs/cifs/smbdirect.c
@@ -278,7 +278,7 @@ static void send_done(struct ib_cq *cq,
struct smbd_request *request =
container_of(wc->wr_cqe, struct smbd_request, cqe);
- log_rdma_send(INFO, "smbd_request %p completed wc->status=%d\n",
+ log_rdma_send(INFO, "smbd_request 0x%p completed wc->status=%d\n",
request, wc->status);
if (wc->status != IB_WC_SUCCESS || wc->opcode != IB_WC_SEND) {
@@ -459,8 +459,8 @@ static void recv_done(struct ib_cq *cq,
struct smbd_connection *info = response->info;
int data_length = 0;
- log_rdma_recv(INFO, "response=%p type=%d wc status=%d wc opcode %d "
- "byte_len=%d pkey_index=%x\n",
+ log_rdma_recv(INFO, "response=0x%p type=%d wc status=%d wc opcode %d "
+ "byte_len=%d pkey_index=%u\n",
response, response->type, wc->status, wc->opcode,
wc->byte_len, wc->pkey_index);
@@ -730,7 +730,7 @@ static int smbd_post_send_negotiate_req(
send_wr.opcode = IB_WR_SEND;
send_wr.send_flags = IB_SEND_SIGNALED;
- log_rdma_send(INFO, "sge addr=%llx length=%x lkey=%x\n",
+ log_rdma_send(INFO, "sge addr=0x%llx length=%u lkey=0x%x\n",
request->sge[0].addr,
request->sge[0].length, request->sge[0].lkey);
@@ -799,7 +799,7 @@ static int smbd_post_send(struct smbd_co
for (i = 0; i < request->num_sge; i++) {
log_rdma_send(INFO,
- "rdma_request sge[%d] addr=%llu length=%u\n",
+ "rdma_request sge[%d] addr=0x%llx length=%u\n",
i, request->sge[i].addr, request->sge[i].length);
ib_dma_sync_single_for_device(
info->id->device,
@@ -1088,8 +1088,8 @@ static int smbd_negotiate(struct smbd_co
response->type = SMBD_NEGOTIATE_RESP;
rc = smbd_post_recv(info, response);
log_rdma_event(INFO,
- "smbd_post_recv rc=%d iov.addr=%llx iov.length=%x "
- "iov.lkey=%x\n",
+ "smbd_post_recv rc=%d iov.addr=0x%llx iov.length=%u "
+ "iov.lkey=0x%x\n",
rc, response->sge.addr,
response->sge.length, response->sge.lkey);
if (rc)
@@ -1552,7 +1552,7 @@ static struct smbd_connection *_smbd_get
log_rdma_event(ERR,
"consider lowering send_credit_target = %d. "
"Possible CQE overrun, device "
- "reporting max_cpe %d max_qp_wr %d\n",
+ "reporting max_cqe %d max_qp_wr %d\n",
smbd_send_credit_target,
info->id->device->attrs.max_cqe,
info->id->device->attrs.max_qp_wr);
@@ -1564,7 +1564,7 @@ static struct smbd_connection *_smbd_get
log_rdma_event(ERR,
"consider lowering receive_credit_max = %d. "
"Possible CQE overrun, device "
- "reporting max_cpe %d max_qp_wr %d\n",
+ "reporting max_cqe %d max_qp_wr %d\n",
smbd_receive_credit_max,
info->id->device->attrs.max_cqe,
info->id->device->attrs.max_qp_wr);