DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Dawid Wesierski <dawid.wesierski@intel.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>,
	<stephen@networkplumber.org>, <marek.kasiewicz@intel.com>
Subject: Re: [PATCH v3 4/6] net/ice: timestamp all received packets when PTP is enabled
Date: Tue, 30 Jun 2026 16:39:00 +0100	[thread overview]
Message-ID: <akPjFNVasdvxrAwu@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20260630120657.1046588-5-dawid.wesierski@intel.com>

On Tue, Jun 30, 2026 at 08:06:54AM -0400, Dawid Wesierski wrote:
> From: Marek Kasiewicz <marek.kasiewicz@intel.com>
> 
> When PTP is enabled on the ICE PMD, hardware RX timestamps are only
> applied to packets classified as IEEE 1588 (Ethertype 0x88F7). This
> prevents applications from obtaining hardware timestamps on regular
> UDP/IP traffic.
> 
> Remove the TIMESYNC packet type filter so that all received packets
> get hardware timestamps when PTP is enabled. This is required for
> time-sensitive networking applications that need per-packet arrival
> timing on media traffic, such as ST 2110-21 receiver compliance
> monitoring.
> 
> The change affects all three RX paths: scan, scattered, and single
> packet receive functions.
> 
> Signed-off-by: Marek Kasiewicz <marek.kasiewicz@intel.com>
> Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
> ---
>  drivers/net/intel/ice/ice_rxtx.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/intel/ice/ice_rxtx.c b/drivers/net/intel/ice/ice_rxtx.c
> index c4b5454c53..8d709125f7 100644
> --- a/drivers/net/intel/ice/ice_rxtx.c
> +++ b/drivers/net/intel/ice/ice_rxtx.c
> @@ -2023,8 +2023,7 @@ ice_rx_scan_hw_ring(struct ci_rx_queue *rxq)
>  				pkt_flags |= rxq->ts_flag;
>  			}
>  
> -			if (ad->ptp_ena && ((mb->packet_type &
> -			    RTE_PTYPE_L2_MASK) == RTE_PTYPE_L2_ETHER_TIMESYNC)) {
> +			if (ad->ptp_ena) {

Dropping this condition means that all packets are now marked as PTP
packets, even though they are not, which is incorrect. At minimum we need
to check the packet type before setting the PTP flag on them.

However, at a higher level again, I think if we want timestamps for all
packets that that should be a separate feature from PTP support, which
should be more limited in scope. I see there is already an
RTE_ETH_RX_OFFLOAD_TIMESTAMP block above this in the code - does specifying
that offload flag not cause all packets to get properly timestamped? If
not, I would suggest that that be enhanced rather than pretending all
packets are PTP. If that doesn't work, do we need a third alternative,
perhaps?

Regards,
/Bruce

>  				rxq->time_high =
>  				   rte_le_to_cpu_32(rxdp[j].wb.flex_ts.ts_high);
>  				mb->timesync = rxq->queue_id;
> @@ -2390,8 +2389,7 @@ ice_recv_scattered_pkts(void *rx_queue,
>  			pkt_flags |= rxq->ts_flag;
>  		}
>  
> -		if (ad->ptp_ena && ((first_seg->packet_type & RTE_PTYPE_L2_MASK)
> -		    == RTE_PTYPE_L2_ETHER_TIMESYNC)) {
> +		if (ad->ptp_ena) {
>  			rxq->time_high =
>  			   rte_le_to_cpu_32(rxd.wb.flex_ts.ts_high);
>  			first_seg->timesync = rxq->queue_id;
> @@ -2881,8 +2879,7 @@ ice_recv_pkts(void *rx_queue,
>  			pkt_flags |= rxq->ts_flag;
>  		}
>  
> -		if (ad->ptp_ena && ((rxm->packet_type & RTE_PTYPE_L2_MASK) ==
> -		    RTE_PTYPE_L2_ETHER_TIMESYNC)) {
> +		if (ad->ptp_ena) {
>  			rxq->time_high =
>  			   rte_le_to_cpu_32(rxd.wb.flex_ts.ts_high);
>  			rxm->timesync = rxq->queue_id;
> -- 
> 2.47.3
> 
> ---------------------------------------------------------------------
> Intel Technology Poland sp. z o.o.
> ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
> Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
> 
> Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
> This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
> 

  reply	other threads:[~2026-06-30 15:39 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 16:40 [PATCH 0/7] intel network and pcapng updates Dawid Wesierski
2026-06-08 16:40 ` [PATCH 1/7] net/iavf: increase max ring descriptors to hardware limit Dawid Wesierski
2026-06-08 16:40 ` [PATCH 2/7] net/iavf: allow runtime queue rate limit configuration Dawid Wesierski
2026-06-08 16:40 ` [PATCH 3/7] net/ice/base: reduce default scheduler burst size Dawid Wesierski
2026-06-08 16:40 ` [PATCH 4/7] net/ice: timestamp all received packets when PTP is enabled Dawid Wesierski
2026-06-08 16:40 ` [PATCH 5/7] net/iavf: disable runtime queue setup capability Dawid Wesierski
2026-06-08 16:40 ` [PATCH 6/7] pcapng: add user-supplied timestamp support Dawid Wesierski
2026-06-08 17:09   ` Stephen Hemminger
2026-06-08 16:40 ` [PATCH 7/7] net/ice: add header split mbuf callback support Dawid Wesierski
2026-06-08 16:59 ` [PATCH 0/7] intel network and pcapng updates Thomas Monjalon
2026-06-18 14:44 ` [PATCH v3 1/1] pcapng: add user-supplied timestamp support Dawid Wesierski
2026-06-18 15:20   ` Stephen Hemminger
2026-06-18 14:44 ` [PATCH v2 0/7] Intel network drivers enhancements Dawid Wesierski
2026-06-18 14:44   ` [PATCH v2 1/7] ethdev: add header split mbuf callback API Dawid Wesierski
2026-06-18 16:26     ` Thomas Monjalon
2026-06-18 14:44   ` [PATCH v2 2/7] net/iavf: increase max ring descriptors to hardware limit Dawid Wesierski
2026-06-18 14:44   ` [PATCH v2 3/7] net/iavf: allow runtime queue rate limit configuration Dawid Wesierski
2026-06-18 14:44   ` [PATCH v2 4/7] net/ice/base: reduce default scheduler burst size Dawid Wesierski
2026-06-18 14:44   ` [PATCH v2 5/7] net/ice: timestamp all received packets when PTP is enabled Dawid Wesierski
2026-06-18 14:44   ` [PATCH v2 6/7] net/iavf: disable runtime queue setup capability Dawid Wesierski
2026-06-18 14:44   ` [PATCH v2 7/7] net/intel: support header split mbuf callback Dawid Wesierski
2026-06-29 15:33     ` Tested the v3 series on Intel E810-C (Columbiaville) hardware Dawid Wesierski
2026-06-30 12:06     ` [PATCH v3 0/6] Intel network drivers enhancements Dawid Wesierski
2026-06-30 12:06       ` [PATCH v3 1/6] net/iavf: increase max ring descriptors to hardware limit Dawid Wesierski
2026-06-30 14:29         ` Bruce Richardson
2026-06-30 12:06       ` [PATCH v3 2/6] net/iavf: allow runtime queue rate limit configuration Dawid Wesierski
2026-06-30 14:46         ` Bruce Richardson
2026-06-30 12:06       ` [PATCH v3 3/6] net/ice: add scheduler rate-limiter burst size devarg Dawid Wesierski
2026-06-30 15:20         ` Bruce Richardson
2026-06-30 12:06       ` [PATCH v3 4/6] net/ice: timestamp all received packets when PTP is enabled Dawid Wesierski
2026-06-30 15:39         ` Bruce Richardson [this message]
2026-07-03 20:00         ` Dawid Wesierski
2026-06-30 12:06       ` [PATCH v3 5/6] net/iavf: disable runtime queue setup capability Dawid Wesierski
2026-06-30 15:44         ` Bruce Richardson
2026-06-30 12:06       ` [PATCH v3 6/6] app/testpmd: add pinned external-buffer Rx pool command Dawid Wesierski
2026-07-01 10:42       ` [PATCH v3 0/6] Intel network drivers enhancements Bruce Richardson
2026-07-03 12:19       ` [PATCH v4 0/5] " Dawid Wesierski
2026-07-03 12:19         ` [PATCH v4 1/5] net/iavf: increase max ring descriptors to hardware limit Dawid Wesierski
2026-07-03 12:19         ` [PATCH v4 2/5] net/iavf: allow runtime queue rate limit configuration Dawid Wesierski
2026-07-03 12:19         ` [PATCH v4 3/5] net/ice: add scheduler rate-limiter burst size devarg Dawid Wesierski
2026-07-03 12:19         ` [PATCH v4 4/5] net/iavf: disable runtime queue setup capability Dawid Wesierski
2026-07-03 12:19         ` [PATCH v4 5/5] app/testpmd: add pinned external-buffer Rx pool command Dawid Wesierski
2026-06-18 15:45   ` [PATCH v2 0/7] Intel network drivers enhancements Stephen Hemminger
2026-06-18 15:46   ` Stephen Hemminger

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=akPjFNVasdvxrAwu@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dawid.wesierski@intel.com \
    --cc=dev@dpdk.org \
    --cc=marek.kasiewicz@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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