[PATCH bpf-next 0/1] selftests: drv-net: XDP RX checksum metadata test
From: Vladimir Vdovin <hidden>
Date: 2026-07-08 12:51:55
Also in:
bpf
Hi Lorenzo, Here is the driver selftest for your XDP RX checksum series, as discussed. It is written against your b4/bpf-xdp-meta-rxcksum branch (the bitmask ip_summed + cksum/cksum_level API) and applies on top of it rebased onto net-next, since the drv-net xdp_metadata.py test it extends only exists there. Feel free to pick it straight into v4. It adds an xdp_rx_csum program to xdp_metadata.bpf.o and two cases gated on the "checksum" xdp-rx-metadata feature (SKIP on devices without it, e.g. netdevsim): - xdp_rx_csum_valid (tcp/udp variants): traffic with a correct checksum from the remote endpoint must be reported with a usable verdict (CHECKSUM_UNNECESSARY and/or CHECKSUM_COMPLETE); - xdp_rx_csum_invalid: UDP with a corrupted L4 checksum (net/lib csum -E) must not be reported as CHECKSUM_UNNECESSARY. One question on the invalid case: I assert only that UNNECESSARY is not set for a corrupted checksum (COMPLETE may still legitimately be reported, since it carries the raw sum for wrong packets too). Is that the documented expectation you and Jakub want the test to encode, or should it be stricter? Thanks, Vladimir Vladimir Vdovin (1): selftests: drv-net: add XDP RX checksum metadata tests .../selftests/drivers/net/hw/xdp_metadata.py | 103 ++++++++++++++++ .../selftests/net/lib/xdp_metadata.bpf.c | 112 ++++++++++++++++-- 2 files changed, 202 insertions(+), 13 deletions(-) -- 2.47.0