mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tariq Toukan <tariqt@nvidia.com>
To: Wentao Liang <vulab@iscas.ac.cn>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net/mlx5e: TC, fix internal port leak when a flow is reoffloaded
Date: Mon, 9 Nov 2026 11:46:57 +0200	[thread overview]
Message-ID: <0ca08fe5-0aac-46d0-8801-f7a933a75bf2@nvidia.com> (raw)
In-Reply-To: <20261108132100.315011-1-vulab@iscas.ac.cn>

Hi,

For some reason, this V2 is threaded in the same mail-thread of V1.

On 08/11/2026 15:21, Wentao Liang wrote:
> For a flow originating from an OVS internal port,
> mlx5e_tc_add_fdb_flow() takes a reference on the internal port and stores
> it in the flow's esw attribute.
> 
> If the flow cannot be offloaded because the encap route is not available
> (-ENETUNREACH) on a multipath LAG setup, __mlx5e_add_fdb_flow() keeps the
> flow on the unready list instead of freeing it. When
> mlx5e_tc_reoffload_flows_work() retries, mlx5e_tc_add_fdb_flow() takes
> another reference and overwrites the stored pointer, so the previous
> reference is never dropped.
> 
Thanks for the report, the leak is real.

It is one case of a wider problem, though. A flow kept for re-offload 
holds on to whatever the failed attempt attached, and the next attempt 
attaches it again. Sashiko pointed at other cases on v1 [1]:

IMO we better fix this by releasing what the failed attempt attached 
before the flow is kept for re-offload. That covers the filter device's 
internal port as well, so the check here won't be needed.

We'll post the fix with your Reported-by. Unless you really want to post 
it yourself.

[1] 
https://lore.kernel.org/netdev/179405518707.994134.3869617957663198262@kernel.org/


      parent reply	other threads:[~2026-11-09  9:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 10:28 [PATCH] " Wentao Liang
2026-11-03 10:34 ` netdev-bot+sinfo
2026-11-07 12:39 ` netdev-bot+sashiko
2026-11-08 10:12 ` Tariq Toukan
2026-11-08 13:21   ` [PATCH v2] " Wentao Liang
2026-11-08 14:00     ` Markus Elfring
2026-11-09  9:46     ` Tariq Toukan [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=0ca08fe5-0aac-46d0-8801-f7a933a75bf2@nvidia.com \
    --to=tariqt@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=vulab@iscas.ac.cn \
    /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

all inboxes | Powered by JetHome®