[PATCH 25.11 3/3] net/bnxt: fix Rx timestamping for non-PTP packets
Mohammad Shuab Siddique
mohammad-shuab.siddique at broadcom.com
Tue Aug 4 22:13:58 CEST 2026
From: Chenna Arnoori <chenna.arnoori at broadcom.com>
[ upstream commit 593a6de02f1a155f547fd15c6a587fa91e6cedec ]
When the adapter is configured to timestamp all incoming packets,
timestamps were silently missing for non-PTP traffic (such as IPv6
packets). A previous update incorrectly restricted the timestamp
processing to only recognised PTP packets by changing an OR condition
to an AND condition. This is corrected so that timestamps are properly
extracted for all received packets when promiscuous timestamping is
enabled.
A comment is added to clarify the two conditions under which the
hardware timestamp is extracted from the completion record:
1. The packet is explicitly classified as a PTP packet (with or
without timestamp).
2. Promiscuous timestamping is enabled (ptp_all_rx_tstamp), which
instructs the hardware to timestamp all packets, including
non-PTP traffic (e.g., IPv6).
Fixes: d8dace3936fb ("net/bnxt: fix PTP timestamp flags in scalar Rx")
Cc: stable at dpdk.org
Signed-off-by: Chenna Arnoori <chenna.arnoori at broadcom.com>
Signed-off-by: Mohammad Shuab Siddique <mohammad-shuab.siddique at broadcom.com>
---
.mailmap | 1 +
drivers/net/bnxt/bnxt_rxr.c | 14 +++++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.mailmap b/.mailmap
index 5b92fd610e..048c02b951 100644
--- a/.mailmap
+++ b/.mailmap
@@ -268,6 +268,7 @@ Chenglian Sun <sunchenglian at loongson.cn>
Chengwen Feng <fengchengwen at huawei.com>
Chenmin Sun <chenmin.sun at intel.com>
Chenming Chang <ccm at ccm.ink>
+Chenna Arnoori <chenna.arnoori at broadcom.com>
Chenxingyu Wang <wangchenxingyu at huawei.com>
Chenxu Di <chenxux.di at intel.com>
Chenyu Huang <chenyux.huang at intel.com>
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 9b47b370a6..54d24d3586 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1202,13 +1202,21 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
mbuf->data_len = mbuf->pkt_len;
mbuf->port = rxq->port_id;
- if (unlikely((((rte_le_to_cpu_16(rxcmp->flags_type) &
+ /* Extract the hardware timestamp from the completion record if:
+ * 1. The packet is explicitly classified as a PTP packet (with or
+ * without timestamp), OR
+ * 2. Promiscuous timestamping is enabled (ptp_all_rx_tstamp), which
+ * instructs the hardware to timestamp all packets, including
+ * non-PTP traffic (e.g., IPv6).
+ */
+ if (unlikely(((rte_le_to_cpu_16(rxcmp->flags_type) &
RX_PKT_CMPL_FLAGS_MASK) ==
RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP) ||
((rte_le_to_cpu_16(rxcmp->flags_type) &
RX_PKT_CMPL_FLAGS_MASK) ==
- RX_PKT_CMPL_FLAGS_ITYPE_PTP_WO_TIMESTAMP)) &&
- bp->ptp_all_rx_tstamp) && bp->ieee_1588 &&
+ RX_PKT_CMPL_FLAGS_ITYPE_PTP_WO_TIMESTAMP) ||
+ bp->ptp_all_rx_tstamp) &&
+ bp->ieee_1588 &&
bp->ptp_cfg) {
mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP |
RTE_MBUF_F_RX_IEEE1588_TMST;
--
2.47.3
More information about the stable
mailing list