Subject: Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

From: Jakub Kicinski <[email-masked]>
Date: Sat, 14 Sep 2024 06:38:28 -0700

On Sat, 14 Sep 2024 11:25:47 +0200 Lorenzo Bianconi wrote:
> On Sep 13, Martin KaFai Lau wrote:
> > test a physical network device that supports a certain XDP features.
> > 
> > iiuc, test_xdp_features.sh only uses the veth and veth will also be the only
> > device tested after moving to prog_tests/xdp_features.c? It is a reasonable
> > addition to test_progs for an end-to-end xdp test by using veth. However,
> > test_progs will not be able to test the physical network device.
> > 
> > Lorenzo, is the xdp_features.c still used for device testing?
> 
> correct, xdp_features.c is intended to test the real xdp features supported by
> the NIC under test (DUT), not just the advertised ones (iirc that was a
> requisite to add xdp kernel feature support). For this reason we need two
> separated processes running on the tester device and on the DUT (they are
> usually two different devices). test_xdp_features.sh was just a simple test
> script used to develop xdp_features.c.
> What about extending xdp_features.c to integrate it in the CI?

No preference but just to raise awareness - drivers/net's NetDrvEpEnv
class provides the setup for running tests with an endpoint.
XDP tests intended for HW would fit there pretty well.