mirror-linux/drivers/net
Jason Wang c81fcd4e49 virtio-net: correctly enable callback during start_xmit
[ Upstream commit d71ebe8114 ]

Commit a7766ef18b33("virtio_net: disable cb aggressively") enables
virtqueue callback via the following statement:

        do {
		if (use_napi)
			virtqueue_disable_cb(sq->vq);

		free_old_xmit_skbs(sq, false);

	} while (use_napi && kick &&
               unlikely(!virtqueue_enable_cb_delayed(sq->vq)));

When NAPI is used and kick is false, the callback won't be enabled
here. And when the virtqueue is about to be full, the tx will be
disabled, but we still don't enable tx interrupt which will cause a TX
hang. This could be observed when using pktgen with burst enabled.

TO be consistent with the logic that tries to disable cb only for
NAPI, fixing this by trying to enable delayed callback only when NAPI
is enabled when the queue is about to be full.

Fixes: a7766ef18b ("virtio_net: disable cb aggressively")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-01 08:34:24 +01:00
..
appletalk
arcnet
bonding drivers/net/bonding/bond_3ad: return when there's no aggregator 2023-01-12 12:02:28 +01:00
caif
can
dsa net: dsa: qca8k: fix wrong length value for mgmt eth packet 2023-01-12 12:02:47 +01:00
ethernet net: macb: fix PTP TX timestamp failure due to packet padding 2023-02-01 08:34:24 +01:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154
ipa net: ipa: disable ipa interrupt during suspend 2023-02-01 08:34:22 +01:00
ipvlan
mctp
mdio
netdevsim
pcs
phy net: mdio: validate parameter addr in mdiobus_get_phy() 2023-02-01 08:34:19 +01:00
plip
ppp
pse-pd
slip
team
usb net: usb: sr9700: Handle negative len 2023-02-01 08:34:19 +01:00
vmxnet3 vmxnet3: correctly report csum_level for encapsulated packet 2023-01-12 12:01:58 +01:00
vxlan vxlan: Fix memory leaks in error path 2023-01-12 12:02:25 +01:00
wan net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs 2023-02-01 08:34:17 +01:00
wireguard
wireless wifi: rndis_wlan: Prevent buffer overflow in rndis_query_oid 2023-02-01 08:34:18 +01:00
wwan
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c veth: Fix race with AF_XDP exposing old or uninitialized descriptors 2023-01-12 12:01:59 +01:00
virtio_net.c virtio-net: correctly enable callback during start_xmit 2023-02-01 08:34:24 +01:00
vrf.c net: vrf: determine the dst using the original ifindex for multicast 2023-01-12 12:01:57 +01:00
vsockmon.c
xen-netfront.c