From: Paolo Abeni <pabeni@redhat.com>
To: Yangyu Chen <cyy@cyyself.name>,
Sukhdeep Singh <sukhdeeps@marvell.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>
Cc: Mina Almasry <almasrymina@google.com>,
Jesper Dangaard Brouer <hawk@kernel.org>,
Richard Cochran <richardcochran@gmail.com>,
Lino Sanfilippo <LinoSanfilippo@gmx.de>,
Igor Russkikh <irusskikh@marvell.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/3] net: atlantic: free stranded TX buffers on ring deinit
Date: Thu, 30 Jul 2026 12:13:11 +0200 [thread overview]
Message-ID: <fe135316-72d1-4347-aaac-aa2164bcdd4d@redhat.com> (raw)
In-Reply-To: <tencent_E5DA048E95B86B31EB21258D8E7CE1825308@qq.com>
On 7/24/26 11:01 AM, Yangyu Chen wrote:
> aq_vec_deinit() drains the TX rings with a single aq_ring_tx_clean()
> call, which frees at most AQ_CFG_TX_CLEAN_BUDGET (256) descriptors and
> stops at hw_head, which no longer moves once aq_vec_stop() has stopped
> the hardware and NAPI. Completed descriptors beyond the budget and
> everything still posted in [hw_head, sw_tail) keep their skb or
> xdp_frame when the interface goes down: aq_vec_ring_free() then frees
> the buffer ring and the references are lost for good.
>
> Today this is a silent memory leak on every interface down under
> TX/XDP_TX load. With the following conversion of the RX path to
> page_pool it becomes much more visible: XDP_TX frames carry fragment
> references on the RX ring's page_pool, so a single stranded frame
> keeps the pool's inflight count above zero forever. page_pool_destroy()
> then never completes, the pool is leaked together with its pages, and
> "page_pool_release_retry() stalled pool shutdown" is warned every 60
> seconds from that point on, on every ifdown, XDP detach or ring resize
> under XDP_TX load.
>
> Bring back aq_ring_tx_deinit() as it was before the removal and use it
> for teardown again, with one extension: TX rings can hold xdp_frames
> nowadays, so release those too. They are returned with
> xdp_return_frame() since this runs in process context.
>
> Fixes: eb36bedf28be ("net: aquantia: remove function aq_ring_tx_deinit")
> Cc: stable@vger.kernel.org # v4.11+
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Yangyu Chen <cyy@cyyself.name>
You missed a relevant point from Mina's feedback: this is 'net'
material. We don't want fixes tag in net-next addressing bug in previous
releases.
You need to send this to 'net', wait for the commit to reach net-next
and resend patches 2 and 3 after that.
/P
next prev parent reply other threads:[~2026-07-30 10:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 9:00 [PATCH net-next v2 0/3] net: atlantic: convert RX path to page_pool Yangyu Chen
2026-07-24 9:01 ` [PATCH net-next v2 1/3] net: atlantic: free stranded TX buffers on ring deinit Yangyu Chen
2026-07-24 12:57 ` [EXTERNAL] " Sukhdeep Soni [C]
2026-07-30 10:13 ` Paolo Abeni [this message]
2026-07-24 9:02 ` [PATCH net-next v2 2/3] net: atlantic: free RX pages of consumed but not refilled buffers Yangyu Chen
2026-07-24 13:01 ` [EXTERNAL] " Sukhdeep Soni [C]
2026-07-24 9:02 ` [PATCH net-next v2 3/3] net: atlantic: convert RX path to page_pool Yangyu Chen
2026-07-24 13:37 ` [EXTERNAL] " Sukhdeep Soni [C]
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=fe135316-72d1-4347-aaac-aa2164bcdd4d@redhat.com \
--to=pabeni@redhat.com \
--cc=LinoSanfilippo@gmx.de \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=bpf@vger.kernel.org \
--cc=cyy@cyyself.name \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=irusskikh@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=stable@vger.kernel.org \
--cc=sukhdeeps@marvell.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