> Hi Lorenzo, Hi Vladimir, > > 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. thx for working on it. Unfortunately I do not have the time to look into it a the moment. I rebased my b4/bpf-xdp-meta-rxcksum branch on top of net-next one. Feel free to repost it adding your patch on top of it. Regards, Lorenzo > > > 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 >