netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH  1/1] net/mlx5: add dynamic logging for mlx5_dump_err_cqe
@ 2022-10-12 23:52 Aru Kolappan
  2022-10-13 10:43 ` Leon Romanovsky
  0 siblings, 1 reply; 6+ messages in thread
From: Aru Kolappan @ 2022-10-12 23:52 UTC (permalink / raw)
  To: leon, jgg, saeedm, linux-rdma, linux-kernel, netdev
  Cc: manjunath.b.patil, rama.nichanamatlu, aru.kolappan

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-20 11:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-12 23:52 [PATCH 1/1] net/mlx5: add dynamic logging for mlx5_dump_err_cqe Aru Kolappan
2022-10-13 10:43 ` 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

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).