linux/drivers/net/ethernet
Maciej Fijalkowski d1ec975f9f ice: xsk: clear status_error0 for each allocated desc
Fix a bug in which the receiving of packets can stop in the zero-copy
driver. Ice HW ignores 3 lower bits from QRX_TAIL register, which means
that tail is bumped only on intervals of 8. Currently with XSK RX
batching in place, ice_alloc_rx_bufs_zc() clears the status_error0 only
of the last descriptor that has been allocated/taken from the XSK buffer
pool. status_error0 includes DD bit that is looked upon by the
ice_clean_rx_irq_zc() to tell if a descriptor can be processed.

The bug can be triggered when driver updates the ntu but not the
QRX_TAIL, so HW wouldn't have a chance to write to the ready
descriptors. Later on driver moves the ntc to the mentioned set of
descriptors and interprets them as a ready to be processed, since
corresponding DD bits were not cleared nor any writeback has happened
that would clear it. This can then lead to ntc == ntu case which means
that ring is empty and no further packet processing.

Fix the XSK traffic hang that can be observed when l2fwd scenario from
xdpsock is used by making sure that status_error0 is cleared for each
descriptor that is fed to HW and therefore we are sure that driver will
not processed non-valid DD bits. This will also prevent the driver from
processing the descriptors that were allocated in favor of the
previously processed ones, but writeback didn't happen yet.

Fixes: db804cfc21 ("ice: Use the xsk batched rx allocation interface")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-30 12:09:33 +00:00
..
3com ethernet: replace netdev->dev_addr 16bit writes 2021-10-14 09:22:27 -07:00
8390 ethernet: 8390: remove direct netdev->dev_addr writes 2021-10-09 11:46:57 +01:00
actions ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
adaptec ethernet: adaptec: use eth_hw_addr_set() 2021-10-16 08:53:45 +01:00
aeroflex ethernet: aeroflex: use eth_hw_addr_set() 2021-10-16 08:53:45 +01:00
agere ethernet: use eth_hw_addr_set() instead of ether_addr_copy() 2021-10-02 14:18:25 +01:00
alacritech ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
allwinner ethernet: use of_get_ethdev_address() 2021-10-07 13:39:51 +01:00
alteon ethernet: alteon: use eth_hw_addr_set() 2021-10-16 08:53:46 +01:00
altera ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
amazon ethernet: use eth_hw_addr_set() instead of ether_addr_copy() 2021-10-02 14:18:25 +01:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-11-01 20:05:14 -07:00
apm ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
apple ethernet: replace netdev->dev_addr assignment loops 2021-10-14 09:22:25 -07:00
aquantia atlantic: Remove warn trace message. 2021-11-29 14:24:22 +00:00
arc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-14 16:50:14 -07:00
asix net: ax88796c: do not receive data in pointer 2021-11-22 14:32:05 +00:00
atheros net: convert users of bitmap_foo() to linkmode_foo() 2021-10-24 13:58:52 +01:00
broadcom bnxt_en: Fix compile error regression when CONFIG_BNXT_SRIOV is not set 2021-11-16 18:58:14 -08:00
brocade ethernet: Remove redundant 'flush_workqueue()' calls 2021-10-10 11:33:15 +01:00
cadence net: macb: Fix mdio child node detection 2021-10-27 17:12:18 -07:00
calxeda ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
cavium net: liquidio: Make use of the helper macro kthread_run() 2021-10-22 11:10:10 -07:00
chelsio net: chelsio: cxgb4vf: Fix an error code in cxgb4vf_pci_probe() 2021-11-23 12:15:53 +00:00
cirrus ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
cisco ethernet: enic: use eth_hw_addr_set() 2021-10-16 08:53:46 +01:00
cortina ethernet: make use of eth_hw_addr_random() where appropriate 2021-10-14 09:22:15 -07:00
davicom ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
dec net: ethernet: dec: tulip: de4x5: fix possible array overflows in type3_infoblock() 2021-11-18 12:03:17 +00:00
dlink ethernet: replace netdev->dev_addr 16bit writes 2021-10-14 09:22:27 -07:00
emulex ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
ezchip ethernet: use of_get_ethdev_address() 2021-10-07 13:39:51 +01:00
faraday ethernet: make more use of device_get_ethdev_address() 2021-10-07 13:39:51 +01:00
freescale net: dpaa2-eth: fix use-after-free in dpaa2_eth_remove 2021-11-17 14:47:07 +00:00
fujitsu ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
google gve: fix unmatched u64_stats_update_end() 2021-11-10 14:42:25 +00:00
hisilicon net: hns3: fix incorrect components info of ethtool --reset command 2021-11-26 11:36:29 -08:00
huawei net: convert users of bitmap_foo() to linkmode_foo() 2021-10-24 13:58:52 +01:00
i825xx ethernet: replace netdev->dev_addr assignment loops 2021-10-14 09:22:25 -07:00
ibm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-11-01 20:05:14 -07:00
intel ice: xsk: clear status_error0 for each allocated desc 2021-11-30 12:09:33 +00:00
litex litex_liteeth: Fix a double free in the remove function 2021-11-07 21:51:17 +00:00
marvell net: marvell: mvpp2: Fix the computation of shared CPUs 2021-11-30 12:05:16 +00:00
mediatek ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
mellanox net/mlx4_en: Update reported link modes for 1/10G 2021-11-29 13:03:32 +00:00
micrel ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
microchip lan743x: fix deadlock in lan743x_phy_link_status_change() 2021-11-24 18:19:58 -08:00
microsoft net: mana: Fix spelling mistake "calledd" -> "called" 2021-11-09 19:16:55 -08:00
moxa ethernet: use eth_hw_addr_set() for dev->addr_len cases 2021-10-05 13:16:48 +01:00
mscc net: mscc: ocelot: fix missing unlock on error in ocelot_hwstamp_set() 2021-11-29 20:20:34 -08:00
myricom ethernet: replace netdev->dev_addr assignment loops 2021-10-14 09:22:25 -07:00
natsemi ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
neterion Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-14 16:50:14 -07:00
netronome nfp: checking parameter process for rx-usecs/tx-usecs is invalid 2021-11-22 12:44:45 +00:00
ni nixge: fix mac address error handling again 2021-11-22 15:05:48 +00:00
nvidia ethernet: forcedeth: remove direct netdev->dev_addr writes 2021-10-09 11:46:56 +01:00
nxp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-28 10:43:58 -07:00
oki-semi ethernet: use eth_hw_addr_set() for dev->addr_len cases 2021-10-05 13:16:48 +01:00
packetengines ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
pasemi ethernet: manually convert memcpy(dev_addr,..., sizeof(addr)) 2021-10-14 09:22:19 -07:00
pensando net: convert users of bitmap_foo() to linkmode_foo() 2021-10-24 13:58:52 +01:00
qlogic net: qed: fix the array may be out of bound 2021-11-26 11:29:20 -08:00
qualcomm ethernet: make use of eth_hw_addr_random() where appropriate 2021-10-14 09:22:15 -07:00
rdc ethernet: replace netdev->dev_addr 16bit writes 2021-10-14 09:22:27 -07:00
realtek r8169: fix incorrect mac address assignment 2021-11-23 12:12:37 +00:00
renesas ethernet: renesas: use eth_hw_addr_set() 2021-10-19 12:41:47 +01:00
rocker ethernet: rocker: use eth_hw_addr_set() 2021-10-19 12:41:47 +01:00
samsung ethernet: sxgbe: use eth_hw_addr_set() 2021-10-19 12:41:48 +01:00
seeq ethernet: use eth_hw_addr_set() for dev->addr_len cases 2021-10-05 13:16:48 +01:00
sfc sfc: use swap() to make code cleaner 2021-11-05 10:14:38 +00:00
sgi ethernet: use eth_hw_addr_set() for dev->addr_len cases 2021-10-05 13:16:48 +01:00
silan ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
sis ethernet: sis900: fix indentation 2021-11-12 20:13:28 -08:00
smsc ethernet: smsc: use eth_hw_addr_set() 2021-10-19 12:41:48 +01:00
socionext ethernet: netsec: use eth_hw_addr_set() 2021-10-20 11:41:01 +01:00
stmicro net: stmmac: Avoid DMA_CHAN_CONTROL write if no Split Header support 2021-11-29 12:08:05 +00:00
sun ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
synopsys ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
tehuti ethernet: tehuti: use eth_hw_addr_set() 2021-10-20 11:41:01 +01:00
ti net: ethernet: ti: cpsw_ale: Fix access to un-initialized memory 2021-11-10 14:33:04 +00:00
toshiba ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
tundra
via ethernet: via-velocity: use eth_hw_addr_set() 2021-10-20 11:41:01 +01:00
wiznet net: w5100: Make w5100_remove() return void 2021-10-18 12:59:12 +01:00
xilinx net: convert users of bitmap_foo() to linkmode_foo() 2021-10-24 13:58:52 +01:00
xircom ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
xscale net: ethernet: ixp4xx: Make use of dma_pool_zalloc() instead of dma_pool_alloc/memset() 2021-10-19 13:24:26 +01:00
dnet.c ethernet: manually convert memcpy(dev_addr,..., sizeof(addr)) 2021-10-14 09:22:19 -07:00
dnet.h
ec_bhf.c ethernet: ec_bhf: use eth_hw_addr_set() 2021-10-16 08:53:46 +01:00
ethoc.c ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
fealnx.c ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
jme.c ethernet: use eth_hw_addr_set() for dev->addr_len cases 2021-10-05 13:16:48 +01:00
jme.h
Kconfig net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver 2021-10-21 16:28:41 -07:00
korina.c ethernet: use of_get_ethdev_address() 2021-10-07 13:39:51 +01:00
lantiq_etop.c net: ethernet: lantiq_etop: fix build errors/warnings 2021-11-15 14:08:52 +00:00
lantiq_xrx200.c net: lantiq_xrx200: Hardcode the burst length value 2021-10-29 12:15:35 +01:00
Makefile net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver 2021-10-21 16:28:41 -07:00