]> git.baikalelectronics.ru Git - kernel.git/commit
xdp: For Intel AF_XDP drivers add XDP frame_sz
authorJesper Dangaard Brouer <brouer@redhat.com>
Thu, 14 May 2020 10:51:15 +0000 (12:51 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 15 May 2020 04:21:56 +0000 (21:21 -0700)
commita0821eb3383705f9a98ac838b598601587c1b84a
tree4d87b314bcb0fb6fa15411505cb234946b6bb5c4
parente912a586382b82ae3468049ec59de70ed6acc729
xdp: For Intel AF_XDP drivers add XDP frame_sz

Intel drivers implement native AF_XDP zerocopy in separate C-files,
that have its own invocation of bpf_prog_run_xdp(). The setup of
xdp_buff is also handled in separately from normal code path.

This patch update XDP frame_sz for AF_XDP zerocopy drivers i40e, ice
and ixgbe, as the code changes needed are very similar.  Introduce a
helper function xsk_umem_xdp_frame_sz() for calculating frame size.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Cc: intel-wired-lan@lists.osuosl.org
Cc: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/158945347511.97035.8536753731329475655.stgit@firesoul
drivers/net/ethernet/intel/i40e/i40e_xsk.c
drivers/net/ethernet/intel/ice/ice_xsk.c
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
include/net/xdp_sock.h