linux-sg2042/drivers/net/ethernet/intel
Björn Töpel 64050b5b87 i40e, xsk: clear the status bits for the next_to_use descriptor
On the Rx side, the next_to_use index points to the next item in the
HW ring to be refilled/allocated, and next_to_clean points to the next
item to potentially be processed.

When the HW Rx ring is fully refilled, i.e. no packets has been
processed, the next_to_use will be next_to_clean - 1. When the ring is
fully processed next_to_clean will be equal to next_to_use. The latter
case is where a bug is triggered.

If the next_to_use bits are not cleared, and the "fully processed"
state is entered, a stale descriptor can be processed.

The skb-path correctly clear the status bit for the next_to_use
descriptor, but the AF_XDP zero-copy path did not do that.

This change adds the status bits clearing of the next_to_use
descriptor.

Fixes: 3b4f0b66c2 ("i40e, xsk: Migrate to new MEM_TYPE_XSK_BUFF_POOL")
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-12-16 10:51:07 -08:00
..
e1000 e1000: remove unused and incorrect code 2020-10-13 19:44:01 -07:00
e1000e e1000e: fix S0ix flow to allow S0i3.2 subset entry 2020-12-09 15:41:34 -08:00
fm10k net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
i40e i40e, xsk: clear the status bits for the next_to_use descriptor 2020-12-16 10:51:07 -08:00
iavf Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-10-05 18:40:01 -07:00
ice ice, xsk: clear the status bits for the next_to_use descriptor 2020-12-16 10:51:07 -08:00
igb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00
igbvf igbvf: Refactor traces 2020-11-24 08:02:24 -08:00
igc igc: Add new device ID 2020-12-10 13:13:24 -08:00
ixgb intel: handle unused assignments 2020-09-25 16:28:59 -07:00
ixgbe Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00
ixgbevf xsk: Propagate napi_id to XDP socket Rx path 2020-12-01 00:09:25 +01:00
Kconfig ice: implement device flash update via devlink 2020-07-28 17:07:06 -07:00
Makefile igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support 2018-10-17 12:14:54 -07:00
e100.c net: e100: Remove in_interrupt() usage and pointless GFP_ATOMIC allocation 2020-09-29 14:02:54 -07:00