[RFC bpf-next 0/4] Add XDP rx hw hints support performing XDP_REDIRECT

Lorenzo Bianconi
2024-09-21T16:53:07Z

This series introduces the xdp_rx_meta struct in the xdp_buff/xdp_frame
one as a container to store the already supported xdp rx hw hints (rx_hash
and rx_vlan, rx_timestamp will be stored in skb_shared_info area) when the
eBPF program running on the nic performs XDP_REDIRECT. Doing so, we are able
to set the skb metadata converting the xdp_buff/xdp_frame to a skb.
Update xdp_metadata_ops callbacks for the following drivers:
- ice
- igc
- mlx5
- mlx4
- veth
- virtio_net
- stmmac

Lorenzo Bianconi (4):
net: xdp: Add xdp_rx_meta structure
net: xdp: Update rx_hash of xdp_rx_meta struct running xmo_rx_hash
callback
net: xdp: Update rx_vlan of xdp_rx_meta struct running xmo_rx_vlan_tag
callback
net: xdp: Update rx timestamp of xdp_rx_meta struct running
xmo_rx_timestamp callback

drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 9 +++
drivers/net/ethernet/intel/igc/igc_main.c | 5 ++
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 +
.../net/ethernet/mellanox/mlx5/core/en/xdp.c | 8 ++
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +
drivers/net/veth.c | 9 +++
drivers/net/virtio_net.c | 3 +-
include/net/xdp.h | 79 +++++++++++++++++++
net/core/xdp.c | 29 ++++++-
9 files changed, 146 insertions(+), 2 deletions(-)

--
2.46.1