dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] net/e1000: force allocation of context descriptor for igc launch time
@ 2025-12-04  1:30 Song Yoong Siang
  2025-12-11 15:32 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Song Yoong Siang @ 2025-12-04  1:30 UTC (permalink / raw)
  To: Bruce Richardson, David Zage, Soumyadeep Hore, dev; +Cc: stable

When the timestamp dynamic flag is set in the mbuf offload flags, force
allocation of a new context descriptor. The launch time feature requires a
dedicated context descriptor to specify the desired launch time for packet.

Testing was performed on two Intel ADL-S platforms with i226 NICs
connected back-to-back. A DPDK sample application is created to send two
bursts of packets with 100,000 nanosecond burst interval. Each burst is
having 5 UDP packets and only the first packet in the burst using launch
time feature. Meanwhile, the tcpdump command below is used on the link
partner to capture the delta of Rx hardware timestamp of the 10 packets:

tcpdump -ttt -ni enp1s0 --time-stamp-precision=nano -j adapter_unsynced

Without this patch, packets of second burst are transmitted immediately as
the driver din't create context descriptor for the launch time, as shown
in tcpdump log below:

  00:00:00.000000000 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008381 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008381 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982

With this patch, packets of second burst are properly held until the
intended 100,000 nanosecond intervals, demonstrating correct launch time
behavior. As shown in tcpdump log below, the delta of first packet
between first and second bursts is 8387 + 8384 + 8384 + 8384 + 66461 =
100,000 nanosecond.

  00:00:00.000000000 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000066461 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
  00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982

Fixes: 9630f7c71ecd ("net/igc: enable launch time offloading")
Cc: stable@dpdk.org

Signed-off-by: David Zage <david.zage@intel.com>
Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
---
 drivers/net/intel/e1000/igc_txrx.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/intel/e1000/igc_txrx.c b/drivers/net/intel/e1000/igc_txrx.c
index f2a6c34094..35f36d266a 100644
--- a/drivers/net/intel/e1000/igc_txrx.c
+++ b/drivers/net/intel/e1000/igc_txrx.c
@@ -1416,6 +1416,10 @@ what_advctx_update(struct igc_tx_queue *txq, uint64_t flags,
 {
 	uint32_t curr = txq->ctx_curr;
 
+	/* Launch time feature always need a new context descriptor */
+	if (flags & igc_tx_timestamp_dynflag)
+		return IGC_CTX_NUM;
+
 	/* If match with the current context */
 	if (likely(txq->ctx_cache[curr].flags == flags &&
 		txq->ctx_cache[curr].tx_offload.data ==
@@ -1621,7 +1625,8 @@ igc_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		tx_last = (uint16_t)(tx_id + tx_pkt->nb_segs - 1);
 
 		ol_flags = tx_pkt->ol_flags;
-		tx_ol_req = ol_flags & IGC_TX_OFFLOAD_MASK;
+		tx_ol_req = ol_flags & (IGC_TX_OFFLOAD_MASK |
+				igc_tx_timestamp_dynflag);
 
 		/* If a Context Descriptor need be built . */
 		if (tx_ol_req) {
-- 
2.48.1


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

* Re: [PATCH v1 1/1] net/e1000: force allocation of context descriptor for igc launch time
  2025-12-04  1:30 [PATCH v1 1/1] net/e1000: force allocation of context descriptor for igc launch time Song Yoong Siang
@ 2025-12-11 15:32 ` Bruce Richardson
  2025-12-11 15:33   ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2025-12-11 15:32 UTC (permalink / raw)
  To: Song Yoong Siang; +Cc: David Zage, Soumyadeep Hore, dev, stable

On Thu, Dec 04, 2025 at 09:30:08AM +0800, Song Yoong Siang wrote:
> When the timestamp dynamic flag is set in the mbuf offload flags, force
> allocation of a new context descriptor. The launch time feature requires a
> dedicated context descriptor to specify the desired launch time for packet.
> 
> Testing was performed on two Intel ADL-S platforms with i226 NICs
> connected back-to-back. A DPDK sample application is created to send two
> bursts of packets with 100,000 nanosecond burst interval. Each burst is
> having 5 UDP packets and only the first packet in the burst using launch
> time feature. Meanwhile, the tcpdump command below is used on the link
> partner to capture the delta of Rx hardware timestamp of the 10 packets:
> 
> tcpdump -ttt -ni enp1s0 --time-stamp-precision=nano -j adapter_unsynced
> 
> Without this patch, packets of second burst are transmitted immediately as
> the driver din't create context descriptor for the launch time, as shown
> in tcpdump log below:
> 
>   00:00:00.000000000 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008381 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008381 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> 
> With this patch, packets of second burst are properly held until the
> intended 100,000 nanosecond intervals, demonstrating correct launch time
> behavior. As shown in tcpdump log below, the delta of first packet
> between first and second bursts is 8387 + 8384 + 8384 + 8384 + 66461 =
> 100,000 nanosecond.
> 
>   00:00:00.000000000 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000066461 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
>   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> 
> Fixes: 9630f7c71ecd ("net/igc: enable launch time offloading")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Zage <david.zage@intel.com>
> Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>


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

* Re: [PATCH v1 1/1] net/e1000: force allocation of context descriptor for igc launch time
  2025-12-11 15:32 ` Bruce Richardson
@ 2025-12-11 15:33   ` Bruce Richardson
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2025-12-11 15:33 UTC (permalink / raw)
  To: Song Yoong Siang; +Cc: David Zage, Soumyadeep Hore, dev, stable

On Thu, Dec 11, 2025 at 03:32:18PM +0000, Bruce Richardson wrote:
> On Thu, Dec 04, 2025 at 09:30:08AM +0800, Song Yoong Siang wrote:
> > When the timestamp dynamic flag is set in the mbuf offload flags, force
> > allocation of a new context descriptor. The launch time feature requires a
> > dedicated context descriptor to specify the desired launch time for packet.
> > 
> > Testing was performed on two Intel ADL-S platforms with i226 NICs
> > connected back-to-back. A DPDK sample application is created to send two
> > bursts of packets with 100,000 nanosecond burst interval. Each burst is
> > having 5 UDP packets and only the first packet in the burst using launch
> > time feature. Meanwhile, the tcpdump command below is used on the link
> > partner to capture the delta of Rx hardware timestamp of the 10 packets:
> > 
> > tcpdump -ttt -ni enp1s0 --time-stamp-precision=nano -j adapter_unsynced
> > 
> > Without this patch, packets of second burst are transmitted immediately as
> > the driver din't create context descriptor for the launch time, as shown
> > in tcpdump log below:
> > 
> >   00:00:00.000000000 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008381 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008381 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> > 
> > With this patch, packets of second burst are properly held until the
> > intended 100,000 nanosecond intervals, demonstrating correct launch time
> > behavior. As shown in tcpdump log below, the delta of first packet
> > between first and second bursts is 8387 + 8384 + 8384 + 8384 + 66461 =
> > 100,000 nanosecond.
> > 
> >   00:00:00.000000000 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000066461 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008387 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> >   00:00:00.000008384 IP 192.168.1.100.2 > 224.1.1.1.5: UDP, length 982
> > 
> > Fixes: 9630f7c71ecd ("net/igc: enable launch time offloading")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: David Zage <david.zage@intel.com>
> > Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
Applied to dpdk-next-net-intel

/Bruce 

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

end of thread, other threads:[~2025-12-11 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04  1:30 [PATCH v1 1/1] net/e1000: force allocation of context descriptor for igc launch time Song Yoong Siang
2025-12-11 15:32 ` Bruce Richardson
2025-12-11 15:33   ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).