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: [email protected]
>
> Signed-off-by: David Zage <[email protected]>
> Signed-off-by: Song Yoong Siang <[email protected]>
> ---
Acked-by: Bruce Richardson <[email protected]>