From: Przemyslaw Korba <przemyslaw.korba@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
przemyslaw.kitszel@intel.com, aleksandr.loktionov@intel.com,
arkadiusz.kubalewski@intel.com,
Przemyslaw Korba <przemyslaw.korba@intel.com>
Subject: [PATCH iwl-next] ice: add rx timestamp tracepoint for debugging
Date: Mon, 11 May 2026 09:36:34 +0200 [thread overview]
Message-ID: <20260511073657.1073780-1-przemyslaw.korba@intel.com> (raw)
Add ice_rx_hwtstamp trace event to help debug PTP rx timestamp issues.
The trace captures cached_time, ts_high, and the extended ts_ns value in
ice_ptp_get_rx_hwts().
Enable with:
echo 1 > /sys/kernel/debug/tracing/events/ice/ice_rx_hwtstamp/enable
cat /sys/kernel/debug/tracing/trace_pipe
Signed-off-by: Przemyslaw Korba <przemyslaw.korba@intel.com>
---
drivers/net/ethernet/intel/ice/ice_ptp.c | 2 ++
drivers/net/ethernet/intel/ice/ice_trace.h | 18 ++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
index 691f05c62d4e..07e621813ff5 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -2333,6 +2333,8 @@ u64 ice_ptp_get_rx_hwts(const union ice_32b_rx_flex_desc *rx_desc,
ts_high = le32_to_cpu(rx_desc->wb.flex_ts.ts_high);
ts_ns = ice_ptp_extend_32b_ts(cached_time, ts_high);
+ ice_trace(rx_hwtstamp, cached_time, ts_high, ts_ns);
+
return ts_ns;
}
diff --git a/drivers/net/ethernet/intel/ice/ice_trace.h b/drivers/net/ethernet/intel/ice/ice_trace.h
index 4f35ef8d6b29..3cb8c6ea03cf 100644
--- a/drivers/net/ethernet/intel/ice/ice_trace.h
+++ b/drivers/net/ethernet/intel/ice/ice_trace.h
@@ -241,6 +241,24 @@ DEFINE_TX_TSTAMP_OP_EVENT(ice_tx_tstamp_fw_req);
DEFINE_TX_TSTAMP_OP_EVENT(ice_tx_tstamp_fw_done);
DEFINE_TX_TSTAMP_OP_EVENT(ice_tx_tstamp_complete);
+/* Trace event for Rx timestamp */
+TRACE_EVENT(ice_rx_hwtstamp,
+ TP_PROTO(u64 cached_time, u32 ts_high, u64 ts_ns),
+
+ TP_ARGS(cached_time, ts_high, ts_ns),
+
+ TP_STRUCT__entry(__field(u64, cached_time)
+ __field(u32, ts_high)
+ __field(u64, ts_ns)),
+
+ TP_fast_assign(__entry->cached_time = cached_time;
+ __entry->ts_high = ts_high;
+ __entry->ts_ns = ts_ns;),
+
+ TP_printk("cached_time=%llu ts_high=%u ts_ns=%llu",
+ __entry->cached_time, __entry->ts_high, __entry->ts_ns)
+);
+
DECLARE_EVENT_CLASS(ice_esw_br_fdb_template,
TP_PROTO(struct ice_esw_br_fdb_entry *fdb),
TP_ARGS(fdb),
base-commit: 5c0d2ac5900d689d422a31cd45073175150c0a39
--
2.43.0
next reply other threads:[~2026-05-11 7:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 7:36 Przemyslaw Korba [this message]
2026-05-11 9:43 ` [PATCH iwl-next] ice: add rx timestamp tracepoint for debugging Loktionov, Aleksandr
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=20260511073657.1073780-1-przemyslaw.korba@intel.com \
--to=przemyslaw.korba@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.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