DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Enabling Rx Vector Timestamping
@ 2026-11-19  5:13 Soumyadeep Hore
  2026-11-19  5:13 ` [PATCH v1 1/2] net/ice: fix Rx timestamp and PTP on vector path Soumyadeep Hore
  2026-11-19  5:14 ` [PATCH v1 2/2] examples/ptpclient: support vector Rx paths Soumyadeep Hore
  0 siblings, 2 replies; 4+ messages in thread
From: Soumyadeep Hore @ 2026-11-19  5:13 UTC (permalink / raw)
  To: dev, bruce.richardson, rajesh3.kumar, aman.deep.singh
  Cc: manoj.kumar.subbarao

From: root <root@gnrd03.(none)>

Enabling Rx vector timestamping for ice with working ptpclient.

Soumyadeep Hore (2):
  net/ice: fix Rx timestamp and PTP on vector path
  examples/ptpclient: support vector Rx paths

 doc/guides/sample_app_ug/ptpclient.rst      |  7 ++-
 drivers/net/intel/ice/ice_rxtx_vec_avx2.c   | 57 +++----------------
 drivers/net/intel/ice/ice_rxtx_vec_avx512.c | 57 +++----------------
 drivers/net/intel/ice/ice_rxtx_vec_common.h | 61 +++++++++++++++++++++
 examples/ptpclient/ptpclient.c              | 52 +++++++++++++-----
 5 files changed, 123 insertions(+), 111 deletions(-)

-- 
2.43.0


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

* [PATCH v1 1/2] net/ice: fix Rx timestamp and PTP on vector path
  2026-11-19  5:13 [PATCH v1 0/2] Enabling Rx Vector Timestamping Soumyadeep Hore
@ 2026-11-19  5:13 ` Soumyadeep Hore
  2026-11-30 14:30   ` Bruce Richardson
  2026-11-19  5:14 ` [PATCH v1 2/2] examples/ptpclient: support vector Rx paths Soumyadeep Hore
  1 sibling, 1 reply; 4+ messages in thread
From: Soumyadeep Hore @ 2026-11-19  5:13 UTC (permalink / raw)
  To: dev, bruce.richardson, rajesh3.kumar, aman.deep.singh
  Cc: manoj.kumar.subbarao

Enabling Rx timestamp offload on the AVX2/AVX512 vector paths
introduced several issues:

- PTP packets were no longer flagged. Applications that start the
  port with Rx timestamp offload and enable timesync afterwards
  (e.g. ptpclient) get a vector Rx path, which never set
  RTE_MBUF_F_RX_IEEE1588_PTP, mbuf timesync or the queue time_high.
  ptpclient therefore dropped all PTP frames and printed no T1-T4.
- The dynamic timestamp flag was merged through a 32-bit SIMD lane,
  so it was lost when the registered flag bit is 32 or higher.
- For scattered packets the first segment kept the timestamp of the
  first descriptor, as reassembly does not copy the dynfield, and
  non-EOP descriptors were fed into the rollover tracking.
- The 32b to 64b conversion ran before the burst was trimmed for
  alignment, updating the state with a packet not yet returned.

Move the post-loop processing into a common helper which runs after
the trim, sets the timestamp flag on ol_flags, converts only EOP
descriptors and stores the result on the first segment, and flags
PTP packets like the scalar path. time_high is updated only for PTP
packets so the timesync read returns the PTP packet timestamp.

Fixes: 332eb4ec8ff0 ("net/ice: support Rx timestamp offload on vector path")

Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
---
 drivers/net/intel/ice/ice_rxtx_vec_avx2.c   | 57 +++----------------
 drivers/net/intel/ice/ice_rxtx_vec_avx512.c | 57 +++----------------
 drivers/net/intel/ice/ice_rxtx_vec_common.h | 61 +++++++++++++++++++++
 3 files changed, 79 insertions(+), 96 deletions(-)

diff --git a/drivers/net/intel/ice/ice_rxtx_vec_avx2.c b/drivers/net/intel/ice/ice_rxtx_vec_avx2.c
index d1b31bb452..1e468d819b 100644
--- a/drivers/net/intel/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/intel/ice/ice_rxtx_vec_avx2.c
@@ -46,6 +46,9 @@ _ice_recv_raw_pkts_vec_avx2(struct ci_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	struct ci_rx_entry *sw_ring = &rxq->sw_ring[rxq->rx_tail];
 	volatile union ci_rx_flex_desc *rxdp = rxq->rx_flex_ring + rxq->rx_tail;
 	const int avx_aligned = ((rxq->rx_tail & 1) == 0);
+#ifndef RTE_NET_INTEL_USE_16BYTE_DESC
+	const uint8_t *split_flags = split_packet;
+#endif
 
 	rte_prefetch0(rxdp);
 
@@ -559,9 +562,6 @@ _ice_recv_raw_pkts_vec_avx2(struct ci_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 					*RTE_MBUF_DYNFIELD(rx_pkts[i + 7],
 						rxq->ts_offset, uint32_t *) =
 						_mm256_extract_epi32(raw_desc_bh6_7, 7);
-
-					mbuf_flags = _mm256_or_si256(mbuf_flags,
-						_mm256_set1_epi32((int)rxq->ts_flag));
 				} /* if() on Rx timestamp parsing */
 			} /* if() on RSS hash or Rx timestamp parsing */
 #endif
@@ -698,51 +698,6 @@ _ice_recv_raw_pkts_vec_avx2(struct ci_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 			break;
 	}
 
-#ifndef RTE_NET_INTEL_USE_16BYTE_DESC
-	/**
-	 * Convert the stashed 32b Rx timestamps to 64b for the packets that
-	 * were actually received, tracking the register rollover. This mirrors
-	 * the scalar Rx path and is only done over valid (received) packets, so
-	 * timestamps of non-DD descriptors never corrupt the rollover state.
-	 */
-	if (offload && received > 0 &&
-			(rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) {
-		struct ice_vsi *vsi = rxq->ice_vsi;
-		struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
-		struct ice_adapter *ad = vsi->adapter;
-		uint64_t ts_ns;
-		bool is_tsinit = false;
-		uint64_t sw_cur_time =
-			rte_get_timer_cycles() / (rte_get_timer_hz() / 1000);
-
-		if (unlikely(sw_cur_time - rxq->hw_time_update > 4))
-			is_tsinit = true;
-
-		for (uint16_t k = 0; k < received; k++) {
-			uint32_t ts_high = *RTE_MBUF_DYNFIELD(rx_pkts[k],
-					rxq->ts_offset, uint32_t *);
-
-			rxq->time_high = ts_high;
-			if (unlikely(is_tsinit)) {
-				ts_ns = ice_tstamp_convert_32b_64b(hw, ad, 1,
-								   ts_high);
-				rxq->hw_time_low = (uint32_t)ts_ns;
-				rxq->hw_time_high = (uint32_t)(ts_ns >> 32);
-				is_tsinit = false;
-			} else {
-				if (ts_high < rxq->hw_time_low)
-					rxq->hw_time_high += 1;
-				ts_ns = (uint64_t)rxq->hw_time_high << 32 | ts_high;
-				rxq->hw_time_low = ts_high;
-			}
-			*RTE_MBUF_DYNFIELD(rx_pkts[k], rxq->ts_offset,
-					   rte_mbuf_timestamp_t *) = ts_ns;
-		}
-		rxq->hw_time_update = rte_get_timer_cycles() /
-				      (rte_get_timer_hz() / 1000);
-	}
-#endif
-
 	/* update tail pointers */
 	rxq->rx_tail += received;
 	rxq->rx_tail &= (rxq->nb_rx_desc - 1);
@@ -751,6 +706,12 @@ _ice_recv_raw_pkts_vec_avx2(struct ci_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		received--;
 	}
 	rxq->rxrearm_nb += received;
+
+#ifndef RTE_NET_INTEL_USE_16BYTE_DESC
+	if (offload && received > 0 &&
+			(rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP))
+		ice_rx_vec_ts_finalize(rxq, rx_pkts, received, split_flags);
+#endif
 	return received;
 }
 
diff --git a/drivers/net/intel/ice/ice_rxtx_vec_avx512.c b/drivers/net/intel/ice/ice_rxtx_vec_avx512.c
index 81eaa47842..ef189803d6 100644
--- a/drivers/net/intel/ice/ice_rxtx_vec_avx512.c
+++ b/drivers/net/intel/ice/ice_rxtx_vec_avx512.c
@@ -47,6 +47,9 @@ _ice_recv_raw_pkts_vec_avx512(struct ci_rx_queue *rxq,
 			0, rxq->mbuf_initializer);
 	struct ci_rx_entry *sw_ring = &rxq->sw_ring[rxq->rx_tail];
 	volatile union ci_rx_flex_desc *rxdp = rxq->rx_flex_ring + rxq->rx_tail;
+#ifndef RTE_NET_INTEL_USE_16BYTE_DESC
+	const uint8_t *split_flags = split_packet;
+#endif
 
 	rte_prefetch0(rxdp);
 
@@ -581,9 +584,6 @@ _ice_recv_raw_pkts_vec_avx512(struct ci_rx_queue *rxq,
 					*RTE_MBUF_DYNFIELD(rx_pkts[i + 7],
 						rxq->ts_offset, uint32_t *) =
 						_mm256_extract_epi32(raw_desc_bh6_7, 7);
-
-					mbuf_flags = _mm256_or_si256(mbuf_flags,
-						_mm256_set1_epi32((int)rxq->ts_flag));
 				} /* if() on Rx timestamp parsing */
 			} /* if() on RSS hash or Rx timestamp parsing */
 #endif
@@ -724,51 +724,6 @@ _ice_recv_raw_pkts_vec_avx512(struct ci_rx_queue *rxq,
 			break;
 	}
 
-#ifndef RTE_NET_INTEL_USE_16BYTE_DESC
-	/**
-	 * Convert the stashed 32b Rx timestamps to 64b for the packets that
-	 * were actually received, tracking the register rollover. This mirrors
-	 * the scalar Rx path and is only done over valid (received) packets, so
-	 * timestamps of non-DD descriptors never corrupt the rollover state.
-	 */
-	if (do_offload && received > 0 &&
-			(rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) {
-		struct ice_vsi *vsi = rxq->ice_vsi;
-		struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
-		struct ice_adapter *ad = vsi->adapter;
-		uint64_t ts_ns;
-		bool is_tsinit = false;
-		uint64_t sw_cur_time =
-			rte_get_timer_cycles() / (rte_get_timer_hz() / 1000);
-
-		if (unlikely(sw_cur_time - rxq->hw_time_update > 4))
-			is_tsinit = true;
-
-		for (uint16_t k = 0; k < received; k++) {
-			uint32_t ts_high = *RTE_MBUF_DYNFIELD(rx_pkts[k],
-					rxq->ts_offset, uint32_t *);
-
-			rxq->time_high = ts_high;
-			if (unlikely(is_tsinit)) {
-				ts_ns = ice_tstamp_convert_32b_64b(hw, ad, 1,
-								   ts_high);
-				rxq->hw_time_low = (uint32_t)ts_ns;
-				rxq->hw_time_high = (uint32_t)(ts_ns >> 32);
-				is_tsinit = false;
-			} else {
-				if (ts_high < rxq->hw_time_low)
-					rxq->hw_time_high += 1;
-				ts_ns = (uint64_t)rxq->hw_time_high << 32 | ts_high;
-				rxq->hw_time_low = ts_high;
-			}
-			*RTE_MBUF_DYNFIELD(rx_pkts[k], rxq->ts_offset,
-					   rte_mbuf_timestamp_t *) = ts_ns;
-		}
-		rxq->hw_time_update = rte_get_timer_cycles() /
-				      (rte_get_timer_hz() / 1000);
-	}
-#endif
-
 	/* update tail pointers */
 	rxq->rx_tail += received;
 	rxq->rx_tail &= (rxq->nb_rx_desc - 1);
@@ -777,6 +732,12 @@ _ice_recv_raw_pkts_vec_avx512(struct ci_rx_queue *rxq,
 		received--;
 	}
 	rxq->rxrearm_nb += received;
+
+#ifndef RTE_NET_INTEL_USE_16BYTE_DESC
+	if (do_offload && received > 0 &&
+			(rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP))
+		ice_rx_vec_ts_finalize(rxq, rx_pkts, received, split_flags);
+#endif
 	return received;
 }
 
diff --git a/drivers/net/intel/ice/ice_rxtx_vec_common.h b/drivers/net/intel/ice/ice_rxtx_vec_common.h
index d5ef213e08..54413eebd3 100644
--- a/drivers/net/intel/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/intel/ice/ice_rxtx_vec_common.h
@@ -5,9 +5,70 @@
 #ifndef _ICE_RXTX_VEC_COMMON_H_
 #define _ICE_RXTX_VEC_COMMON_H_
 
+#include <rte_cycles.h>
+#include <rte_mbuf_dyn.h>
+
 #include "../common/rx.h"
 #include "ice_rxtx.h"
 
+#ifndef RTE_NET_INTEL_USE_16BYTE_DESC
+/*
+ * Extend the 32b Rx timestamps stashed in the mbuf dynfield by the vector
+ * loop to 64b, set the timestamp flag and mark PTP packets. Only EOP
+ * descriptors carry the timestamp; it is stored on the packet's first segment.
+ */
+static inline void
+ice_rx_vec_ts_finalize(struct ci_rx_queue *rxq, struct rte_mbuf **rx_pkts,
+		       uint16_t nb_bufs, const uint8_t *split_flags)
+{
+	struct ice_vsi *vsi = rxq->ice_vsi;
+	struct ice_adapter *ad = vsi->adapter;
+	struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
+	const uint64_t ms_hz = rte_get_timer_hz() / 1000;
+	bool is_tsinit = rte_get_timer_cycles() / ms_hz - rxq->hw_time_update > 4;
+	/* first segment of a packet that started in a previous burst */
+	struct rte_mbuf *head = split_flags != NULL ? rxq->pkt_first_seg : NULL;
+	uint16_t k;
+
+	for (k = 0; k < nb_bufs; k++) {
+		struct rte_mbuf *mb = rx_pkts[k];
+		uint32_t ts_high;
+		uint64_t ts_ns;
+
+		if (head == NULL)
+			head = mb;
+		if (split_flags != NULL && split_flags[k] != 0)
+			continue;
+
+		ts_high = *RTE_MBUF_DYNFIELD(mb, rxq->ts_offset, uint32_t *);
+		if (unlikely(is_tsinit)) {
+			ts_ns = ice_tstamp_convert_32b_64b(hw, ad, 1, ts_high);
+			rxq->hw_time_low = (uint32_t)ts_ns;
+			rxq->hw_time_high = (uint32_t)(ts_ns >> 32);
+			is_tsinit = false;
+		} else {
+			if (ts_high < rxq->hw_time_low)
+				rxq->hw_time_high += 1;
+			ts_ns = (uint64_t)rxq->hw_time_high << 32 | ts_high;
+			rxq->hw_time_low = ts_high;
+		}
+		*RTE_MBUF_DYNFIELD(head, rxq->ts_offset, rte_mbuf_timestamp_t *) = ts_ns;
+		/* reassembly copies ol_flags from the EOP segment to the head */
+		mb->ol_flags |= rxq->ts_flag;
+
+		if (ad->ptp_ena && (mb->packet_type & RTE_PTYPE_L2_MASK) ==
+				RTE_PTYPE_L2_ETHER_TIMESYNC) {
+			rxq->time_high = ts_high;
+			head->timesync = rxq->queue_id;
+			mb->timesync = rxq->queue_id;
+			mb->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP;
+		}
+		head = NULL;
+	}
+	rxq->hw_time_update = rte_get_timer_cycles() / ms_hz;
+}
+#endif
+
 static inline int
 ice_tx_desc_done(struct ci_tx_queue *txq, uint16_t idx)
 {
-- 
2.43.0


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

* [PATCH v1 2/2] examples/ptpclient: support vector Rx paths
  2026-11-19  5:13 [PATCH v1 0/2] Enabling Rx Vector Timestamping Soumyadeep Hore
  2026-11-19  5:13 ` [PATCH v1 1/2] net/ice: fix Rx timestamp and PTP on vector path Soumyadeep Hore
@ 2026-11-19  5:14 ` Soumyadeep Hore
  1 sibling, 0 replies; 4+ messages in thread
From: Soumyadeep Hore @ 2026-11-19  5:14 UTC (permalink / raw)
  To: dev, bruce.richardson, rajesh3.kumar, aman.deep.singh
  Cc: manoj.kumar.subbarao

The application received one packet per rte_eth_rx_burst() call.
Vector Rx paths process descriptors in groups and return no packet
for such small bursts, so on a port using a vector Rx path with
timestamp offload (e.g. ice AVX2/AVX512) no PTP frame was received
and no T1-T4 timestamps were printed.

Receive packets in bursts of 32 instead.

With bursts, several PTP frames can be received in a single call,
and the per-queue value returned by
rte_eth_timesync_read_rx_timestamp() may then belong to a later
frame than the SYNC message. When the Rx timestamp offload is
enabled, take the SYNC receive time from the per-packet mbuf
timestamp field instead.

Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
---
 doc/guides/sample_app_ug/ptpclient.rst |  7 +++-
 examples/ptpclient/ptpclient.c         | 52 +++++++++++++++++++-------
 2 files changed, 44 insertions(+), 15 deletions(-)

diff --git a/doc/guides/sample_app_ug/ptpclient.rst b/doc/guides/sample_app_ug/ptpclient.rst
index 8d802ac08b..83ebc154a7 100644
--- a/doc/guides/sample_app_ug/ptpclient.rst
+++ b/doc/guides/sample_app_ug/ptpclient.rst
@@ -154,8 +154,11 @@ The main work of the application is done within the loop:
     :end-before: >8 End of read packets from RX queues.
     :dedent: 2
 
-Packets are received one by one on the RX ports and, if required, PTP response
+Packets are received in bursts on the RX ports and, if required, PTP response
 packets are transmitted on the TX ports.
+When the Rx timestamp offload is available, the SYNC receive time is taken
+from the per-packet mbuf timestamp field, so that it stays correct when several
+PTP frames are received in the same burst.
 
 If the offload flags in the mbuf indicate that the packet is a PTP packet then
 the packet is parsed to determine which type:
@@ -164,7 +167,7 @@ the packet is parsed to determine which type:
     :language: c
     :start-after: Packet is parsed to determine which type. 8<
     :end-before: >8 End of packet is parsed to determine which type.
-    :dedent: 3
+    :dedent: 4
 
 
 All packets are freed explicitly using ``rte_pktmbuf_free()``.
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index 59ce892742..7eb687eb49 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -16,8 +16,10 @@
 #include <rte_cycles.h>
 #include <rte_lcore.h>
 #include <rte_mbuf.h>
+#include <rte_mbuf_dyn.h>
 #include <rte_ip.h>
 #include <rte_ptp.h>
+#include <rte_time.h>
 #include <limits.h>
 #include <sys/time.h>
 #include <getopt.h>
@@ -30,6 +32,7 @@ static volatile bool force_quit;
 
 #define NUM_MBUFS            8191
 #define MBUF_CACHE_SIZE       250
+#define BURST_SIZE             32
 
 #define NSEC_PER_SEC        1000000000L
 #define KERNEL_TIME_ADJUST_LIMIT  20000
@@ -39,6 +42,10 @@ uint32_t ptp_enabled_port_mask;
 uint8_t ptp_enabled_port_nb;
 static uint8_t ptp_enabled_ports[RTE_MAX_ETHPORTS];
 
+/* Rx timestamp mbuf dynamic field, valid when timestamp offload is enabled. */
+static int rx_tstamp_offset = -1;
+static uint64_t rx_tstamp_flag;
+
 static const struct rte_ether_addr ether_multicast = {
 	.addr_bytes = {0x01, 0x1b, 0x19, 0x0, 0x0, 0x0}
 };
@@ -155,8 +162,16 @@ port_init(uint16_t port, struct rte_mempool *mp)
 		return retval;
 	}
 
-	if (dev_info.rx_offload_capa & RTE_ETH_RX_OFFLOAD_TIMESTAMP)
+	if (dev_info.rx_offload_capa & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
 		port_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_TIMESTAMP;
+		retval = rte_mbuf_dyn_rx_timestamp_register(&rx_tstamp_offset,
+				&rx_tstamp_flag);
+		if (retval != 0) {
+			printf("Cannot register Rx timestamp field: %s\n",
+				rte_strerror(rte_errno));
+			return retval;
+		}
+	}
 
 	if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE)
 		port_conf.txmode.offloads |=
@@ -330,9 +345,20 @@ parse_sync(struct ptpv2_time_receiver_ordinary *ptp, uint16_t rx_tstamp_idx)
 			ptp_hdr->source_port_id.clock_id,
 			8) == 0) {
 
-		if (ptp->ptpset == 1)
+		if (ptp->ptpset == 1) {
+			/* Always read: some NICs latch until the register is read. */
 			rte_eth_timesync_read_rx_timestamp(ptp->portid,
 					&ptp->tstamp2, rx_tstamp_idx);
+			/*
+			 * The per-packet timestamp stays correct when several PTP
+			 * frames arrive in one burst; the per-queue latch does not.
+			 */
+			if (rx_tstamp_offset >= 0 &&
+					(ptp->m->ol_flags & rx_tstamp_flag) != 0)
+				ptp->tstamp2 = rte_ns_to_timespec(
+					*RTE_MBUF_DYNFIELD(ptp->m, rx_tstamp_offset,
+						rte_mbuf_timestamp_t *));
+		}
 	}
 
 }
@@ -570,8 +596,8 @@ static void
 lcore_main(void)
 {
 	uint16_t portid;
-	unsigned nb_rx;
-	struct rte_mbuf *m;
+	uint16_t nb_rx, i;
+	struct rte_mbuf *bufs[BURST_SIZE];
 
 	printf("\nCore %u Waiting for SYNC packets. [Ctrl+C to quit]\n",
 			rte_lcore_id());
@@ -583,17 +609,17 @@ lcore_main(void)
 		for (portid = 0; portid < ptp_enabled_port_nb; portid++) {
 
 			portid = ptp_enabled_ports[portid];
-			nb_rx = rte_eth_rx_burst(portid, 0, &m, 1);
+			/* Vector Rx paths may return nothing for small bursts. */
+			nb_rx = rte_eth_rx_burst(portid, 0, bufs, BURST_SIZE);
 
-			if (likely(nb_rx == 0))
-				continue;
+			for (i = 0; i < nb_rx; i++) {
+				/* Packet is parsed to determine which type. 8< */
+				if (bufs[i]->ol_flags & RTE_MBUF_F_RX_IEEE1588_PTP)
+					parse_ptp_frames(portid, bufs[i]);
+				/* >8 End of packet is parsed to determine which type. */
 
-			/* Packet is parsed to determine which type. 8< */
-			if (m->ol_flags & RTE_MBUF_F_RX_IEEE1588_PTP)
-				parse_ptp_frames(portid, m);
-			/* >8 End of packet is parsed to determine which type. */
-
-			rte_pktmbuf_free(m);
+				rte_pktmbuf_free(bufs[i]);
+			}
 		}
 		/* >8 End of read packets from RX queues. */
 	}
-- 
2.43.0


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

* Re: [PATCH v1 1/2] net/ice: fix Rx timestamp and PTP on vector path
  2026-11-19  5:13 ` [PATCH v1 1/2] net/ice: fix Rx timestamp and PTP on vector path Soumyadeep Hore
@ 2026-11-30 14:30   ` Bruce Richardson
  0 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2026-11-30 14:30 UTC (permalink / raw)
  To: Soumyadeep Hore; +Cc: dev, rajesh3.kumar, aman.deep.singh, manoj.kumar.subbarao

On Thu, Nov 19, 2026 at 10:43:59AM +0530, Soumyadeep Hore wrote:
> Enabling Rx timestamp offload on the AVX2/AVX512 vector paths
> introduced several issues:
> 
> - PTP packets were no longer flagged. Applications that start the
>   port with Rx timestamp offload and enable timesync afterwards
>   (e.g. ptpclient) get a vector Rx path, which never set
>   RTE_MBUF_F_RX_IEEE1588_PTP, mbuf timesync or the queue time_high.
>   ptpclient therefore dropped all PTP frames and printed no T1-T4.
> - The dynamic timestamp flag was merged through a 32-bit SIMD lane,
>   so it was lost when the registered flag bit is 32 or higher.
> - For scattered packets the first segment kept the timestamp of the
>   first descriptor, as reassembly does not copy the dynfield, and
>   non-EOP descriptors were fed into the rollover tracking.
> - The 32b to 64b conversion ran before the burst was trimmed for
>   alignment, updating the state with a packet not yet returned.
> 
> Move the post-loop processing into a common helper which runs after
> the trim, sets the timestamp flag on ol_flags, converts only EOP
> descriptors and stores the result on the first segment, and flags
> PTP packets like the scalar path. time_high is updated only for PTP
> packets so the timesync read returns the PTP packet timestamp.
> 
> Fixes: 332eb4ec8ff0 ("net/ice: support Rx timestamp offload on vector path")
> 
> Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
> ---
>  drivers/net/intel/ice/ice_rxtx_vec_avx2.c   | 57 +++----------------
>  drivers/net/intel/ice/ice_rxtx_vec_avx512.c | 57 +++----------------
>  drivers/net/intel/ice/ice_rxtx_vec_common.h | 61 +++++++++++++++++++++
>  3 files changed, 79 insertions(+), 96 deletions(-)
> 
Now that 26.11 has been released, I think this patch needs a rebase and
update to add back in the timestamp offload flags that were removed for
26.11 by [1].

I would also strongly recommend splitting the patchset into two individual
patches that can be applied separately. This patch, patch 1, goes into the
net-intel tree, while patch 2, or any other patches targetting applications
or examples, needs to go into the main tree. Therefore, they are best
tracked separately for delegation purposes.

Thanks,
/Bruce

[1] https://github.com/DPDK/dpdk/commit/f6ce07ea9aad8e38b7aae08c2400245004da7c35

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

end of thread, other threads:[~2026-11-30 14:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19  5:13 [PATCH v1 0/2] Enabling Rx Vector Timestamping Soumyadeep Hore
2026-11-19  5:13 ` [PATCH v1 1/2] net/ice: fix Rx timestamp and PTP on vector path Soumyadeep Hore
2026-11-30 14:30   ` Bruce Richardson
2026-11-19  5:14 ` [PATCH v1 2/2] examples/ptpclient: support vector Rx paths Soumyadeep Hore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox