Article View: linux.kernel.netdev
Article #16063Re: [PATCH net v2 1/6] net: bcm4908_enet: fix the TX ring wrap
From: Kordian Chmielewski
Date: Fri, 13 Nov 2026 23:57
Date: Fri, 13 Nov 2026 23:57
38 lines
12834 bytes
12834 bytes
On Fri, 13 Nov 2026 20:42:07 +0000, netdev-bot+sashiko@kernel.org wrote: > - [Medium] net: bcm4908_enet: missing barriers and late write_idx update > on TX ring Both parts are older than this series, and this patch doesn't change them. For the barriers, v3 adds a patch in which each side publishes its index with smp_store_release() and reads the other side's index with smp_load_acquire() before it touches the slots. It also covers the bcm4908_enet_poll_tx() issue below. As for the late write_idx update, start_xmit() has updated write_idx after kicking the DMA since the driver was added, but that only became a race when the TX interrupt support moved the TX cleanup out of start_xmit(). In v3, start_xmit() publishes write_idx right after the descriptor, before the MMIO write that kicks the DMA, so the window no longer spans that write. As the review says, though, it can still be there if the channel is busy with earlier frames and picks up the descriptor as soon as it sees OWN. I'll look at it separately. > Pre-existing issues: > - [High] When the device tree has no "tx" interrupt, TX completions never > run, so the queue stop/wake design this patch adds cannot work. The v1 review found this too. Without the TX interrupt, open() never enables the TX NAPI, so nothing frees the sent frames and TX stops for good once the queue is stopped, and stop() hangs in napi_disable(). Every in-tree device tree that uses this driver has the TX interrupt. Florian, Rafał, would you rather have the driver require it (and the binding say so), or poll the ring on a timer when it is missing? I'd send that after this series. > - [High] bcm4908_enet_poll_tx() reads the producer index without a lock > or ordering, then reads descriptor and slot contents with no read… Covered by the new patch in v3, as above.
Technical Details
Message-ID:
<20261113235742.516908-1-kudzo51@gmail.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-362990-linux-kernel-netdev=dewy.ruReferences:
<179460252768.2199510.4667025168810979943@kernel.org>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-362990-linux-kernel-netdev=dewy.ru
From: kudzo51@gmail.com (Kordian Chmielewski)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2 1/6] net: bcm4908_enet: fix the TX ring wrap
Date: Sat, 14 Nov 2026 00:57:42 +0100
Organization: Usenet Network
Message-ID: <20261113235742.516908-1-kudzo51@gmail.com>
References: <179460252768.2199510.4667025168810979943@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="1470726"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:AdSDGeGpfcq77KeF4PcWGDHz01g= sha256:qisFwXjj3GDdD/PtfIXdoTQGK/CEF3Smr9Bj6ZQkfH4=
sha1:/YBeObvEYyyNeuziPKFhD/n+QOY= sha256:IOjJFH0YjceOoCDTebHyq7aBsppQE4eLrrHZVahNP3M=
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 88B591146F3; Sat, 14 Nov 2026 02:58:23 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 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] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.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 KkbMN-QWZpGY;
Sat, 14 Nov 2026 02:58:20 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-362990-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id D0403114679; Sat, 14 Nov 2026 02:58:11 +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 35C9C63CA0; Fri, 13 Nov 2026 23:58:02 +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=1794614273;
b=YA1mIdXEXpCxfI7EegL/QRxNPd9QTz1CyW2sk+1AerTe48zPEL8cvedtAS1Fo5wBXKl7
9tWXO7PlExM1LlMvCWlBT6GEmXAjNaM1X6l/vIzHX4nK8RglM/0aIVdaofuOKX+pqEZOW
VfuuFMmPwLQ6yF8ynudru3cL9rvHsltzIbZsHVvSe9wOwkjRNvwCticqWetQULTCffp5G
bCKY5qo7vkR3FBHMun7qc6pkgSXaXJnxMAFwf+8ECHpxf1GqddHN1D2vBql8GgcDmANRc
sOmBkAKOrKv2/+BJqo30T8ZQFLUxcxraKIxumPgVnyYoRuzR+ABZ1rSfFm6l6fpsRtA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794614273;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
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-Type:
Content-Transfer-Encoding;
bh=bh2UNPvOiO8aUnufjFtSOv41iN7jBr7C/TgT2GV+uOM=;
b=3Px380Tj6n52rBGlm9e/oSVBTVQptPaIn5uq6lHHALn+gkIOD4ZeP1NN0I1216f+AFL8
KfALu1mNjlqz5mSfqCZgjZzepx4napXgC7i5ZRXj6F87iJ4FwRMcsIF5hCGQVg5WdiSkR
pZ1f89BrUR3j2wvB7klseHYNrqDZ41VGlQ1g0zQML8kDv48DIAUdKWmlL7d1u2xX4TcHJ
ZRVwF5SZlRJBlEwVO8jLym/RG82Nmju+ZUOS5IC9dacSjUN8+lULJe0Yf4g+towllwDV2
HUGrjy2CzLNwugKiuXoBm50XG4RAl3S8oxNEDxoPUYssrbD287pz9fjxOuhyWdSYJdA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=AoApEqsl;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.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 890CF606A33F;
Fri, 13 Nov 2026 23:57:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=AoApEqsl
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.54
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794614267;
b=PDzt7VSa8uTuVJLNo6rX8dO/JCMsm5JYZDKNCi9TwfnBNnSgVklzWinQ2KBussHR6jXe
zpmXcbywCe+gIrU5rT5s7N3GmEZJOPsjm9CSQIbL2EvQQZpXppmqOxcnYAlkR77m/obOL
WIT3EKiqoSO83SRyxU3Rs3Svw623RzJQcFNLyrvzLOwanJNwNiXtjsQcUy8rlev/06YVm
d0nfWNYhi6xnwV1maSNjDMuNuuky9Snnp5ztUj1m0D1VnBmY3Q8SzClYjJ5ejiRCs9r7b
XIvL1AaPN/HrxPLytMCl1SEH/6xzfe7iQ5hmE/cdyilOEq1H90ShECZRlTXoADR4fZw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794614267;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
Content-Type:Content-Transfer-Encoding;
bh=bh2UNPvOiO8aUnufjFtSOv41iN7jBr7C/TgT2GV+uOM=;
b=0elz7Fl4dfDl6wIL3Cb7qczYxBHQeGQQBT8GxTu4np0Z1iqbEjOP2nYH+fPZlDnCyn7y
rF/YjZn6bCdvXIAgxkp8McfnS8L6aRCCs6soJ1logREYD0wM+nf/K//9+4mnZCeb7ldcY
tLe8j4q+tDN41lPFud4atlIqkdL4vQKTV7n/9jEq13uVgBrQSalFbLBrBRTChY94gmBT1
/m+UvSKAADgLcNT3lpivlD2l/3mK/3svkDIQO257CFJ1otkV2KRAbw/iwS9c6Hz3Kbrcn
o6fh3q7Kwgtomm8rCCcrZyjnQI9tGR+IyCgC4oKr4h0VRP7sDQp/S1EOE1lkQIrNqwQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=AoApEqsl;
arc=none smtp.remote-ip=209.85.208.54
X-Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 554A0606A883
for <netdev@vger.kernel.org>; Fri, 13 Nov 2026 23:57:47 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 554A0606A883
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-6b633ddfad6so2828725a12.3
for <netdev@vger.kernel.org>; Fri, 13 Nov 2026 15:57:47 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1794614265; x=1795219065; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:mime-version:references
:in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=bh2UNPvOiO8aUnufjFtSOv41iN7jBr7C/TgT2GV+uOM=;
b=AoApEqsldD33Mzw8Q0Y5Ubdt7meVfWlqgKmEgwh+yPmD0dZrNuAZJeuYvU/ApgoJWP
mx/WvYqzY9U8Cz9kdiRFhaPSvuAH6lJz1dfduQmEedaSDYFTzhHLUToKDt/4YE8gA4ak
5UB0ktmFKc7X2WnNQe1vcyZGBGetpaZYXqYaqCWabrhMZ0qHkTBBVRvVo/rUKLUJHj/u
TC6zNVjANSvjxrHJ5+vbGvQx8ZfkRpXGjQ/zJHA+3eOnmK4mBfWhwAibenzsq2v7CmgZ
9Pvlgy1LyM9R/Ne9/tqXLZWtSYEFrlMQ2Q66Nz2kg2pZkbXOH611GKGjmh7vCCCJ1k/S
RWdg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1794614265; x=1795219065;
h=content-transfer-encoding:content-type:mime-version:references
:in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=bh2UNPvOiO8aUnufjFtSOv41iN7jBr7C/TgT2GV+uOM=;
b=NZR+5PRXBtArx6ZL/q9hBWf/+9c/o548TDADHiqlAJ/i+nwH3gKDWCEFGEm/ONeqLJ
wZ5xhfkYz4aunCziQoZsUprHXF/h7fHaO01sh+N9Joo7d8Hk2ln9J6ZT1aq6xYGUMXmm
41yby/nU6JRn42ACwRGPtrznBD0hJrcxysNgMXI27Uo5RMpGd3zgIY+w9z6OHxf9sQ3+
/kMx1PG0OPTGnwYoB+yG/D8QDOeeVXSKRKKZHiZfSW5ndYg6hj98aTzcnaTCRdLk/UxM
7TBJODP1CGrAZUZE/Ll1+g08bnj1rgvl0heOky0T01CQ09NqBeqH3zcFgZhq8ehbe/ju
Ei8g==
X-Gm-Message-State: APuU4Z+w6dESxxcIfd8oUmaeaxU4TcRxMqaiIvgbY2+ww1AjmiG47n6W
cYfEDROV6Bv/QunqsjZIq0nwFWwzZ/uXOC5pDZIHwpGW9gugRoYPWOAD
X-Gm-Gg: AYBFou1f5ShNmxdNNMTV9it3izNnWwjjhSoc/aDFUIevwdTtAajS1tphq6+xQRL9cI8
5IKRVz6ZF2yRa3fC0PS8Dzvs6Y5MGedoko2ltt7/y2tkFrkFLF3k7Fr1OnQG+vfpaPVQfGmaWxP
wU9qWFvqZpAHOqe/msNivsqfHbugwDwqmq8kHE618UdefSDkpDCUA7Hwd6cKjV/4p58pOLzvB8e
83zM7jwuppY/84oG+ZDy7BrCpvLEXF+Y3FpGLZJcybA+SBP+AFw+ZKJtAMONY6lqMwO2iNhwJbm
XodBxRJKVW1I26mH1a4vscMoiUPk4EmSGtoCiLSjgjVrX+ctc6eimfxfgQ3/3OG33DqCK776Tq3
jmseRgwnZmRUXIo49C7YtkOlCGkVk0k7dx7g0/UPYlmm9ysfkoDd7L9xgeep9NJmtR7aK+EmI2F
mzZk3uAM70cteMqrQyLB9xz0ciesYJ6M55Z6fl1eEpV+HYiYJ5btLQKlWA1BHSzm7fGOOIIYznR
59tdpzE1GZJ59h9WuxXktC3Ea/cPWvXKjpLHRInhXzmI562dQA0D2SzU81aix/woL7glNBQX3WE
0PsDto4rXfQ+gJ+B2jmkFSNl3trZbtNzMjYxNQRq
X-Received: by 2002:a05:6402:565a:b0:6b7:8ace:4bea with SMTP id 4fb4d7f45d1cf-6b7c0bc4f57mr2643744a12.13.1794614265353;
Fri, 13 Nov 2026 15:57:45 -0800 (PST)
X-Received: from kordpc.lan ([2a13:e746:396c:c600::8f9])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6b7c21b1a08sm1577698a12.5.2026.11.13.15.57.44
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 13 Nov 2026 15:57:44 -0800 (PST)
X-Cc: netdev@vger.kernel.org,
Florian Fainelli <f.fainelli@gmail.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Rafał Miłecki <rafal@milecki.pl>,
bcm-kernel-feedback-list@broadcom.com,
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>,
linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.56.1
X-In-Reply-To: <179460252768.2199510.4667025168810979943@kernel.org>
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