Article View: linux.kernel.netdev
Article #16953[REGRESSION] net: stmmac: v6.1.y clears xstats.pcpu_stats in __stmmac_open()
From: Kunihiko Hayashi
Date: Mon, 16 Nov 2026 05:10
Date: Mon, 16 Nov 2026 05:10
55 lines
8750 bytes
8750 bytes
Hi,
A regression appears to have been introduced in the v6.1.y stable series
after the per-CPU stmmac statistics backport.
Since v6.1.191, DMA interrupt handlers were converted by
commit 52002cae02db ("net: stmmac: protect updates of 64-bit statistics counters")
from:
priv->xstats.rxq_stats[chan]
priv->xstats.txq_stats[chan]
to:
this_cpu_ptr(priv->xstats.pcpu_stats)
where pcpu_stats is allocated during probe():
priv->xstats.pcpu_stats =
devm_netdev_alloc_pcpu_stats(...);
However, __stmmac_open() still contains:
memset(&priv->xstats, 0,
sizeof(struct stmmac_extra_stats));
which clears the pcpu_stats pointer allocated during probe.
As a result:
probe()
-> allocate xstats.pcpu_stats
__stmmac_open()
-> memset(&priv->xstats, ...)
-> xstats.pcpu_stats = NULL
dma_interrupt
-> this_cpu_ptr(priv->xstats.pcpu_stats)
which appears to leave xstats.pcpu_stats cleared after allocation
during probe().
v6.6 and later do not appear to be affected because the xstats
memset was already removed by
commit 2eb85b750512 ("net: stmmac: don't clear network statistics in .ndo_open()").
before the per-CPU statistics conversion was introduced.
Has anyone else observed this issue?
Thanks,
---
Best Regards
Kunihiko Hayashi
Technical Details
Message-ID:
<2caa5a50-d3c8-4195-889d-52667dd95974@socionext.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-364065-linux-kernel-netdev=dewy.ruShow 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-364065-linux-kernel-netdev=dewy.ru From: hayashi.kunihiko@socionext.com (Kunihiko Hayashi) Newsgroups: linux.kernel.netdev Subject: [REGRESSION] net: stmmac: v6.1.y clears xstats.pcpu_stats in __stmmac_open() Date: Mon, 16 Nov 2026 14:10:57 +0900 Organization: Usenet Network Message-ID: <2caa5a50-d3c8-4195-889d-52667dd95974@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="1984965"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:n8yRND0Q61I55yOvTKc08AEEiNY= sha256:4Uh/yO3V2oGugSwH0bltGmMCzf57kJkxUQ+nX/uNyh8= sha1:3ZxtSp9KwVTjgWMo3j+u4Y1N3Dg= sha256:jSPYGvVJ4TqFsYQC67yy1Z3wn7xoQOXyX46y3h3bCYw= Content-Language: en-US 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 A00C2114B31; Mon, 16 Nov 2026 08:11:27 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.951 X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, 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] autolearn=ham autolearn_force=no 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 8rvdqBvHoVo5; Mon, 16 Nov 2026 08:11:19 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-364065-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=socionext.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id E4E58114B2F; Mon, 16 Nov 2026 08:11:13 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 6C57A2E3D8; Mon, 16 Nov 2026 05:11:09 +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=1794805867; b=nRpDPGrZ7M6oWozgRj8pa5AIZuCfDmb76X+IYMqVINcygvTEksahXa2Yf8Sa0E3qHyWa nLUqPwKY1SZKeQcvLm88M/8hgm+TtSNwpRUx+1iH9peVFa5S6bZEkLGYEHOLsGd2SKpzk HkekLkm/QYck/EXfgiCzL14uwSOkwB7QsuDDtSFJkhDGxe3bFiRshHUc6HrzsTbBDP/mh g4PpJkIJ9DAX9n1X504I+KwzDyDNmT+tkTuq3pgp+DwsmBYkto2dP+38/Xs1P+kLfzUp+ rzaYCF6NSoqfksChQlKZPMuUJ5cJJvzaniJc7dmXuzF2lhJ5CFNLQBNDpr8I4WEuyRA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794805867; h=X-Original-To:Received:DMARC-Filter:X-CSE-ConnectionGUID: X-CSE-MsgGUID:Received:Received:Received:Received:Message-ID:Date: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent: Content-Language:To:Cc:From:Subject:Content-Type: Content-Transfer-Encoding; bh=z3Y5/y6k0p/Yew9uyaMnVEiLx5AALopiEmJW5nntoUg=; b=rmTUUcFh2u/0PO6iDpHszJi7k8QgmbJCDiqquYsiWEKODmNbHDdVQXw7Hwf3uAxmKMae EQr02P7RgMwOunqQyadg2cD9/mIQKZeCDbWi4+FT8VraPfEZkCRQZxZawvJfCDJLj86g5 +Uerf0qxhaRUb1rJvJa9qFxXGP7/1zpWIez7ZOFbEMavs2tEB8hMZ845hcFFoL4lzWxBC 05c6iIr/JVWOahnTtfchsNfqpsDGi7nLHs5dvI9PRNfcXLtPQToYCcpFJmaOUAawSN0xH Y6HdZbEfXyr66RyvQ00CaEwhhTiTnMMxWXQtwsqABDBMwvlCU6zuG8sGO0Q6BHQrZww== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=socionext.com; spf=pass smtp.mailfrom=socionext.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 9F653606A339; Mon, 16 Nov 2026 05:11:07 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=202.248.49.38 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794805867; b=HKaUQJd6vxpdpLM1FXy5BU4yETtVdrPE6KxeLZUlzg8ae1vp+8vgQ+/XzUYBemZj0bum vVdQ2HY4m49hwmkpOiYgdGtzvHEzQyBQjoVFIhYxJ/J9SqOy3ydHAt4LMVgaxd5LM1VZI 1L31gN1oGiTxqXHULKzunDJ/KPP9Sx+gtdGGEqhpkqe00j8WbLPnVWPorQPX2jWh6lpgW PK8/0ljT1OHygaOle81nofAQfWIiydkwfoUXPEbF4hZmmxOLz6b3NCszVuXByyucPzpIz bF96itIr6SRG5YOjOy582i/sAn8rDK/D5TkIp9nMu9lAm85cFl43FA3XzdRbfTyQ+Jw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794805867; h=DMARC-Filter:X-CSE-ConnectionGUID:X-CSE-MsgGUID:Received:Received: Received:Received:Message-ID:Date:MIME-Version:User-Agent: Content-Language:To:Cc:From:Subject:Content-Type: Content-Transfer-Encoding; bh=z3Y5/y6k0p/Yew9uyaMnVEiLx5AALopiEmJW5nntoUg=; b=GYtn99/zz7yesue64eAt3+y39hVX2F2vavGKfw1tT07NJRMWmfaXxYCugBfivfgGyUSO HZzFTDrZxn8F0TX593qzRD8za3Yw44Mxkgpn8BGIMJvxKCrhUtsC3R/mKO4/19ic2TFv/ EluvXa3OQlhULA47rAaGQhb0Y6FxM4dSzvPv4JUolXAOdtJZUdivoJ+PsURpMRhqCJa1U BNE4vAsHswy1wbMBYgrl8vfy79ovUi8BZ0lb52FT9lb2phyr0Ka9bDEFwCBg2ez3dsmDS Ei2bJEhzGFRuC4IrznQA7AKooYecyxuGVqF9GyzeS9AHkhXT9zHl/A6uwAoYvhflFEw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=socionext.com; spf=pass smtp.mailfrom=socionext.com; arc=none smtp.remote-ip=202.248.49.38 X-Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9007F606A323; Mon, 16 Nov 2026 05:11:05 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9007F606A323 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=socionext.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=socionext.com X-CSE-ConnectionGUID: nbNQ2bVBQHiNPVp/Ylioww== X-CSE-MsgGUID: F9IYLI47R2+n6i38I+hmCg== X-Received: from unknown (HELO iyokan3-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 16 Nov 2026 14:10:58 +0900 X-Received: from mail.mfilter.local (mail-arc02.css.socionext.com [10.213.46.40]) by iyokan3-ex.css.socionext.com (Postfix) with ESMTP id 14E922091483; Mon, 16 Nov 2026 14:10:58 +0900 (JST) X-Received: from iyokan3.css.socionext.com ([172.31.9.53]) by m-FILTER with ESMTP; Mon, 16 Nov 2026 14:10:58 +0900 X-Received: from [10.213.138.143] (unknown [10.213.138.143]) by iyokan3.css.socionext.com (Postfix) with ESMTP id 2A86E10D987; Mon, 16 Nov 2026 14:10:57 +0900 (JST) 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-User-Agent: Mozilla Thunderbird X-Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org