android_kernel_motorola_sm6375/drivers/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jason Xing c4f464cfc0 ixgbe: xsk: resolve the negative overflow of budget in ixgbe_xmit_zc
[ Upstream commit 4d4d9ef9dfee877d494e5418f68a1016ef08cad6 ]

Resolve the budget negative overflow which leads to returning true in
ixgbe_xmit_zc even when the budget of descs are thoroughly consumed.

Before this patch, when the budget is decreased to zero and finishes
sending the last allowed desc in ixgbe_xmit_zc, it will always turn back
and enter into the while() statement to see if it should keep processing
packets, but in the meantime it unexpectedly decreases the value again to
'unsigned int (0--)', namely, UINT_MAX. Finally, the ixgbe_xmit_zc returns
true, showing 'we complete cleaning the budget'. That also means
'clean_complete = true' in ixgbe_poll.

The true theory behind this is if that budget number of descs are consumed,
it implies that we might have more descs to be done. So we should return
false in ixgbe_xmit_zc to tell napi poll to find another chance to start
polling to handle the rest of descs. On the contrary, returning true here
means job done and we know we finish all the possible descs this time and
we don't intend to start a new napi poll.

It is apparently against our expectations. Please also see how
ixgbe_clean_tx_irq() handles the problem: it uses do..while() statement
to make sure the budget can be decreased to zero at most and the negative
overflow never happens.

The patch adds 'likely' because we rarely would not hit the loop condition
since the standard budget is 256.

Fixes: 8221c5eba8 ("ixgbe: add AF_XDP zero-copy Tx support")
Signed-off-by: Jason Xing <[email protected]>
Reviewed-by: Larysa Zaremba <[email protected]>
Reviewed-by: Paul Menzel <[email protected]>
Reviewed-by: Aleksandr Loktionov <[email protected]>
Tested-by: Priya Singh <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2025-08-28 16:21:37 +02:00
..
appletalk
arcnet arcnet: Add NULL check in com20020pci_probe() 2025-04-10 14:29:43 +02:00
bonding bonding: report duplicate MAC address in all situations 2025-06-04 14:32:32 +02:00
caif caif_virtio: fix wrong pointer check in cfv_probe() 2025-03-13 12:43:29 +01:00
can can: kvaser_usb: Assign netdev.dev_port based on device channel index 2025-08-28 16:21:20 +02:00
dsa net: dsa: b53: fix IP_MULTICAST_CTRL on BCM5325 2025-08-28 16:21:27 +02:00
ethernet ixgbe: xsk: resolve the negative overflow of budget in ixgbe_xmit_zc 2025-08-28 16:21:37 +02:00
fddi
fjes
hamradio
hippi
hyperv hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event 2024-11-08 16:20:51 +01:00
ieee802154 ieee802154: ca8210: Use proper setters and getters for bitwise types 2025-06-04 14:32:31 +02:00
ipvlan
netdevsim
phy net: phy: smsc: add proper reset flags for LAN8710A 2025-08-28 16:21:29 +02:00
plip
ppp pptp: fix pptp_xmit() error path 2025-08-28 16:21:22 +02:00
slip slip: make slhc_remember() more robust against malicious packets 2024-11-08 16:20:46 +01:00
team team: better TEAM_OPTION_TYPE_STRING validation 2025-03-13 12:43:12 +01:00
usb net: usbnet: Fix the wrong netif_carrier_on() call 2025-08-28 16:21:33 +02:00
vmxnet3
wan
wimax
wireless wifi: brcmsmac: Remove const from tbl_ptr parameter in wlc_lcnphy_common_read_table() 2025-08-28 16:21:31 +02:00
xen-netback net/xen-netback: prevent UAF in xenvif_flush_hash() 2025-02-01 18:18:53 +01:00
dummy.c
eql.c
geneve.c geneve: Suppress list corruption splat in geneve_destroy_tunnels(). 2025-03-13 12:43:22 +01:00
gtp.c gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl(). 2025-03-13 12:43:22 +01:00
ifb.c
Kconfig drivers: net: Fix Kconfig indentation, continued 2024-11-08 16:20:35 +01:00
LICENSE.SRC
loopback.c net: loopback: Avoid sending IP packets without an Ethernet header 2025-03-13 12:43:24 +01:00
macsec.c macsec: don't increment counters for an unrelated SA 2024-11-08 16:20:49 +01:00
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: revert fix group permission check 2025-03-13 12:43:06 +01:00
veth.c
virtio_net.c virtio-net: ensure the received length does not exceed allocated size 2025-08-28 16:21:16 +02:00
vrf.c vrf: Drop existing dst reference in vrf_ip6_input_dst 2025-08-28 16:21:20 +02:00
vsockmon.c
vxlan.c vxlan: Do not treat dst cache initialization errors as fatal 2025-06-27 11:02:55 +01:00
xen-netfront.c xen/netfront: fix crash when removing device 2024-12-19 18:05:05 +01:00