Re: [PATCH net v2 1/4] net: macb: give reasons for Tx SKB kfree

Nicolai Buchwitz
2026-04-28T21:21:42Z

On 28.4.2026 18:32, Théo Lebrun wrote:
> Using dev_consume_skb_any() marks the drop reason as SKB_CONSUMED every
> time we free a Tx SKB. Instead, replace by
> SKB_DROP_REASON_NOT_SPECIFIED
> when packet has been dropped without sending.
>
> It is not precise but at least differs from SKB_CONSUMED and is used by
> many drivers for their error codepaths through
> dev_kfree_skb_{any,irq}().
>
> Pass a reason around rather than call dev_consume_skb_any() or
> dev_kfree_skb_any() because macb_tx_unmap() is called for cleanup in
> all cases.
>
> macb_tx_error_task() is made complex because some SKBs encountered have
> been successfully sent.
>
> Fixes: 89e5785fc8a6 ("[PATCH] Atmel MACB ethernet driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
> ---

> [...]

Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>