https://github.com/torvalds/linux
Revision bf280c0387ebbf8eebad1036fca8f7b85ebfde32 authored by Ilya Maximets on 22 August 2019, 17:12:37 UTC, committed by Jeff Kirsher on 11 September 2019, 16:42:18 UTC
Tx code doesn't clear the descriptors' status after cleaning.
So, if the budget is larger than number of used elems in a ring, some
descriptors will be accounted twice and xsk_umem_complete_tx will move
prod_tail far beyond the prod_head breaking the completion queue ring.

Fix that by limiting the number of descriptors to clean by the number
of used descriptors in the Tx ring.

'ixgbe_clean_xdp_tx_irq()' function refactored to look more like
'ixgbe_xsk_clean_tx_ring()' since we're allowed to directly use
'next_to_clean' and 'next_to_use' indexes.

CC: stable@vger.kernel.org
Fixes: 8221c5eba8c1 ("ixgbe: add AF_XDP zero-copy Tx support")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 377228a
History
Tip revision: bf280c0387ebbf8eebad1036fca8f7b85ebfde32 authored by Ilya Maximets on 22 August 2019, 17:12:37 UTC
ixgbe: fix double clean of Tx descriptors with xdp
Tip revision: bf280c0
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 14.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.7 KB
.mailmap -rw-r--r-- 12.5 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 97.1 KB
Kbuild -rw-r--r-- 1.5 KB
Kconfig -rw-r--r-- 595 bytes
MAINTAINERS -rw-r--r-- 510.9 KB
Makefile -rw-r--r-- 59.7 KB
README -rw-r--r-- 727 bytes

README

back to top