]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Use the xsk batched rx allocation interface
authorMagnus Karlsson <magnus.karlsson@intel.com>
Wed, 22 Sep 2021 07:56:05 +0000 (09:56 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 27 Sep 2021 22:18:35 +0000 (00:18 +0200)
commit7ae8ca3238c3576a787e0a2cb6cb66edf8770759
treefa500dd2d34c7db93b6dcb3004596c3455ba3a92
parent8a0becfb7d89f811dc8ee7cf2b290441bd3b61f1
i40e: Use the xsk batched rx allocation interface

Use the new xsk batched rx allocation interface for the zero-copy data
path. As the array of struct xdp_buff pointers kept by the driver is
really a ring that wraps, the allocation routine is modified to detect
a wrap and in that case call the allocation function twice. The
allocation function cannot deal with wrapped rings, only arrays. As we
now know exactly how many buffers we get and that there is no
wrapping, the allocation function can be simplified even more as all
if-statements in the allocation loop can be removed, improving
performance.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210922075613.12186-6-magnus.karlsson@gmail.com
drivers/net/ethernet/intel/i40e/i40e_xsk.c