1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/broadcom
Somnath Kotur 8baeef7616 bnxt_en: Fix double DMA unmapping for XDP_REDIRECT
Remove the dma_unmap_page_attrs() call in the driver's XDP_REDIRECT
code path.  This should have been removed when we let the page pool
handle the DMA mapping.  This bug causes the warning:

WARNING: CPU: 7 PID: 59 at drivers/iommu/dma-iommu.c:1198 iommu_dma_unmap_page+0xd5/0x100
CPU: 7 PID: 59 Comm: ksoftirqd/7 Tainted: G        W          6.8.0-1010-gcp #11-Ubuntu
Hardware name: Dell Inc. PowerEdge R7525/0PYVT1, BIOS 2.15.2 04/02/2024
RIP: 0010:iommu_dma_unmap_page+0xd5/0x100
Code: 89 ee 48 89 df e8 cb f2 69 ff 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c0 31 d2 31 c9 31 f6 31 ff 45 31 c0 e9 ab 17 71 00 <0f> 0b 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c0 31 d2 31 c9
RSP: 0018:ffffab1fc0597a48 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff99ff838280c8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffab1fc0597a78 R08: 0000000000000002 R09: ffffab1fc0597c1c
R10: ffffab1fc0597cd3 R11: ffff99ffe375acd8 R12: 00000000e65b9000
R13: 0000000000000050 R14: 0000000000001000 R15: 0000000000000002
FS:  0000000000000000(0000) GS:ffff9a06efb80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000565c34c37210 CR3: 00000005c7e3e000 CR4: 0000000000350ef0
? show_regs+0x6d/0x80
? __warn+0x89/0x150
? iommu_dma_unmap_page+0xd5/0x100
? report_bug+0x16a/0x190
? handle_bug+0x51/0xa0
? exc_invalid_op+0x18/0x80
? iommu_dma_unmap_page+0xd5/0x100
? iommu_dma_unmap_page+0x35/0x100
dma_unmap_page_attrs+0x55/0x220
? bpf_prog_4d7e87c0d30db711_xdp_dispatcher+0x64/0x9f
bnxt_rx_xdp+0x237/0x520 [bnxt_en]
bnxt_rx_pkt+0x640/0xdd0 [bnxt_en]
__bnxt_poll_work+0x1a1/0x3d0 [bnxt_en]
bnxt_poll+0xaa/0x1e0 [bnxt_en]
__napi_poll+0x33/0x1e0
net_rx_action+0x18a/0x2f0

Fixes: 578fcfd26e ("bnxt_en: Let the page pool manage the DMA mapping")
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20240820203415.168178-1-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-08-21 17:36:56 -07:00
..
asp2 net: bcmasp: Fix error code in probe() 2024-07-05 17:13:57 -07:00
bnx2x net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
bnxt bnxt_en: Fix double DMA unmapping for XDP_REDIRECT 2024-08-21 17:36:56 -07:00
genet net: bcmgenet: Properly overlay PHY and MAC Wake-on-LAN capabilities 2024-08-08 08:29:29 -07:00
b44.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
b44.h
bcm63xx_enet.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
bcm63xx_enet.h bcm63xx_enet: convert to build_skb 2021-01-07 12:39:53 -08:00
bcm4908_enet.c net: fill in MODULE_DESCRIPTION()s for Broadcom bgmac 2024-01-24 15:12:20 -08:00
bcm4908_enet.h net: broadcom: rename BCM4908 driver & update DT binding 2021-02-11 15:04:17 -08:00
bcmsysport.c net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
bcmsysport.h net: systemport: Add support for RDMA overflow statistic counter 2022-10-31 20:05:03 -07:00
bgmac-bcma-mdio.c net: fill in MODULE_DESCRIPTION()s for Broadcom bgmac 2024-01-24 15:12:20 -08:00
bgmac-bcma.c net: fill in MODULE_DESCRIPTION()s for Broadcom bgmac 2024-01-24 15:12:20 -08:00
bgmac-platform.c net: fill in MODULE_DESCRIPTION()s for Broadcom bgmac 2024-01-24 15:12:20 -08:00
bgmac.c net: fill in MODULE_DESCRIPTION()s for Broadcom bgmac 2024-01-24 15:12:20 -08:00
bgmac.h bgmac: fix *initial* chip reset to support BCM5358 2023-02-28 11:10:05 +01:00
bnx2.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
bnx2.h bnx2: Drop redundant pci_enable_pcie_error_reporting() 2023-03-08 23:34:38 -08:00
bnx2_fw.h
cnic.c ipv4: Set scope explicitly in ip_route_output(). 2024-04-08 13:20:51 +01:00
cnic.h cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT 2024-03-07 21:52:59 +00:00
cnic_defs.h net: cnic: fix spelling mistake "reserverd" -> "reserved" 2020-02-17 21:59:16 -08:00
cnic_if.h cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT 2024-03-07 21:52:59 +00:00
Kconfig bcmasp: BCMASP should depend on ARCH_BRCMSTB 2023-07-26 21:46:41 -07:00
Makefile net: bcmasp: Add support for ASP2.0 Ethernet controller 2023-07-17 07:39:04 +01:00
sb1250-mac.c net: ethernet: broadcom: Convert to platform remove callback returning void 2023-09-20 09:06:37 +01:00
tg3.c net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
tg3.h ethtool: replace struct ethtool_eee with a new struct ethtool_keee on kernel side 2024-01-31 12:30:47 +00:00
unimac.h net: broadcom: share header defining UniMAC registers 2021-01-08 19:17:28 -08:00