]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: Fix to xdpsock to avoid recycling frames
authorWeqaar Janjua <weqaar.a.janjua@intel.com>
Fri, 28 Aug 2020 16:17:17 +0000 (00:17 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 31 Aug 2020 21:00:43 +0000 (23:00 +0200)
commit226b8994ef9c9c5dc00289f28a86bcef3f5828d0
tree9bb104f267bd9468f6dfe98e5f695ead396ee2f0
parente5990221f599fbc5bce945656c1fc0f29208662b
samples/bpf: Fix to xdpsock to avoid recycling frames

The txpush program in the xdpsock sample application is supposed
to send out all packets in the umem in a round-robin fashion.
The problem is that it only cycled through the first BATCH_SIZE
worth of packets. Fixed this so that it cycles through all buffers
in the umem as intended.

Fixes: 4cb659ee6cb1 ("samples/bpf: convert xdpsock to use libbpf for AF_XDP access")
Signed-off-by: Weqaar Janjua <weqaar.a.janjua@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Link: https://lore.kernel.org/bpf/20200828161717.42705-1-weqaar.a.janjua@intel.com
samples/bpf/xdpsock_user.c