]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: Consider frame size in tx_only of xdpsock sample
authorMagnus Karlsson <magnus.karlsson@intel.com>
Thu, 6 May 2021 12:43:49 +0000 (14:43 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 6 May 2021 23:19:55 +0000 (01:19 +0200)
commit333ec9616b7d97d90dbeafae14b4038f6155970a
tree61d6a2a17c5cbe3f72244fe251a2f412623e4f58
parente363f9421fbd3b3ce698627609c0eaebf6552b1c
samples/bpf: Consider frame size in tx_only of xdpsock sample

Fix the tx_only micro-benchmark in xdpsock to take frame size into
consideration. It was hardcoded to the default value of frame_size
which is 4K. Changing this on the command line to 2K made half of the
packets illegal as they were outside the umem and were therefore
discarded by the kernel.

Fixes: fa2a92e501b2 ("samples/bpf: add use of need_wakeup flag in xdpsock")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/bpf/20210506124349.6666-1-magnus.karlsson@gmail.com
samples/bpf/xdpsock_user.c