[PATCH net v4] net: axienet: cap the TX poll return value at the NAPI budget

Jakub Kicinski kuba at kernel.org
Thu Oct 1 18:38:14 PDT 2026


On Wed, 30 Sep 2026 10:15:36 +0300 Sagi Maimon wrote:
> @@ -1027,7 +1027,12 @@ static int axienet_tx_poll(struct napi_struct *napi, int budget)
>  		axienet_dma_out32(lp, XAXIDMA_TX_CR_OFFSET, lp->tx_dma_cr);
>  		spin_unlock_irq(&lp->tx_cr_lock);
>  	}
> -	return packets;
> +
> +	/* The whole ring was reclaimed above, which may be more than the
> +	 * budget, but a poll must not report more work than it was given.
> +	 * netpoll polls with a budget of 0 and expects no work reported.
> +	 */
> +	return min(packets, budget);

Please take a look at commit a58cdf56b6e, that's the correct approach
(incl. feeding 0 to napi_complete_done).
-- 
pw-bot: cr



More information about the linux-arm-kernel mailing list