linux-sg2042/drivers/net/ethernet/intel/i40e
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
..
Makefile i40e: Implement DDP support in i40e driver 2019-04-16 15:10:21 -07:00
i40e.h i40e: Fix removing driver while bare-metal VFs pass traffic 2020-11-23 16:52:59 -08:00
i40e_adminq.c i40e: Allow changing FEC settings on X722 if supported by FW 2020-10-13 19:44:01 -07:00
i40e_adminq.h intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
i40e_adminq_cmd.h i40e: Allow changing FEC settings on X722 if supported by FW 2020-10-13 19:44:01 -07:00
i40e_alloc.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_client.c intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
i40e_common.c intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
i40e_dcb.c i40e: Fix for persistent lldp support 2019-10-25 13:38:19 -07:00
i40e_dcb.h i40e: remove unused defines 2020-06-25 22:25:13 -07:00
i40e_dcb_nl.c i40e/i40evf: cleanup incorrect function doxygen comments 2018-04-30 09:09:04 -07:00
i40e_ddp.c i40e: Implement DDP support in i40e driver 2019-04-16 15:10:21 -07:00
i40e_debugfs.c i40e: use 16B HW descriptors instead of 32B 2020-09-14 09:45:35 -07:00
i40e_devids.h i40e: Add support for 5Gbps cards 2020-06-25 22:25:13 -07:00
i40e_diag.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_diag.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_ethtool.c i40e: Allow changing FEC settings on X722 if supported by FW 2020-10-13 19:44:01 -07:00
i40e_hmc.c i40e: Implement debug macro hw_dbg using dev_dbg 2019-09-09 11:22:20 -07:00
i40e_hmc.h i40e: remove unused defines 2020-06-25 22:25:13 -07:00
i40e_lan_hmc.c treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
i40e_lan_hmc.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_main.c i40e: Fix removing driver while bare-metal VFs pass traffic 2020-11-23 16:52:59 -08:00
i40e_nvm.c i40e: Fix for persistent lldp support 2019-10-25 13:38:19 -07:00
i40e_osdep.h i40e: remove unused defines 2020-06-25 22:25:13 -07:00
i40e_prototype.h i40e: Make i40e_shutdown_adminq() return void 2020-05-28 20:19:47 -07:00
i40e_ptp.c intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
i40e_register.h i40e: detect and log info about pre-recovery mode 2020-06-25 22:25:13 -07:00
i40e_status.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
i40e_trace.h intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
i40e_txrx.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00
i40e_txrx.h i40e: Use batched xsk Tx interfaces to increase performance 2020-11-17 22:07:40 +01:00
i40e_txrx_common.h intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
i40e_type.h i40e: Allow changing FEC settings on X722 if supported by FW 2020-10-13 19:44:01 -07:00
i40e_virtchnl_pf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-27 18:25:27 -08:00
i40e_virtchnl_pf.h i40e: remove unused defines 2020-06-25 22:25:13 -07:00
i40e_xsk.c i40e, xsk: clear the status bits for the next_to_use descriptor 2020-12-16 10:51:07 -08:00
i40e_xsk.h i40e: Use batched xsk Tx interfaces to increase performance 2020-11-17 22:07:40 +01:00