linux/drivers/net
Somnath Kotur 3cdf199d47 bnxt_en: Set DMA unmap len correctly for XDP_REDIRECT
When transmitting an XDP_REDIRECT packet, call dma_unmap_len_set()
with the proper length instead of 0.  This bug triggers this warning
on a system with IOMMU enabled:

WARNING: CPU: 36 PID: 0 at drivers/iommu/dma-iommu.c:842 __iommu_dma_unmap+0x159/0x170
RIP: 0010:__iommu_dma_unmap+0x159/0x170
Code: a8 00 00 00 00 48 c7 45 b0 00 00 00 00 48 c7 45 c8 00 00 00 00 48 c7 45 a0 ff ff ff ff 4c 89 45
b8 4c 89 45 c0 e9 77 ff ff ff <0f> 0b e9 60 ff ff ff e8 8b bf 6a 00 66 66 2e 0f 1f 84 00 00 00 00
RSP: 0018:ff22d31181150c88 EFLAGS: 00010206
RAX: 0000000000002000 RBX: 00000000e13a0000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ff22d31181150cf0 R08: ff22d31181150ca8 R09: 0000000000000000
R10: 0000000000000000 R11: ff22d311d36c9d80 R12: 0000000000001000
R13: ff13544d10645010 R14: ff22d31181150c90 R15: ff13544d0b2bac00
FS: 0000000000000000(0000) GS:ff13550908a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005be909dacff8 CR3: 0008000173408003 CR4: 0000000000f71ef0
PKRU: 55555554
Call Trace:
<IRQ>
? show_regs+0x6d/0x80
? __warn+0x89/0x160
? __iommu_dma_unmap+0x159/0x170
? report_bug+0x17e/0x1b0
? handle_bug+0x46/0x90
? exc_invalid_op+0x18/0x80
? asm_exc_invalid_op+0x1b/0x20
? __iommu_dma_unmap+0x159/0x170
? __iommu_dma_unmap+0xb3/0x170
iommu_dma_unmap_page+0x4f/0x100
dma_unmap_page_attrs+0x52/0x220
? srso_alias_return_thunk+0x5/0xfbef5
? xdp_return_frame+0x2e/0xd0
bnxt_tx_int_xdp+0xdf/0x440 [bnxt_en]
__bnxt_poll_work_done+0x81/0x1e0 [bnxt_en]
bnxt_poll+0xd3/0x1e0 [bnxt_en]

Fixes: f18c2b77b2 ("bnxt_en: optimized XDP_REDIRECT support")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20250710213938.1959625-4-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-07-11 07:28:34 -07:00
..
arcnet treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
bonding net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
caif
can can: m_can: m_can_handle_lost_msg(): downgrade msg lost in rx message to debug level 2025-07-11 12:18:58 +02:00
dsa Including fixes from bluetooth and wireless. 2025-06-12 09:50:36 -07:00
ethernet bnxt_en: Set DMA unmap len correctly for XDP_REDIRECT 2025-07-11 07:28:34 -07:00
fddi treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
fjes
hamradio treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
hippi treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
hyperv hv_netvsc: fix potential deadlock in netvsc_vf_setxdp() 2025-05-30 19:31:25 -07:00
ieee802154
ipa
ipvlan
mctp net: mctp: start tx queue on netdev open 2025-05-27 17:23:19 -07:00
mdio
netdevsim net: drv: netdevsim: don't napi_complete() from netpoll 2025-06-12 08:11:52 -07:00
ovpn ovpn: avoid sleep in atomic context in TCP RX error path 2025-06-03 13:08:15 +02:00
pcs
phy net: phy: microchip: limit 100M workaround to link-down events on LAN88xx 2025-07-10 18:08:16 -07:00
plip
ppp
pse-pd
slip treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
team net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
thunderbolt
usb net: usb: lan78xx: fix WARN in __netif_napi_del_locked on disconnect 2025-06-30 18:26:22 -07:00
vmxnet3 vmxnet3: correctly report gso type for UDP tunnels 2025-06-03 11:54:26 +02:00
vxlan treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
wan treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
wireguard treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
wireless wifi: mt76: mt792x: Limit the concurrent STA and SoftAP to operate on the same channel 2025-07-07 18:07:43 +02:00
wwan net: wwan: mhi_wwan_mbim: use correct mux_id for multiplexing 2025-06-05 12:27:20 +02:00
xen-netback treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c macsec: MACsec SCI assignment for ES = 0 2025-06-11 10:12:01 +01:00
macvlan.c net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c netconsole: fix appending sysdata when sysdata_fields == SYSDATA_RELEASE 2025-06-10 15:52:08 -07:00
netkit.c
nlmon.c
ntb_netdev.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
pfcp.c
rionet.c
sungem_phy.c
tap.c net: core: Convert dev_set_mac_address_user() to use struct sockaddr_storage 2025-05-27 08:25:43 +02:00
tun.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
tun_vnet.h
veth.c veth: prevent NULL pointer dereference in veth_xdp_rcv 2025-06-12 08:08:32 -07:00
virtio_net.c virtio_net: Enforce minimum TX ring size for reliability 2025-07-03 11:40:02 +02:00
vrf.c
vsockmon.c
xen-netfront.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00