]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ixgbe: Fix XDP redirect on archs with PAGE_SIZE above 4K
authorJesper Dangaard Brouer <brouer@redhat.com>
Thu, 14 May 2020 10:50:49 +0000 (12:50 +0200)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
commit631f7a542ead18df760dac39478f57da02dfe288
treec61d86ba022bbf8bd792ae8d7a6065fb988d7345
parent53cb14c9820252bc1d82f79c210b64733a2b3fd2
ixgbe: Fix XDP redirect on archs with PAGE_SIZE above 4K

BugLink: https://bugs.launchpad.net/bugs/1885023
[ Upstream commit 88eb0ee17b2ece64fcf6689a4557a5c2e7a89c4b ]

The ixgbe driver have another memory model when compiled on archs with
PAGE_SIZE above 4096 bytes. In this mode it doesn't split the page in
two halves, but instead increment rx_buffer->page_offset by truesize of
packet (which include headroom and tailroom for skb_shared_info).

This is done correctly in ixgbe_build_skb(), but in ixgbe_rx_buffer_flip
which is currently only called on XDP_TX and XDP_REDIRECT, it forgets
to add the tailroom for skb_shared_info. This breaks XDP_REDIRECT, for
veth and cpumap.  Fix by adding size of skb_shared_info tailroom.

Maintainers notice: This fix have been queued to Jeff.

Fixes: 6453073987ba ("ixgbe: add initial support for xdp redirect")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Link: https://lore.kernel.org/bpf/158945344946.97035.17031588499266605743.stgit@firesoul
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c