From: Lorenzo Bianconi <lorenzo@kernel.org>
To: bpf@vger.kernel.org
Cc: netdev@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
andrii@kernel.org, davem@davemloft.net, kuba@kernel.org,
hawk@kernel.org, pabeni@redhat.com, edumazet@google.com,
toke@redhat.com, memxor@gmail.com, alardam@gmail.com,
saeedm@nvidia.com, anthony.l.nguyen@intel.com,
gospo@broadcom.com, vladimir.oltean@nxp.com, nbd@nbd.name,
john@phrozen.org, leon@kernel.org, simon.horman@corigine.com,
aelior@marvell.com, christophe.jaillet@wanadoo.fr,
ecree.xilinx@gmail.com, grygorii.strashko@ti.com, mst@redhat.com,
bjorn@kernel.org, magnus.karlsson@intel.com,
maciej.fijalkowski@intel.com, intel-wired-lan@lists.osuosl.org,
lorenzo.bianconi@redhat.com
Subject: [RFC bpf-next 0/8] xdp: introduce xdp-feature support
Date: Mon, 19 Dec 2022 16:41:29 +0100 [thread overview]
Message-ID: <cover.1671462950.git.lorenzo@kernel.org> (raw)
Introduce the capability to export the XDP features supported by the NIC.
Introduce a XDP compliance test tool (xdp_features) to check the features
exported by the NIC match the real features supported by the driver.
Allow XDP_REDIRECT of non-linear XDP frames into a devmap.
Export XDP features for each XDP capable driver.
Kumar Kartikeya Dwivedi (1):
libbpf: add API to get XDP/XSK supported features
Lorenzo Bianconi (3):
tools: uapi: align if_link.h
bpf: devmap: check XDP features in bpf_map_update_elem and
__xdp_enqueue
selftests/bpf: introduce XDP compliance test tool
Marek Majtyka (4):
net: introduce XDP features flag
drivers: net: turn on XDP features
xsk: add usage of XDP features flags
xsk: add check for full support of XDP in bind
.../networking/netdev-xdp-features.rst | 60 ++
drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 +
.../net/ethernet/aquantia/atlantic/aq_nic.c | 3 +
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 +
.../net/ethernet/cavium/thunder/nicvf_main.c | 2 +
.../net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +
.../net/ethernet/freescale/dpaa2/dpaa2-eth.c | 1 +
.../net/ethernet/freescale/enetc/enetc_pf.c | 3 +
.../ethernet/fungible/funeth/funeth_main.c | 6 +
drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +-
drivers/net/ethernet/intel/ice/ice_main.c | 5 +
drivers/net/ethernet/intel/igb/igb_main.c | 9 +-
drivers/net/ethernet/intel/igc/igc_main.c | 2 +
drivers/net/ethernet/intel/igc/igc_xdp.c | 5 +
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 +
.../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 1 +
drivers/net/ethernet/marvell/mvneta.c | 3 +
.../net/ethernet/marvell/mvpp2/mvpp2_main.c | 3 +
.../ethernet/marvell/octeontx2/nic/otx2_pf.c | 9 +-
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 +
.../net/ethernet/mellanox/mlx4/en_netdev.c | 2 +
.../net/ethernet/mellanox/mlx5/core/en_main.c | 9 +
drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +
.../ethernet/netronome/nfp/nfp_net_common.c | 3 +
drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +
drivers/net/ethernet/sfc/efx.c | 2 +
drivers/net/ethernet/sfc/siena/efx.c | 2 +
drivers/net/ethernet/socionext/netsec.c | 2 +
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
drivers/net/ethernet/ti/cpsw.c | 2 +
drivers/net/ethernet/ti/cpsw_new.c | 2 +
drivers/net/hyperv/netvsc_drv.c | 2 +
drivers/net/netdevsim/netdev.c | 1 +
drivers/net/tun.c | 3 +
drivers/net/veth.c | 4 +
drivers/net/virtio_net.c | 5 +
drivers/net/xen-netfront.c | 1 +
include/linux/netdevice.h | 2 +
include/linux/xdp_features.h | 64 ++
include/net/xdp.h | 39 +
include/uapi/linux/if_link.h | 7 +
include/uapi/linux/if_xdp.h | 1 +
include/uapi/linux/xdp_features.h | 34 +
kernel/bpf/devmap.c | 25 +-
net/core/filter.c | 13 +-
net/core/rtnetlink.c | 34 +
net/xdp/xsk.c | 4 +-
net/xdp/xsk_buff_pool.c | 20 +-
tools/include/uapi/linux/if_link.h | 10 +
tools/include/uapi/linux/if_xdp.h | 1 +
tools/include/uapi/linux/xdp_features.h | 34 +
tools/lib/bpf/libbpf.h | 1 +
tools/lib/bpf/libbpf.map | 1 +
tools/lib/bpf/netlink.c | 62 ++
tools/testing/selftests/bpf/Makefile | 5 +-
.../selftests/bpf/progs/test_xdp_features.c | 235 ++++++
.../selftests/bpf/test_xdp_features.sh | 99 +++
tools/testing/selftests/bpf/xdp_features.c | 745 ++++++++++++++++++
tools/testing/selftests/bpf/xsk.c | 3 +
60 files changed, 1602 insertions(+), 24 deletions(-)
create mode 100644 Documentation/networking/netdev-xdp-features.rst
create mode 100644 include/linux/xdp_features.h
create mode 100644 include/uapi/linux/xdp_features.h
create mode 100644 tools/include/uapi/linux/xdp_features.h
create mode 100644 tools/testing/selftests/bpf/progs/test_xdp_features.c
create mode 100755 tools/testing/selftests/bpf/test_xdp_features.sh
create mode 100644 tools/testing/selftests/bpf/xdp_features.c
--
2.38.1
next reply other threads:[~2022-12-19 15:42 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 15:41 Lorenzo Bianconi [this message]
2022-12-19 15:41 ` [RFC bpf-next 1/8] tools: uapi: align if_link.h Lorenzo Bianconi
2022-12-19 15:41 ` [RFC bpf-next 2/8] net: introduce XDP features flag Lorenzo Bianconi
2022-12-19 20:03 ` sdf
[not found] ` <CAAOQfrFGArAYPyBX_kw4ZvFrTjKXf-jG-2F2y69nOs-oQ8Onwg@mail.gmail.com>
2022-12-20 0:20 ` Stanislav Fomichev
2022-12-20 10:11 ` Lorenzo Bianconi
2022-12-20 18:03 ` Stanislav Fomichev
2022-12-20 22:25 ` Lorenzo Bianconi
2022-12-20 23:36 ` Stanislav Fomichev
2022-12-21 10:39 ` Lorenzo Bianconi
2022-12-21 17:50 ` Stanislav Fomichev
2022-12-20 1:13 ` Jakub Kicinski
2022-12-20 9:20 ` Lorenzo Bianconi
2022-12-20 22:51 ` Marek Majtyka
2022-12-20 23:39 ` Jakub Kicinski
2022-12-21 4:41 ` Jakub Kicinski
2022-12-21 10:47 ` Lorenzo Bianconi
2022-12-19 15:41 ` [RFC bpf-next 3/8] drivers: net: turn on XDP features Lorenzo Bianconi
2022-12-19 15:41 ` [RFC bpf-next 4/8] xsk: add usage of XDP features flags Lorenzo Bianconi
2022-12-19 15:41 ` [RFC bpf-next 5/8] xsk: add check for full support of XDP in bind Lorenzo Bianconi
2022-12-19 15:41 ` [RFC bpf-next 6/8] libbpf: add API to get XDP/XSK supported features Lorenzo Bianconi
2022-12-21 0:18 ` Andrii Nakryiko
2023-01-10 17:26 ` Lorenzo Bianconi
2023-01-13 18:22 ` Andrii Nakryiko
2023-01-14 15:33 ` Lorenzo Bianconi
2022-12-19 15:41 ` [RFC bpf-next 7/8] bpf: devmap: check XDP features in bpf_map_update_elem and __xdp_enqueue Lorenzo Bianconi
2022-12-19 15:41 ` [RFC bpf-next 8/8] selftests/bpf: introduce XDP compliance test tool Lorenzo Bianconi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1671462950.git.lorenzo@kernel.org \
--to=lorenzo@kernel.org \
--cc=aelior@marvell.com \
--cc=alardam@gmail.com \
--cc=andrii@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=gospo@broadcom.com \
--cc=grygorii.strashko@ti.com \
--cc=hawk@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=memxor@gmail.com \
--cc=mst@redhat.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=simon.horman@corigine.com \
--cc=toke@redhat.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).