linux-stable/drivers/net
Eric Pilmore 5f7d78b2b1 ntb_netdev: Use dev_kfree_skb_any() in interrupt context
TX/RX callback handlers (ntb_netdev_tx_handler(),
ntb_netdev_rx_handler()) can be called in interrupt
context via the DMA framework when the respective
DMA operations have completed. As such, any calls
by these routines to free skb's, should use the
interrupt context safe dev_kfree_skb_any() function.

Previously, these callback handlers would call the
interrupt unsafe version of dev_kfree_skb(). This has
not presented an issue on Intel IOAT DMA engines as
that driver utilizes tasklets rather than a hard
interrupt handler, like the AMD PTDMA DMA driver.
On AMD systems, a kernel WARNING message is
encountered, which is being issued from
skb_release_head_state() due to in_hardirq()
being true.

Besides the user visible WARNING from the kernel,
the other symptom of this bug was that TCP/IP performance
across the ntb_netdev interface was very poor, i.e.
approximately an order of magnitude below what was
expected. With the repair to use dev_kfree_skb_any(),
kernel WARNINGs from skb_release_head_state() ceased
and TCP/IP performance, as measured by iperf, was on
par with expected results, approximately 20 Gb/s on
AMD Milan based server. Note that this performance
is comparable with Intel based servers.

Fixes: 765ccc7bc3 ("ntb_netdev: correct skb leak")
Fixes: 548c237c0a ("net: Add support for NTB virtual ethernet device")
Signed-off-by: Eric Pilmore <epilmore@gigaio.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20221209000659.8318-1-epilmore@gigaio.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-12-12 12:56:37 -08:00
..
appletalk
arcnet arcnet: fix potential memory leak in com20020_probe() 2022-11-23 12:41:54 +00:00
bonding bonding: get correct NA dest address 2022-12-06 20:20:38 -08:00
caif
can can: esd_usb: Allow REC and TEC to return to zero 2022-12-07 10:32:48 +01:00
dsa net: lan9303: Fix read error execution path 2022-12-12 12:53:56 -08:00
ethernet net: amd-xgbe: Check only the minimum speed for active/passive cables 2022-12-12 10:05:36 +00:00
fddi net: defxx: Fix missing err handling in dfx_init() 2022-12-09 10:44:27 +00:00
fjes
hamradio hamradio: don't call dev_kfree_skb() under spin_lock_irqsave() 2022-12-12 09:56:17 +00:00
hippi
hyperv net: hv_netvsc: Fix a warning triggered by memcpy in rndis_filter 2022-10-15 11:09:53 +01:00
ieee802154 ca8210: Fix crash by zero initializing data 2022-11-29 14:56:05 +01:00
ipa net: ipa: don't configure IDLE_INDICATION on v3.1 2022-10-25 19:49:13 -07:00
ipvlan ipvlan: hold lower dev to avoid possible use-after-free 2022-11-18 10:39:22 +00:00
mctp mctp i2c: don't count unused / invalid keys for flow release 2022-11-11 20:13:27 -08:00
mdio net: mdio: fix unbalanced fwnode reference count in mdio_device_release() 2022-12-06 12:50:00 +01:00
netdevsim netdevsim: Fix memory leak of nsim_dev->fa_cookie 2022-11-16 12:20:57 -08:00
pcs
phy net: phy: mxl-gpy: add MDINT workaround 2022-12-07 20:04:11 -08:00
plip net: plip: don't call kfree_skb/dev_kfree_skb() under spin_lock_irq() 2022-12-07 20:10:47 -08:00
ppp
pse-pd net: pse-pd: PSE_REGULATOR should depend on REGULATOR 2022-10-05 20:32:28 -07:00
slip
team
usb net/cdc_ncm: Fix multicast RX support for CDC NCM devices with ZLP 2022-11-23 13:46:42 +00:00
vmxnet3 vmxnet3: use correct intrConf reference when using extended queues 2022-12-02 10:30:07 +00:00
vxlan
wan net: farsync: Fix kmemleak when rmmods farsync 2022-12-12 09:42:45 +00:00
wireguard treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
wireless wifi: wilc1000: validate number of channels 2022-11-24 18:11:23 +02:00
wwan net: wwan: iosm: fix memory leak in ipc_mux_init() 2022-12-06 11:39:35 +01:00
xen-netback xen/netback: fix build warning 2022-12-07 16:03:21 +01:00
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig - Yu Zhao's Multi-Gen LRU patches are here. They've been under test in 2022-10-10 17:53:04 -07:00
LICENSE.SRC
loopback.c net: loopback: use NET_NAME_PREDICTABLE for name_assign_type 2022-11-25 09:39:05 +00:00
macsec.c macsec: add missing attribute validation for offload 2022-12-08 09:12:18 -08:00
macvlan.c net: macvlan: Use built-in RCU list checking 2022-11-14 10:50:02 +00:00
macvtap.c
Makefile net: add framework to support Ethernet PSE and PDs devices 2022-10-03 17:33:56 -07:00
mdio.c
mhi_net.c net: mhi: Fix memory leak in mhi_net_dellink() 2022-11-14 11:21:02 +00:00
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c ntb_netdev: Use dev_kfree_skb_any() in interrupt context 2022-12-12 12:56:37 -08:00
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c net: thunderbolt: fix memory leak in tbnet_open() 2022-12-08 09:07:37 -08:00
tun.c net: tun: Fix use-after-free in tun_detach() 2022-11-29 12:14:15 +01:00
veth.c
virtio_net.c virtio_net: Fix probe failed when modprobe virtio_net 2022-11-24 09:26:35 +01:00
vrf.c
vsockmon.c
xen-netfront.c xen-netfront: Fix NULL sring after live migration 2022-12-05 11:35:29 +00:00