From: Vladimir Vdovin <deliran@verdict.gg>
To: lorenzo@kernel.org
Cc: sdf@fomichev.me, kuba@kernel.org, andrii@kernel.org,
ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org,
john.fastabend@gmail.com, martin.lau@linux.dev,
sdf.kernel@gmail.com, bpf@vger.kernel.org,
netdev@vger.kernel.org, Vladimir Vdovin <deliran@verdict.gg>
Subject: [PATCH bpf-next 0/1] selftests: drv-net: XDP RX checksum metadata test
Date: Wed, 8 Jul 2026 15:51:43 +0300 [thread overview]
Message-ID: <cover.1783514455.git.deliran@verdict.gg> (raw)
In-Reply-To: <akZ7QPfn83OUx5Vm@lore-desk>
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
next prev parent reply other threads:[~2026-07-08 12:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 19:15 [RFC PATCH bpf-next v1 0/7] xdp: RX checksum metadata hint and checksum assertion over redirect Vladimir Vdovin
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 1/7] xdp: let XDP programs assert the RX checksum " Vladimir Vdovin
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 2/7] selftests/bpf: add test for bpf_xdp_assert_rx_csum over cpumap Vladimir Vdovin
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 3/7] xdp: add bpf_xdp_metadata_rx_csum() RX metadata kfunc Vladimir Vdovin
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 4/7] net/mlx5e: support the rx_csum XDP metadata hint Vladimir Vdovin
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 5/7] ice: " Vladimir Vdovin
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 6/7] veth: " Vladimir Vdovin
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 7/7] selftests/bpf: cover bpf_xdp_metadata_rx_csum in xdp_metadata Vladimir Vdovin
2026-06-30 21:18 ` [RFC PATCH bpf-next v1 0/7] xdp: RX checksum metadata hint and checksum assertion over redirect Stanislav Fomichev
2026-06-30 22:16 ` Lorenzo Bianconi
2026-07-01 17:10 ` Vladimir Vdovin
2026-07-02 14:52 ` Lorenzo Bianconi
2026-07-04 16:41 ` Jesper Dangaard Brouer
2026-07-08 12:51 ` Vladimir Vdovin [this message]
2026-07-08 12:51 ` [PATCH bpf-next 1/1] selftests: drv-net: add XDP RX checksum metadata tests Vladimir Vdovin
2026-07-08 13:28 ` bot+bpf-ci
2026-07-08 15:12 ` [PATCH bpf-next 0/1] selftests: drv-net: XDP RX checksum metadata test 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.1783514455.git.deliran@verdict.gg \
--to=deliran@verdict.gg \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=lorenzo@kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=sdf.kernel@gmail.com \
--cc=sdf@fomichev.me \
/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