Skip to content

selftests: drv-net: Test XDP native support

Mohsin Bashir bpf linux-kselftest llvm netdev 6 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest5 patches 14 repliesApplied 5/5
  2. v55 patches 1 replySuperseded
  3. v45 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v34 patches6 repliesSuperseded
v25 patches4 repliesSuperseded 1 of 5 applied
v15 patches1 replySuperseded

Patches in v6 All 5 applied

#Subject and filesSizeRepliesApplied
1/5net: netdevsim: hook in XDP handlingdrivers/net/netdevsim/netdev.c+20 -10 repliesApplied
2/5selftests: drv-net: Test XDP_PASS/DROP supporttools/testing/selftests/drivers/net/Makefile tools/testing/selftests/drivers/net/xdp.py tools/testing/selftests/net/lib/xdp_native.bpf.c+462 -010 repliesApplied
3/5selftests: drv-net: Test XDP_TX supporttools/testing/selftests/drivers/net/xdp.py tools/testing/selftests/net/lib/xdp_native.bpf.c+114 -00 repliesApplied
4/5selftests: drv-net: Test tail-adjustment supporttools/testing/selftests/drivers/net/xdp.py tools/testing/selftests/net/lib/xdp_native.bpf.c+380 -40 repliesApplied
5/5selftests: drv-net: Test head-adjustment supporttools/testing/selftests/drivers/net/xdp.py tools/testing/selftests/net/lib/xdp_native.bpf.c+327 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH net-next V6 0/5] selftests: drv-net: Test XDP native support

This patch series add tests to validate XDP native support for PASS, DROP, ABORT, and TX actions, as well as headroom and tailroom adjustment. For adjustment tests, validate support for both the extension and shrinking cases across various packet sizes and offset values.

The pass criteria for head/tail adjustment tests require that at-least one adjustment value works for at-least one packet size. This ensure that the variability in maximum supported head/tail adjustment offset across different drivers is being incorporated.

The results reported in this series are based on netdevsim. However, the series is tested against multiple other drivers including fbnic.

Note: The XDP support for fbnic will be added later.
---
Change-log:
- Force checksum computation in netdevsim xdp hook
- Update checksum when updating packet for head/tail adjustment cases
- Use 1 as the minimum value for the data growth while adjusting tail

V5: https://lore.kernel.org/netdev/[email protected]
V4: https://lore.kernel.org/netdev/[email protected]
V3: https://lore.kernel.org/netdev/[email protected]
V2: https://lore.kernel.org/netdev/[email protected]
V1: https://lore.kernel.org/netdev/[email protected]

Jakub Kicinski (1):
net: netdevsim: hook in XDP handling

Mohsin Bashir (4):
selftests: drv-net: Test XDP_PASS/DROP support
selftests: drv-net: Test XDP_TX support
selftests: drv-net: Test tail-adjustment support
selftests: drv-net: Test head-adjustment support

 drivers/net/netdevsim/netdev.c                |  21 +-
 tools/testing/selftests/drivers/net/Makefile  |   1 +
 tools/testing/selftests/drivers/net/xdp.py    | 656 ++++++++++++++++++
 .../selftests/net/lib/xdp_native.bpf.c        | 621 +++++++++++++++++
 4 files changed, 1298 insertions(+), 1 deletion(-)
 create mode 100755 tools/testing/selftests/drivers/net/xdp.py
 create mode 100644 tools/testing/selftests/net/lib/xdp_native.bpf.c
Signature · 1 line
2.47.1