Article View: linux.kernel.netdev
Article #13922[PATCH net v6 4/4] net: stmmac: restore the XSK TX pool on resume
From: Ding Hui
Date: Tue, 10 Nov 2026 12:38
Date: Tue, 10 Nov 2026 12:38
39 lines
9990 bytes
9990 bytes
From: Ding Hui <dinghui@lixiang.com>
When suspend interrupts AF_XDP zero-copy transmission, resume releases
outstanding TX buffers through dma_free_tx_skbufs(). If it completes XSK
frames, that helper also clears tx_q->xsk_pool even though the socket
remains bound to the queue.
The resume path does not run the TX ring allocation routine that normally
sets this pointer. Consequently, stmmac_tx_clean() skips XSK transmission
and a running TX-only socket can stop sending after resume, despite the
link coming back up.
Restore the TX pool from the queue's existing XSK binding after releasing
TX buffers and before restarting DMA and NAPI. Keep the buffer cleanup
helper's behavior for teardown unchanged.
Fixes: 132c32ee5bc0 ("net: stmmac: Add TX via XDP zero-copy socket")
Signed-off-by: Ding Hui <dinghui@lixiang.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 99e46174741e..140b95f767fe 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2280,6 +2280,9 @@ static int stmmac_resume_descriptors(struct stmmac_priv *priv)
for (queue = 0; queue < priv->plat->tx_queues_to_use; queue++) {
stmmac_reset_tx_queue(priv, queue);
dma_free_tx_skbufs(priv, dma_conf, queue);
+ /* Buffer cleanup may clear the pool; the socket remains bound. */
+ dma_conf->tx_queue[queue].xsk_pool =
+ stmmac_get_xsk_pool(priv, queue);
stmmac_clear_tx_descriptors(priv, dma_conf, queue);
}
--
2.34.1
Technical Details
Message-ID:
<3ee93ddae82ebc7b5447095d12c4630963413b05.1794311618.git.dinghui@lixiang.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360192-linux-kernel-netdev=dewy.ruReferences:
<cover.1794311618.git.dinghui@lixiang.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360192-linux-kernel-netdev=dewy.ru From: dinghui1111@163.com (Ding Hui) Newsgroups: linux.kernel.netdev Subject: [PATCH net v6 4/4] net: stmmac: restore the XSK TX pool on resume Date: Tue, 10 Nov 2026 20:38:55 +0800 Organization: Usenet Network Message-ID: <3ee93ddae82ebc7b5447095d12c4630963413b05.1794311618.git.dinghui@lixiang.com> References: <cover.1794311618.git.dinghui@lixiang.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="622272"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Mr7h+C8CniAXNxLEfn9i4MsDtCE= sha256:5sWGCEAHDOsJdA3jI+UNVWzbEx+UzswqAo4SVlVBQ4o= sha1:Hn03xnXM5RTxQ/J2M2iwC+DGHcc= sha256:JMEHBBlEeSQhO5IRqD70Khi43EGYLrTM55ZxJ2RMOvY= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 828BA113BBE; Tue, 10 Nov 2026 17:05:37 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.048 X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=163.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZvBeCQFPrq05; Tue, 10 Nov 2026 17:05:34 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-360192-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=163.com X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 5032F1139C5; Tue, 10 Nov 2026 17:05:24 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id C2A1D12608F; Tue, 10 Nov 2026 12:40:50 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794314423; b=jBTtQn9m7IWxAEiIiCZn6Amuak8Ng1s2j3RW9z3j4jZVsl7FY/htIzRiiWZu1iqtL2OR WGcK8/0pJe6x+1vFm3Ekcp/B/7Hq1qsMfn7Kre/fx4jxgyXkLy9/G6BtAe0kPBJmmVy3/ HP3RPBilo07j1zEJQFVR7t3j33j0FGGMF/fRw4Qn+VVjaNv6U8Tp35iYPqH4QdpCFfRkE S2OCxqM1ZGBzyjvoH4NBBup8HhfFgwm04CLV/1H7pKDHLsHzWztNaEDpPYnQn99t4rhfG ragbA8ixMZHk+qSHThz+LdGXJxPGYRuI69y7hcKSGrf8xvO/k1Ay7Gwh0sU/pWqEp8g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794314423; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To: Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:X-CM-TRANSID:X-Coremail-Antispam: X-CM-SenderInfo; bh=s1OQyxfD95E5WNGfUMbMwVtQoxYEAXTWm7roN9HSr+8=; b=CGHxwrWRK6XwpTFZTKgLkkGv7+Rd3pYmk3sIQSJ4y67B+lAcIitoFBg0cJFrpm3ukVhV KYgmB/KdtxfSYy6CmPQz4xRjPa1+GyBzDKs4Aiq9djeyZkdJa6LXKOwYDbXTg4yEULwb1 NENDdf2wGtoMc0tzdvlMPGrLZidl7QkPE4QaijDso2+5oP5tb/iXGtLNdtLk16hzXdlc7 4vxNmxESuqSpd5ddhh/hwBCjyWpHfpITT97fHPZnUj7fBHnwg7oZGujsoz5AVDOEV8MRi 8jr9FIS3CcYCTY48hlYuHI+LlXR2tSRs7YxhTuhuY1yBhHCjqgCaNVYKOzQ0LN54PMg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=aOkIZCwW; dmarc=pass header.from=163.com; spf=pass smtp.mailfrom=163.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3573360A2637; Tue, 10 Nov 2026 12:40:23 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=aOkIZCwW X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.3 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794314422; b=Rsjesk1prvc2slOznan8x3Ha5bmL8G4az31lS4mbw/yiiL8NzGywbwNdP32q+mgcaNZQ njKqcSClOFMcpsOS13iW9Okxq6YMi0HIca+3FuRdUei7ChYUwCIXzrJ9uolzCCuhQwIYk /DUWb4cGBf4qx3SjPAG25Rgt/91Hu/EhR7hiH/Hk6jH5fIgrrs4BzW+tEfcsd0cp709m7 mPgnDthEHd0n1oJ+VplRfuXrnHo51+a7S0tqRZoouiK686jaNsJNBZS6+8Vhr/219UuCJ 3B4LJjDuY4LZVH1VcrC3GZh2RQueuXEcQ9b0DsFi3vCqclkIYDEmQhlJKv6fKMfDVZA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794314422; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-CM-TRANSID:X-Coremail-Antispam: X-CM-SenderInfo; bh=s1OQyxfD95E5WNGfUMbMwVtQoxYEAXTWm7roN9HSr+8=; b=swEw+ieZqCzZ7MXEUuxYC3AoJZRqQt27+sD65cGs8doYnREN3H9gZKv3BdCHz4Q5rGLR e2mg7TO/4Z8UW+PPrpGBcQYJaUhC+tELZVqssfYg3LeVelfJYIkViMV8STU9NEUD69A5J 7QwMf0YuvEZaEfWPR3AGTuHMcQ5djHsEKr/IAbDiaMBDaHebnhWLyjUmvtg9AX520ECGC Vyl1jwIanQzVHIFMG/7vOfGbkFPwjWdPNRwuQNj0FEiy12xOPND3KkpOK5TAQSe4fVm0+ yKMzJyHy/xCTLxSL9MFHyQkaa0JgYpj+S95sMEyB+VwQqwRlcej6s3LYH2gJnNtlW2A== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=aOkIZCwW; arc=none smtp.remote-ip=220.197.31.3 X-Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EB7A60A2616; Tue, 10 Nov 2026 12:40:20 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6EB7A60A2616 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=s1 OQyxfD95E5WNGfUMbMwVtQoxYEAXTWm7roN9HSr+8=; b=aOkIZCwWdQIExpC9lf 1jP8aq/lEoXAiZN2lIKMF7l+ZugjjmgG0Q/Al5n7G9ir0gMdfAyBXFHMXISkIr71 tpw8nR/RdJkVx0Lii4a+oFHDor5v/Cnjeq+4U/CKTGpbQy5TaSBndyamIqeyxB2B 0Twci904XC+DhpHoY7xn3mKgo= X-Received: from 4CV529F122.company.local (unknown []) by gzsmtp1 (Coremail) with SMTP id PCgvCgD3X4hjEPNqevk+Eg--.59821S6; Tue, 10 Nov 2026 20:39:19 +0800 (CST) X-Cc: dinghui@lixiang.com, xiasanbo@lixiang.com, yangchen11@lixiang.com, liuxuanjun@lixiang.com X-Mailer: git-send-email 2.34.1 X-In-Reply-To: <cover.1794311618.git.dinghui@lixiang.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-CM-TRANSID: PCgvCgD3X4hjEPNqevk+Eg--.59821S6 X-Coremail-Antispam: 1Uf129KBjvJXoW7uF48XF1DCw48JrWkAFy7KFg_yoW8ArWxpr Z7Cayqywn7Jr4xZws8Gw40vFyFyayftF45ua4xJanxZFW2kFZIqryYvFWYvrW8Jr4kXr13 tr4jkan8C3W5ArJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jV4E_UUUUU= X-CM-SenderInfo: pglqwx1xlriiqr6rljoofrz/xtbC0hi55WrzEHglVAAA3W