linux/tools/net/ynl/generated
Stanislav Fomichev 48eb03dd26 xsk: Add TX timestamp and TX checksum offload support
This change actually defines the (initial) metadata layout
that should be used by AF_XDP userspace (xsk_tx_metadata).
The first field is flags which requests appropriate offloads,
followed by the offload-specific fields. The supported per-device
offloads are exported via netlink (new xsk-flags).

The offloads themselves are still implemented in a bit of a
framework-y fashion that's left from my initial kfunc attempt.
I'm introducing new xsk_tx_metadata_ops which drivers are
supposed to implement. The drivers are also supposed
to call xsk_tx_metadata_request/xsk_tx_metadata_complete in
the right places. Since xsk_tx_metadata_{request,_complete}
are static inline, we don't incur any extra overhead doing
indirect calls.

The benefit of this scheme is as follows:
- keeps all metadata layout parsing away from driver code
- makes it easy to grep and see which drivers implement what
- don't need any extra flags to maintain to keep track of what
  offloads are implemented; if the callback is implemented - the offload
  is supported (used by netlink reporting code)

Two offloads are defined right now:
1. XDP_TXMD_FLAGS_CHECKSUM: skb-style csum_start+csum_offset
2. XDP_TXMD_FLAGS_TIMESTAMP: writes TX timestamp back into metadata
   area upon completion (tx_timestamp field)

XDP_TXMD_FLAGS_TIMESTAMP is also implemented for XDP_COPY mode: it writes
SW timestamp from the skb destructor (note I'm reusing hwtstamps to pass
metadata pointer).

The struct is forward-compatible and can be extended in the future
by appending more fields.

Reviewed-by: Song Yoong Siang <yoong.siang.song@intel.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20231127190319.1190813-3-sdf@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-11-29 14:59:40 -08:00
..
devlink-user.c tools: ynl: fix duplicate op name in devlink 2023-11-23 08:52:23 -08:00
devlink-user.h Merge branch 'devlink-finish-conversion-to-generated-split_ops' 2023-10-23 16:16:52 -07:00
ethtool-user.c tools: ynl: generate code for the ethtool family 2023-06-12 11:01:03 +01:00
ethtool-user.h tools: ynl-gen: change spacing around __attribute__ 2023-10-23 10:15:36 -07:00
fou-user.c tools: ynl: regen: regenerate the if ladders 2023-06-09 14:40:31 -07:00
fou-user.h tools: ynl-gen: change spacing around __attribute__ 2023-10-23 10:15:36 -07:00
handshake-user.c tools: ynl: regen: stop generating common notification handlers 2023-06-09 14:40:31 -07:00
handshake-user.h tools: ynl-gen: change spacing around __attribute__ 2023-10-23 10:15:36 -07:00
Makefile Networking changes for 6.7. 2023-10-31 05:10:11 -10:00
netdev-user.c xsk: Add TX timestamp and TX checksum offload support 2023-11-29 14:59:40 -08:00
netdev-user.h xsk: Add TX timestamp and TX checksum offload support 2023-11-29 14:59:40 -08:00
nfsd-user.c nfsd: regenerate user space parsers after ynl-gen changes 2023-11-06 09:03:46 +00:00
nfsd-user.h nfsd: regenerate user space parsers after ynl-gen changes 2023-11-06 09:03:46 +00:00