]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: fix xdp handle calculations
authorKevin Laatz <kevin.laatz@intel.com>
Thu, 5 Sep 2019 01:12:17 +0000 (01:12 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 5 Sep 2019 11:53:43 +0000 (13:53 +0200)
commit325a9a15506c8577f10df4c92e1675487f2cfc7a
tree842444a422c97d532ac9424fc80dcb3950df5a6f
parent854f2b2762c9c113ef8663f94e6ee116889190f9
ixgbe: fix xdp handle calculations

Currently, we don't add headroom to the handle in ixgbe_zca_free,
ixgbe_alloc_buffer_slow_zc and ixgbe_alloc_buffer_zc. The addition of the
headroom to the handle was removed in
commit 6158e0dee356 ("ixgbe: modify driver for handling offsets"), which
will break things when headroom isvnon-zero. This patch fixes this and uses
xsk_umem_adjust_offset to add it appropritely based on the mode being run.

Fixes: 6158e0dee356 ("ixgbe: modify driver for handling offsets")
Reported-by: Bjorn Topel <bjorn.topel@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c