DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Long Li <longli@microsoft.com>
Cc: dev@dpdk.org, Wei Hu <weh@microsoft.com>, stable@dpdk.org
Subject: Re: [PATCH] net/mana: fix RX mempool leak on port stop
Date: Sun, 12 Apr 2026 09:21:02 -0700	[thread overview]
Message-ID: <20260412092102.476e85b8@phoenix.local> (raw)
In-Reply-To: <20260409015519.350034-1-longli@microsoft.com>

On Wed,  8 Apr 2026 18:55:19 -0700
Long Li <longli@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@dpdk.org
> 
> Signed-off-by: Long Li <longli@microsoft.com>

Applied to next-net

      reply	other threads:[~2026-04-12 16:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09  1:55 [PATCH] net/mana: fix RX mempool leak on port stop Long Li
2026-04-12 16:21 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260412092102.476e85b8@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=longli@microsoft.com \
    --cc=stable@dpdk.org \
    --cc=weh@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox