|WARNING| [v1,2/2] examples/ptpclient: support vector Rx paths
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Thu Nov 19 09:16:16 CET 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/173040
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-19
**Patch 2/2: examples/ptpclient: support vector Rx paths**
**Error: the mbuf Rx timestamp is assumed to be nanoseconds on the PHC clock, which is driver-specific.**
```c
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 *));
```
The `rte_mbuf_timestamp_t` dynfield has no defined unit or time reference. Each PMD chooses its own; mlx5, for example, reports raw device clock ticks. `rte_eth_timesync_read_rx_timestamp()`, by contrast, returns PHC time in a `timespec`.
`port_init()` enables `RTE_ETH_RX_OFFLOAD_TIMESTAMP` on any port that advertises it. With this change, T2 on those NICs is overwritten with a value from a different clock and unit. T1/T3/T4 still come from the timesync API, so the computed delay and offset will be wrong.
Fix: use the per-packet value only when it is known to be in the same timebase as the timesync API, or keep the timesync value as the default. Alternatively, document that this is ice-specific and gate it on the driver. Another option is to avoid the multi-PTP-in-burst problem without mixing clock sources, e.g. read the timesync Rx timestamp per SYNC packet as before and accept the limitation.
Review-Result: ERROR
More information about the test-report
mailing list