]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
eth: mlx4: don't try to complete XDP frames in netpoll
authorJakub Kicinski <kuba@kernel.org>
Thu, 13 Feb 2025 01:06:33 +0000 (17:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:38:01 +0000 (14:38 +0200)
[ Upstream commit 8fdeafd66edaf420ea0063a1f13442fe3470fe70 ]

mlx4 doesn't support ndo_xdp_xmit / XDP_REDIRECT and wasn't
using page pool until now, so it could run XDP completions
in netpoll (NAPI budget == 0) just fine. Page pool has calling
context requirements, make sure we don't try to call it from
what is potentially HW IRQ context.

Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20250213010635.1354034-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx4/en_tx.c

index c56b9dba4c71898b61e87fd32e5fa523c313e445..ed695f7443a83d0953671bf32d7b6e79f01f38a4 100644 (file)
@@ -445,6 +445,8 @@ int mlx4_en_process_tx_cq(struct net_device *dev,
 
        if (unlikely(!priv->port_up))
                return 0;
+       if (unlikely(!napi_budget) && cq->type == TX_XDP)
+               return 0;
 
        netdev_txq_bql_complete_prefetchw(ring->tx_queue);