From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@kernel.org, andrew+netdev@lunn.ch,
netdev@vger.kernel.org
Cc: Przemyslaw Korba <przemyslaw.korba@intel.com>,
anthony.l.nguyen@intel.com, grzegorz.nitka@intel.com,
aleksandr.loktionov@intel.com, marcin.szycik@intel.com,
jacob.e.keller@intel.com, xiongwm2026@163.com, ynorov@nvidia.com,
przemyslaw.kitszel@intel.com, horms@kernel.org,
Rinitha S <sx.rinitha@intel.com>
Subject: [PATCH net-next 06/10] ice: add rx timestamp tracepoint for debugging
Date: Tue, 29 Sep 2026 15:41:46 -0700 [thread overview]
Message-ID: <20260929224153.1455466-7-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20260929224153.1455466-1-anthony.l.nguyen@intel.com>
From: Przemyslaw Korba <przemyslaw.korba@intel.com>
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>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@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 e54a98a0bdd0..b781004f856d 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -2330,6 +2330,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 7568c917cdbe..7c43683a77d4 100644
--- a/drivers/net/ethernet/intel/ice/ice_trace.h
+++ b/drivers/net/ethernet/intel/ice/ice_trace.h
@@ -261,6 +261,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),
--
2.47.1
next prev parent reply other threads:[~2026-09-29 22:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 22:41 [PATCH net-next 00/10][pull request] Intel Wired LAN Driver Updates 2026-09-29 (ice) Tony Nguyen
2026-09-29 22:41 ` [PATCH net-next 01/10] ice: reduce loglevel to debug for 'Can't delete DSCP' message Tony Nguyen
2026-10-02 20:03 ` netdev-bot+sashiko
2026-09-29 22:41 ` [PATCH net-next 02/10] ice: use ice_fill_eth_hdr() in ice_fill_sw_rule() Tony Nguyen
2026-09-29 22:41 ` [PATCH net-next 03/10] ice: reorder ice_flash_info fields to eliminate padding Tony Nguyen
2026-09-29 22:41 ` [PATCH net-next 04/10] ice: increase OICR interrupt moderation rate to 20K interrupts/sec Tony Nguyen
2026-10-02 20:03 ` netdev-bot+sashiko
2026-09-29 22:41 ` [PATCH net-next 05/10] ice: use inline helpers instead of memcmp() for IPv6 mask checks in ice_ethtool_fdir Tony Nguyen
2026-10-02 20:03 ` netdev-bot+sashiko
2026-09-29 22:41 ` Tony Nguyen [this message]
2026-09-29 22:41 ` [PATCH net-next 07/10] ice: parser: use kcalloc for table allocation Tony Nguyen
2026-10-02 20:03 ` netdev-bot+sashiko
2026-09-29 22:41 ` [PATCH net-next 08/10] ice: simplify ice_pf_state_is_nominal() Tony Nguyen
2026-10-02 20:03 ` netdev-bot+sashiko
2026-09-29 22:41 ` [PATCH net-next 09/10] ice: drop pf == NULL check in ice_pf_state_is_nominal() Tony Nguyen
2026-09-29 22:41 ` [PATCH net-next 10/10] ice: simplify ice_vc_dis_qs_msg() a little Tony Nguyen
2026-10-02 20:03 ` netdev-bot+sashiko
2026-10-06 1:00 ` [PATCH net-next 00/10][pull request] Intel Wired LAN Driver Updates 2026-09-29 (ice) patchwork-bot+netdevbpf
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=20260929224153.1455466-7-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=grzegorz.nitka@intel.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=marcin.szycik@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=przemyslaw.korba@intel.com \
--cc=sx.rinitha@intel.com \
--cc=xiongwm2026@163.com \
--cc=ynorov@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