Skip to content
Commit 8ee67030 authored by Marouen Ghodhbane's avatar Marouen Ghodhbane Committed by Xiaolei Wang
Browse files

net: stmmac: fix carrier check handling in stmmac_xdp_xmit_zc()

commit d9bfa1d513f1c3c516b1f6fb91d0eb243f92e3da from
https://github.com/nxp-real-time-edge-sw/real-time-edge-linux.git



When using AF_XDP Zero Copy, a cable unplug will make the napi
kernel thread (when using threaded napi) consumes 100% of CPU load
as a result of a continuous napi reschedule, since stmmac_xdp_xmit_zc()
states that there is still work to be done.
The fix is to return work_done as true when carrier is not ok.
A similar fix was provided for ixgbe driver:
"6c7273a2 ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()"

Signed-off-by: default avatarMarouen Ghodhbane <marouen.ghodhbane@nxp.com>
Signed-off-by: default avatarXiaolei Wang <xiaolei.wang@windriver.com>
parent e9cf63b8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment