[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230724235957.1953861-1-sdf@google.com>
Date: Mon, 24 Jul 2023 16:59:49 -0700
From: Stanislav Fomichev <sdf@...gle.com>
To: bpf@...r.kernel.org
Cc: ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
martin.lau@...ux.dev, song@...nel.org, yhs@...com, john.fastabend@...il.com,
kpsingh@...nel.org, sdf@...gle.com, haoluo@...gle.com, jolsa@...nel.org,
kuba@...nel.org, toke@...nel.org, willemb@...gle.com, dsahern@...nel.org,
magnus.karlsson@...el.com, bjorn@...nel.org, maciej.fijalkowski@...el.com,
hawk@...nel.org, netdev@...r.kernel.org, xdp-hints@...-project.net
Subject: [RFC net-next v4 0/8] xsk: TX metadata
This series implements initial TX metadata (offloads) for AF_XDP.
See patch #2 for the main implementation and mlx5-one for the
example on how to consume the metadata on the device side.
With v4, I'm switching from BPF hooks and kfuncs to a fixed TX
metadata/offload format: the metadata is passed with every tx
umem chunk and it's up to the device driver to interpret it.
Starting with two types of offloads:
- request TX timestamp (and write it back into the metadata area)
- request TX checksum offload
TODO for the non-RFC series:
- have some real device support to verify xdp_hw_metadata works
- Documentation/networking/xdp-rx-metadata.rst - like documentation
v3: https://lore.kernel.org/bpf/20230707193006.1309662-1-sdf@google.com/
Stanislav Fomichev (8):
xsk: Support XDP_TX_METADATA_LEN
xsk: add TX timestamp and TX checksum offload support
net/mlx5e: Implement AF_XDP TX timestamp and checksum offload
tools: ynl: update netdev sample to dump xsk-features
selftests/xsk: Support XDP_TX_METADATA_LEN
selftests/bpf: Add csum helpers
selftests/bpf: Add TX side to xdp_metadata
selftests/bpf: Add TX side to xdp_hw_metadata
Documentation/netlink/specs/netdev.yaml | 25 ++-
drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 +-
.../net/ethernet/mellanox/mlx5/core/en/xdp.c | 71 ++++++-
.../net/ethernet/mellanox/mlx5/core/en/xdp.h | 10 +-
.../ethernet/mellanox/mlx5/core/en/xsk/tx.c | 9 +-
.../net/ethernet/mellanox/mlx5/core/en_main.c | 1 +
include/linux/netdevice.h | 27 +++
include/linux/skbuff.h | 5 +-
include/net/xdp_sock.h | 61 ++++++
include/net/xdp_sock_drv.h | 13 ++
include/net/xsk_buff_pool.h | 1 +
include/uapi/linux/if_xdp.h | 36 ++++
include/uapi/linux/netdev.h | 15 ++
net/core/netdev-genl.c | 12 +-
net/xdp/xsk.c | 58 +++++
net/xdp/xsk_buff_pool.c | 1 +
net/xdp/xsk_queue.h | 19 +-
tools/include/uapi/linux/if_xdp.h | 50 ++++-
tools/include/uapi/linux/netdev.h | 15 ++
tools/net/ynl/generated/netdev-user.c | 25 +++
tools/net/ynl/generated/netdev-user.h | 5 +
tools/net/ynl/samples/netdev.c | 8 +
tools/testing/selftests/bpf/network_helpers.h | 43 ++++
.../selftests/bpf/prog_tests/xdp_metadata.c | 31 ++-
tools/testing/selftests/bpf/xdp_hw_metadata.c | 201 +++++++++++++++++-
tools/testing/selftests/bpf/xsk.c | 17 ++
tools/testing/selftests/bpf/xsk.h | 1 +
27 files changed, 718 insertions(+), 46 deletions(-)
--
2.41.0.487.g6d72f3e995-goog
Powered by blists - more mailing lists