Re: [PATCH net] net: axienet: free outstanding TX buffers in axienet_dma_bd_release()

From: Joe Damato

Date: Mon Sep 28 2026 - 20:12:31 EST


On Sun, Sep 27, 2026 at 11:10:34AM +0300, Sagi Maimon wrote:

[...]

> Walk the TX ring the way axienet_dma_err_handler() already does: unmap
> every descriptor whose cntrl is still set - axienet_free_tx_chain()
> clears it on reclaim - and free any skb still attached.

The code added in this patch and in axienet_dma_err_handler are almost
identical (as your commit message suggests). I am wondering if it's possible
to factor this code out into a helper and instead call it from both places
instead of repeating the same code?