netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Subbaraya Sundeep <sbhatta@marvell.com>
To: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<horms@kernel.org>, <gakula@marvell.com>, <hkelam@marvell.com>,
	<sgoutham@marvell.com>, <lcherian@marvell.com>,
	<bbhushan2@marvell.com>, <jerinj@marvell.com>
Cc: <netdev@vger.kernel.org>, Subbaraya Sundeep <sbhatta@marvell.com>
Subject: [net-next PATCH 1/4] octeontx2-af: convert dev_dbg to tracepoint in mbox
Date: Mon, 12 May 2025 14:11:51 +0530	[thread overview]
Message-ID: <1747039315-3372-2-git-send-email-sbhatta@marvell.com> (raw)
In-Reply-To: <1747039315-3372-1-git-send-email-sbhatta@marvell.com>

Use tracepoint instead of dev_dbg since the entire
mailbox code uses tracepoints for debugging.

Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/mbox.c      |  3 +--
 drivers/net/ethernet/marvell/octeontx2/af/rvu_trace.h | 11 +++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mbox.c b/drivers/net/ethernet/marvell/octeontx2/af/mbox.c
index 1e5aa53..5547d20 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mbox.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mbox.c
@@ -188,14 +188,13 @@ int otx2_mbox_wait_for_rsp(struct otx2_mbox *mbox, int devid)
 {
 	unsigned long timeout = jiffies + msecs_to_jiffies(MBOX_RSP_TIMEOUT);
 	struct otx2_mbox_dev *mdev = &mbox->dev[devid];
-	struct device *sender = &mbox->pdev->dev;
 
 	while (!time_after(jiffies, timeout)) {
 		if (mdev->num_msgs == mdev->msgs_acked)
 			return 0;
 		usleep_range(800, 1000);
 	}
-	dev_dbg(sender, "timed out while waiting for rsp\n");
+	trace_otx2_msg_wait_rsp(mbox->pdev);
 	return -EIO;
 }
 EXPORT_SYMBOL(otx2_mbox_wait_for_rsp);
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_trace.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu_trace.h
index 5704520f..f3b28c1 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_trace.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_trace.h
@@ -95,6 +95,17 @@ TRACE_EVENT(otx2_msg_process,
 		      otx2_mbox_id2name(__entry->id), __entry->err)
 );
 
+TRACE_EVENT(otx2_msg_wait_rsp,
+	    TP_PROTO(const struct pci_dev *pdev),
+	    TP_ARGS(pdev),
+	    TP_STRUCT__entry(__string(dev, pci_name(pdev))
+	    ),
+	    TP_fast_assign(__assign_str(dev, pci_name(pdev))
+	    ),
+	    TP_printk("[%s] timed out while waiting for response\n",
+		      __get_str(dev))
+);
+
 #endif /* __RVU_TRACE_H */
 
 #undef TRACE_INCLUDE_PATH
-- 
2.7.4


  reply	other threads:[~2025-05-12  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12  8:41 [net-next PATCH 0/4] octeontx2: Improve mailbox tracing Subbaraya Sundeep
2025-05-12  8:41 ` Subbaraya Sundeep [this message]
2025-05-12 22:29   ` [net-next PATCH 1/4] octeontx2-af: convert dev_dbg to tracepoint in mbox kernel test robot
2025-05-12  8:41 ` [net-next PATCH 2/4] octeontx2-af: Display names for CPT and UP messages Subbaraya Sundeep
2025-05-12  8:41 ` [net-next PATCH 3/4] octeontx2: Add pcifunc also to mailbox tracepoints Subbaraya Sundeep
2025-05-12  8:41 ` [net-next PATCH 3/5] octeontx2: Improve mailbox tracepoints for debugging Subbaraya Sundeep
2025-05-12 18:25   ` Simon Horman
2025-05-13  8:55     ` Subbaraya Sundeep
2025-05-12  8:41 ` [net-next PATCH 4/4] octeontx2: Add new tracepoint otx2_msg_status Subbaraya Sundeep
2025-05-12 18:24   ` Simon Horman
2025-05-12 23:51   ` kernel test robot

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=1747039315-3372-2-git-send-email-sbhatta@marvell.com \
    --to=sbhatta@marvell.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bbhushan2@marvell.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=horms@kernel.org \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sgoutham@marvell.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).