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: Marouen Ghodhbane <marouen.ghodhbane@nxp.com> Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Please register or sign in to comment