[PATCH] net/mana: fix RX mempool leak on port stop

Stephen Hemminger stephen at networkplumber.org
Sun Apr 12 18:21:02 CEST 2026


On Wed,  8 Apr 2026 18:55:19 -0700
Long Li <longli at microsoft.com> wrote:

> The RX descriptor ring drain loop in mana_stop_rx_queues() uses
> 'while (tail != head)' to free posted mbufs. The RX ring is likely
> completely full because every consumed WQE is immediately replenished,
> so head == tail when the ring is full. The drain loop never executes,
> leaking all RX mbufs on every port stop.
> 
> Fix by adding a desc_ring_len counter to mana_rxq (matching mana_txq)
> and using 'while (desc_ring_len > 0)' as the drain condition. Apply
> the same change to the TX drain loop for consistency.
> 
> Fixes: 5f705ac26259 ("net/mana: start/stop Rx queues")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Long Li <longli at microsoft.com>

Applied to next-net


More information about the dev mailing list