[PATCH] net/af_packet: add timestamp offloading support
Stephen Hemminger
stephen at networkplumber.org
Tue Sep 3 18:21:38 CEST 2024
On Tue, 3 Sep 2024 13:43:06 +0200
Stefan Laesser <stefan.laesser at omicronenergy.com> wrote:
> Add the packet timestamp from TPACKET_V2 to the mbuf
> dynamic rx timestamp register if offload RTE_ETH_RX_OFFLOAD_TIMESTAMP
> is enabled.
>
> TPACKET_V2 provides the timestamp with nanosecond resolution.
>
> Signed-off-by: Stefan Laesser <stefan.laesser at omicronenergy.com>
> ---
> .mailmap | 1 +
> doc/guides/nics/af_packet.rst | 8 ++++--
> drivers/net/af_packet/rte_eth_af_packet.c | 34 +++++++++++++++++++++--
> 3 files changed, 38 insertions(+), 5 deletions(-)
Adding timestamp is good, but it would be better if the timestamp
field was generic. The pcap PMD also has a timestamp, and pdump API
could/should use timestamp as well.
What makes sense is for there to be a standard dynamic field for
nanosecond resolution timestamp, and add a make sure that all drivers
use the same base 1/1/1970 same as Linux/Unix. Also, having
standard helpers in ethdev for the conversion from TSC to NS would
help.
More information about the dev
mailing list