From: Raslan Darawsheh <rasland@nvidia.com>
To: Bing Zhao <bingz@nvidia.com>, viacheslavo@nvidia.com, dev@dpdk.org
Cc: orika@nvidia.com, dsosnowski@nvidia.com, suanmingm@nvidia.com,
matan@nvidia.com, thomas@monjalon.net, shperetz@nvidia.com,
stable@dpdk.org
Subject: Re: [PATCH] net/mlx5: fix the counters resource leak
Date: Tue, 6 Jan 2026 15:14:32 +0200 [thread overview]
Message-ID: <3270422c-4e68-4dec-9fb9-bccaa7e9ce48@nvidia.com> (raw)
In-Reply-To: <20260105070558.71556-1-bingz@nvidia.com>
Hi,
On 05/01/2026 9:05 AM, Bing Zhao wrote:
> The counters that are used to record the dropped packets (including
> hairpin) are created firstly. Then the counter objects are provided
> to the command to create the Rx queues, and they are used for the
> global drop and hairpin queues drop statistics. One counter can be
> associated with more than one queue in hairpin case.
>
> So the reference count of a counter will be increased once attached
> to a queue. When closing the device, the queues and counters should
> be destroyed in the reverse order. The queues should be destroyed
> firstly in order to decrease the reference count of attached counter
> properlly. Then the counter can be recycled successfully. Or else the
> resource will be leaked before the application quits when doing port
> attach / detach rerepeatedly.
>
> Fixes: f0c0731b6d40 ("net/mlx5: add counters for hairpin drop")
> Cc: shperetz@nvidia.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Bing Zhao <bingz@nvidia.com>
> Acked-by: Suanming Mou <suanmingm@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
prev parent reply other threads:[~2026-01-06 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 7:05 Bing Zhao
2026-01-06 13:14 ` Raslan Darawsheh [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=3270422c-4e68-4dec-9fb9-bccaa7e9ce48@nvidia.com \
--to=rasland@nvidia.com \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=shperetz@nvidia.com \
--cc=stable@dpdk.org \
--cc=suanmingm@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.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;
as well as URLs for NNTP newsgroup(s).