Re: [PATCH net 1/2] net: atlantic: free stranded TX buffers on ring deinit
Mina Almasry <[email protected]> Mon, 3 Aug 2026 11:31:56 -0700
| Newsgroups | org.kernel.vger.bpf,org.kernel.vger.linux-kernel,org.kernel.vger.netdev,org.kernel.vger.stable |
|---|---|
| Message-ID | <CAHS8izPdDV88eP90R2sVa_dLUy=btQWTHJ804g5TrDh_2xKKLw@mail.gmail.com> |
On Sun, Aug 2, 2026 at 8:46=E2=80=AFAM Yangyu Chen <[email protected]> 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 conversion of the RX path to page_pool posted > for net-next 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: [email protected] # v4.11+ > Reviewed-by: Sukhdeep Singh <[email protected]> > Assisted-by: Claude:claude-fable-5 > Signed-off-by: Yangyu Chen <[email protected]> FWIW, Acked-by: Mina Almasry <[email protected]> I've noticed these claude-generated commit messages are unusually large compared to the human written ones. In the future try reviewing the commit msg manually and making sure the amount of detail makes sense. You can put extra details under the `---` --=20 Thanks, Mina