Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: drv-net: xdp: make sure we're actually testing native XDP

Kernel tries to be helpful and attach the XDP program in generic
mode if the driver has no BPF ndo at all. Since the xdp.py tests
all have "native" in their names this can be quite confusing.
Force native / "drv" attachment. Note that netdevsim re-uses
the generic handler as its "native" handler, so we'll maintain
the test coverage of the generic mode that way. No need to test
both explicitly, I reckon.

Link: https://patch.msgid.link/20250822195645.1673390-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+2 -2
+2 -2
tools/testing/selftests/drivers/net/xdp.py
··· 112 112 defer(ip, f"link set dev {cfg.remote_ifname} mtu 1500", host=cfg.remote) 113 113 114 114 cmd( 115 - f"ip link set dev {cfg.ifname} mtu {bpf_info.mtu} xdp obj {abs_path} sec {bpf_info.xdp_sec}", 115 + f"ip link set dev {cfg.ifname} mtu {bpf_info.mtu} xdpdrv obj {abs_path} sec {bpf_info.xdp_sec}", 116 116 shell=True 117 117 ) 118 - defer(ip, f"link set dev {cfg.ifname} mtu 1500 xdp off") 118 + defer(ip, f"link set dev {cfg.ifname} mtu 1500 xdpdrv off") 119 119 120 120 xdp_info = ip(f"-d link show dev {cfg.ifname}", json=True)[0] 121 121 prog_info["id"] = xdp_info["xdp"]["prog"]["id"]