net: hisilicon: hisi_femac: Stop the receiver before releasing the RX ring
PATCH 1/1 net: hisilicon: hisi_femac: Stop the receiver before releasing the RX ring
hisi_femac_net_close() frees the receive ring while the RX address queue still holds every address that was pushed to IQ_ADDR.
A port that keeps receiving then DMAs arrived frames into buffers that other slab caches have already taken back; on an EC6108V9C (hi3798mv100) the queue still held all 52 armed addresses right after the interface was closed, and had dropped to 43 after 15 s of broadcast traffic.
Reset the port before the buffers are released, so that the receiver no longer holds any of their addresses.
--- drivers/net/ethernet/hisilicon/hisi_femac.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/hisilicon/hisi_femac.c +1 -0
@@ -491,6 +491,7 @@ static int hisi_femac_net_close(struct net_device *dev)netif_stop_queue (dev);napi_disable (&priv->napi); +hisi_femac_port_reset (priv);hisi_femac_free_skb_rings (priv);return 0 ;
Signature · 1 line
2.53.0
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Mon, 26 Oct 2026 02:20:18 +0800 you wrote:
hisi_femac_net_close()frees the receive ring while the RX address queue still holds every address that was pushed toIQ_ADDR.A port that keeps receiving then DMAs arrived frames into buffers that other slab caches have already taken back; on an EC6108V9C (hi3798mv100) the queue still held all 52 armed addresses right after the interface was closed, and had dropped to 43 after 15 s of broadcast traffic.
[...]
Here is the summary with links:
- [net] net: hisilicon: hisi_femac: Stop the receiver before releasing the RX ring
https://git.kernel.org/netdev/net/c/d54b21d82430
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html