netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aru Kolappan <aru.kolappan@oracle.com>
To: leon@kernel.org, jgg@ziepe.ca, saeedm@nvidia.com,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Cc: manjunath.b.patil@oracle.com, rama.nichanamatlu@oracle.com,
	aru.kolappan@oracle.com
Subject: [PATCH  1/1] net/mlx5: add dynamic logging for mlx5_dump_err_cqe
Date: Wed, 12 Oct 2022 16:52:52 -0700	[thread overview]
Message-ID: <1665618772-11048-1-git-send-email-aru.kolappan@oracle.com> (raw)

From: Arumugam Kolappan <aru.kolappan@oracle.com>

Presently, mlx5 driver dumps error CQE by default for few syndromes. Some
syndromes are expected due to application behavior[Ex: REMOTE_ACCESS_ERR
for revoking rkey before RDMA operation is completed]. There is no option
to disable the log if the application decided to do so. This patch
converts the log into dynamic print and by default, this debug print is
disabled. Users can enable/disable this logging at runtime if needed.

Suggested-by: Manjunath Patil <manjunath.b.patil@oracle.com>
Signed-off-by: Arumugam Kolappan <aru.kolappan@oracle.com>
---
 drivers/infiniband/hw/mlx5/cq.c | 2 +-
 include/linux/mlx5/cq.h         | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c
index be189e0..890cdc3 100644
--- a/drivers/infiniband/hw/mlx5/cq.c
+++ b/drivers/infiniband/hw/mlx5/cq.c
@@ -269,7 +269,7 @@ static void handle_responder(struct ib_wc *wc, struct mlx5_cqe64 *cqe,
 
 static void dump_cqe(struct mlx5_ib_dev *dev, struct mlx5_err_cqe *cqe)
 {
-	mlx5_ib_warn(dev, "dump error cqe\n");
+	mlx5_ib_dbg(dev, "dump error cqe\n");
 	mlx5_dump_err_cqe(dev->mdev, cqe);
 }
 
diff --git a/include/linux/mlx5/cq.h b/include/linux/mlx5/cq.h
index cb15308..2eae88a 100644
--- a/include/linux/mlx5/cq.h
+++ b/include/linux/mlx5/cq.h
@@ -198,8 +198,8 @@ int mlx5_core_modify_cq_moderation(struct mlx5_core_dev *dev,
 static inline void mlx5_dump_err_cqe(struct mlx5_core_dev *dev,
 				     struct mlx5_err_cqe *err_cqe)
 {
-	print_hex_dump(KERN_WARNING, "", DUMP_PREFIX_OFFSET, 16, 1, err_cqe,
-		       sizeof(*err_cqe), false);
+	print_hex_dump_debug("", DUMP_PREFIX_OFFSET, 16, 1, err_cqe,
+			     sizeof(*err_cqe), false);
 }
 int mlx5_debug_cq_add(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq);
 void mlx5_debug_cq_remove(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq);
-- 
1.8.3.1


             reply	other threads:[~2022-10-12 23:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 23:52 Aru Kolappan [this message]
2022-10-13 10:43 ` [PATCH 1/1] net/mlx5: add dynamic logging for mlx5_dump_err_cqe Leon Romanovsky
2022-10-14 19:12   ` Aru
2022-10-18  7:47     ` Leon Romanovsky
2022-10-20  8:24       ` Aru
2022-10-20 11:54         ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1665618772-11048-1-git-send-email-aru.kolappan@oracle.com \
    --to=aru.kolappan@oracle.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=manjunath.b.patil@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=rama.nichanamatlu@oracle.com \
    --cc=saeedm@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).