Fix formatting of client smbdirect RDMA logging
authorTom Talpey <tom@talpey.com>
Fri, 23 Sep 2022 21:54:00 +0000 (21:54 +0000)
committerSteve French <stfrench@microsoft.com>
Wed, 5 Oct 2022 06:31:04 +0000 (01:31 -0500)
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>
fs/cifs/smbdirect.c

index 6ac424d26fe6d8d95104dbf89d99bd035c4cb8a4..90789aaa6567e67c67476a99f6b9c7580be87af1 100644 (file)
@@ -270,7 +270,7 @@ static void send_done(struct ib_cq *cq, struct ib_wc *wc)
        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) {
@@ -448,7 +448,7 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc)
        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);
 
@@ -723,7 +723,7 @@ static int smbd_post_send_negotiate_req(struct smbd_connection *info)
        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);
 
@@ -792,7 +792,7 @@ static int smbd_post_send(struct smbd_connection *info,
 
        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,
@@ -1079,7 +1079,7 @@ static int smbd_negotiate(struct smbd_connection *info)
 
        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",
+       log_rdma_event(INFO, "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)
@@ -1539,7 +1539,7 @@ static struct smbd_connection *_smbd_get_connection(
 
        if (smbd_send_credit_target > info->id->device->attrs.max_cqe ||
            smbd_send_credit_target > info->id->device->attrs.max_qp_wr) {
-               log_rdma_event(ERR, "consider lowering send_credit_target = %d. Possible CQE overrun, device reporting max_cpe %d max_qp_wr %d\n",
+               log_rdma_event(ERR, "consider lowering send_credit_target = %d. Possible CQE overrun, device 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);
@@ -1548,7 +1548,7 @@ static struct smbd_connection *_smbd_get_connection(
 
        if (smbd_receive_credit_max > info->id->device->attrs.max_cqe ||
            smbd_receive_credit_max > info->id->device->attrs.max_qp_wr) {
-               log_rdma_event(ERR, "consider lowering receive_credit_max = %d. Possible CQE overrun, device reporting max_cpe %d max_qp_wr %d\n",
+               log_rdma_event(ERR, "consider lowering receive_credit_max = %d. Possible CQE overrun, device 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);