net: fec: tx processing does not call XDP APIs if budget is 0
authorWei Fang <wei.fang@nxp.com>
Tue, 25 Jul 2023 07:41:48 +0000 (15:41 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Jul 2023 04:12:12 +0000 (21:12 -0700)
commit15cec633fc7bfe4cd69aa012c3b35b31acfc86f2
tree1cc038408e6650e4beb5d5252e60df7051dcc4e8
parent2e3c5df2ee89d01c4dc6c30b4366375d3cf942bd
net: fec: tx processing does not call XDP APIs if budget is 0

According to the clarification [1] in the latest napi.rst, the tx
processing cannot call any XDP (or page pool) APIs if the "budget"
is 0. Because NAPI is called with the budget of 0 (such as netpoll)
indicates we may be in an IRQ context, however, we cannot use the
page pool from IRQ context.

[1] https://lore.kernel.org/all/20230720161323.2025379-1-kuba@kernel.org/

Fixes: 20f797399035 ("net: fec: recycle pages for transmitted XDP frames")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20230725074148.2936402-1-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/fec_main.c