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/bpf: Don't refill on completion in xdp_metadata

We only need to consume TX completion instead of refilling 'fill' ring.
It's currently not an issue because we never RX more than 8 packets.

Fixes: e2a46d54d7a1 ("selftests/bpf: Verify xdp_metadata xdp->af_xdp path")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230201233640.367646-1-sdf@google.com

authored by

Stanislav Fomichev and committed by
Daniel Borkmann
8b79b34a e8a3c8bd

+2 -3
+2 -3
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
··· 205 205 if (ASSERT_EQ(xsk_ring_cons__peek(&xsk->comp, 1, &idx), 1, "xsk_ring_cons__peek")) { 206 206 addr = *xsk_ring_cons__comp_addr(&xsk->comp, idx); 207 207 208 - printf("%p: refill idx=%u addr=%llx\n", xsk, idx, addr); 209 - *xsk_ring_prod__fill_addr(&xsk->fill, idx) = addr; 210 - xsk_ring_prod__submit(&xsk->fill, 1); 208 + printf("%p: complete tx idx=%u addr=%llx\n", xsk, idx, addr); 209 + xsk_ring_cons__release(&xsk->comp, 1); 211 210 } 212 211 } 213 212