Article View: linux.kernel.netdev
Article #8664Re: [PATCH net 08/11] net: au1000: restore receive filtering after MAC initialization
From: Florian Fainelli
Date: Thu, 29 Oct 2026 17:37
Date: Thu, 29 Oct 2026 17:37
73 lines
14155 bytes
14155 bytes
On 10/29/26 09:15, netdev-bot+sashiko@kernel.org wrote: > Thank you for your contribution! Sashiko AI review found more severe > issue(s) in other patches of this series. This mail is only an FYI, in case > you want to address the nit picks below when you respin. > > Low priority / nit picks for your consideration: > > - [Low] In au1000_init() (drivers/net/ethernet/amd/au1000_eth.c), the > control register is written with MAC_RX_ENABLE | MAC_TX_ENABLE and no… > > -- > > net: au1000: restore receive filtering after MAC initialization > > This patch reapplies the current netdev receive mode at the end of > au1000_init(). Promiscuous and multicast settings are then kept after a > watchdog reset. It also takes aup->lock around the control register > read-modify-write in au1000_multicast_list(). > >> diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c >> index f8976e324f0e7..6b817d18329b2 100644 >> --- a/drivers/net/ethernet/amd/au1000_eth.c >> +++ b/drivers/net/ethernet/amd/au1000_eth.c > > [ ... ] > >> @@ -742,6 +744,9 @@ static int au1000_init(struct net_device *dev) >> wmb(); /* drain writebuffer */ >> >> spin_unlock_irqrestore(&aup->lock, flags); >> + netif_addr_lock_bh(dev); >> + au1000_multicast_list(dev); >> + netif_addr_unlock_bh(dev); > > [Severity: Low] > Is there a short window here where the receiver runs without the > requested filter? > > A little earlier, au1000_init() enables RX and TX with none of the filter > bits set: > > if (!dev->phydev || dev->phydev->link) > control |= MAC_RX_ENABLE | MAC_TX_ENABLE; > > writel(control, &aup->mac->control); > > Then aup->lock is dropped. Only after that does au1000_multicast_list() > program multi_hash_high/low and set MAC_HASH_MODE, MAC_PROMISCUOUS or > MAC_PASS_ALL_MULTI, using a second read-modify-write. > > This can happen on the au1000_tx_timeout()->au1000_reset_mac()->au1000_init() > path when the link is up, or on open when there is no PHY. In between the > two writes, frames for joined multicast groups, or non-local frames in > promiscuous mode, could be dropped. > > The window is small next to the reset delays that come before it. On open > it is also shorter than before, since __dev_open() calls dev_set_rx_mode() > only after ndo_open. The window is still there at the end of the series in > "net: au1000: keep the MAC stopped until the PHY link is ready" when there > is no PHY or the link is up. > > Would it be worth computing the filter bits and adding them to control > before the single writel()? Then enabling RX and programming the filter > would happen in one step. Agreed. I’ll share the receive-mode programming logic with initialization, program the hash registers before enabling RX, and include the filter bits in the same control-register write as RX_ENABLE. pw-bot: cr -- Florian
Technical Details
Message-ID:
<209a7881-d76d-4449-98e6-c3b4f1efafdd@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353415-linux-kernel-netdev=dewy.ruReferences:
<20261027223140.3774570-9-f.fainelli@gmail.com> <179329051912.3134.7644702434785244368@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353415-linux-kernel-netdev=dewy.ru
From: f.fainelli@gmail.com (Florian Fainelli)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 08/11] net: au1000: restore receive filtering after
MAC initialization
Date: Thu, 29 Oct 2026 10:37:06 -0700
Organization: Usenet Network
Message-ID: <209a7881-d76d-4449-98e6-c3b4f1efafdd@gmail.com>
References: <20261027223140.3774570-9-f.fainelli@gmail.com>
<179329051912.3134.7644702434785244368@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2061153"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:fp4JKWlhOMiur1WqLtfumJ2XeWs= sha256:xZQ+kaDKqQew522p2fZrFOzVvLKfxm9WIYcWEs1w2X0=
sha1:AkMRt3TVxJbcBZV70K72K7lJ3uA= sha256:SdF+Lp5Dfres+uIq3xhc2YShMez1bZA3tup2FyVjkX0=
Content-Language: en-US, fr-FR
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 6C4B9125C6C; Thu, 29 Oct 2026 20:37:38 +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.25,
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 j8C5sMWPO0jO;
Thu, 29 Oct 2026 20:37:35 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353415-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 EC240125C65; Thu, 29 Oct 2026 20:37:25 +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 C2BD425C4B; Thu, 29 Oct 2026 17:37:14 +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=1793295433;
b=w5p21oZIJ22kDAiucrrNlgLnhHYdLmmWd915ZffRjIGFXXUrSgTgbi6hksy8YhvwaOlV
smW6T31s3z3L2ZpR0sD2X2+MuTXyiveyGsrBsBYO+q5ZmAiN0Dt3jiCSSkh/vR2Ow2khT
YbmluNBPDtgfVmU6ItugICmiXt4Pcf4D3KhuITSWLWgC7IaswyGOeKiHllSFMDqVmKPFu
Z6uRzHzHJYCqZXAMb7VSCWDIni3Qj2nTcI65/SDNrWW7UT/qoZAzLbMKe+mVwBRoR4RR2
wMF8OZsIdezZ+AkJT/kWgiA5/9Y+ScYg0ZVHHcrlU0bEzXcRJLa1Iy35urwRvVY99nw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793295433;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-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:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding;
bh=1R93MDTU0XytCmvnwXdPrrSy/zaN5hGMCigbTQ62llo=;
b=rS77DE/kDSIMMDzd6b6AQxJtgOCYE29m2f2/qa05dfHfG3wWl2JTcTk9IklQ9vRkRRnu
aAP5MxLMAmoOlDfZmQGCJPX8pHaSlth1phP24TVo/Liesus4IzpEFt42rdZE162B/G2ZN
aVe5fDn29QV/P699B1OTSjIR85FYk1ADSJaxuctIYqVJLMky3TS2zIsobbHEJKVk3AkDe
nOhy+ItkKsNis8ytYOteLR/kKw2CrJiPQiqIB7Cr6Z+arkX0OuOcDREarRsGkYcnYfpT5
5NPAYf6jqLg0HlT5KgCgR87MlXruLuwgwrV1G+IoVqmWLMjkB+0UoUROZ0jifgI8wgA==
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=aV7bCt7R;
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 7C7C3606A327;
Thu, 29 Oct 2026 17:37:13 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=aV7bCt7R
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.52
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793295432;
b=O+5VhVLbhIWyj2ah7fLkCGdMZqsMStfGqISVE4zl8wFzB0GhdmHVsJeU8VdAXChUhxfp
wDcF/TA1DgsVKp4pI+b/7BeghnVXM0BL+eT+RVF8oUcFFJiI+TdwHKiU1gpoO1MP0Sbro
r3FTQSBkVx8gDyoPk7cFuuME5tNY4H0R9ydXcsXbhByJ7m8p8Csm1kqRVwY4kTegBGCIt
XOspG/RUiFFYnD/ZJfoUVy7ukPrqRU276iYvhIxublBy5PkAIkS4MrKwUoxwgPUhJH8q3
6a7JkkJ1axNw6QJDEteFVoAv8IeK0nNlN0izoeuOeHjTGaKeNA0zHj9n4vnVTIye2Mw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793295432;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-ID:Date:
MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language:
From:In-Reply-To:Content-Type:Content-Transfer-Encoding;
bh=1R93MDTU0XytCmvnwXdPrrSy/zaN5hGMCigbTQ62llo=;
b=D5q96WqQ4bDO73YnjUV6LnqnK0ihkzfo3V3vAax+CF59w6Ue0iKbiyTTGUbX2dPiBVC0
YNzUnFSZB2rhQdLu+N6kRhzAubulPxM1dFKkVCcWw35E9tBWAhOMnPt3h7VU0G015eU2F
bub32rrI117CCpRFstEBhKtCMocW8YfGvND05nFdFHZUrvprw/W7npQksS/zKE+fDCWzP
Vb9fDe54B0qk6kn84sTkZ54fBmDIyJTdX6ABjPs887bChxoxhqeHprti+ezBWXmTiI0Wz
6Z5lUgzEvmOpS26uwqmLDQhvXwUA0TAQRzIkLOnqbRrK+S7TRTELAGkXKMkn/P0X4VQ==
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=aV7bCt7R;
arc=none smtp.remote-ip=74.125.82.52
X-Received: from mail-dl1-f52.google.com (mail-dl1-f52.google.com [74.125.82.52])
(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 4506D606A31A
for <netdev@vger.kernel.org>; Thu, 29 Oct 2026 17:37:12 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4506D606A31A
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-dl1-f52.google.com with SMTP id a92af1059eb24-1846bc43c28so2794388c88.0
for <netdev@vger.kernel.org>; Thu, 29 Oct 2026 10:37:12 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793295431; x=1793900231; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=1R93MDTU0XytCmvnwXdPrrSy/zaN5hGMCigbTQ62llo=;
b=aV7bCt7RqRyTS/LfOOaXqrwODQp6BkyKXTEOC0hRoZ/qCfN8ZfD01J8OdU6aoOMGl/
Cq+qRgwk5YP9yc9DONncGQxJbl+M8iLdwzqDtAlcIJ7nmDLCF75JfvpczLu//T5Pyzx6
m+fURzOXw6BngapSpIbdo38MlYlx/PeYss9bB2tR6iIVWb3Sj+GlaFBLiFDxT/3zKKpJ
M7G4bZP6kDGwHpl0FtNF0LQzZ5j2DLqRLhA5j7oLHePionsZW/39pztCzazzQHCOC28m
fh5cCVfKnJJzaUrfJ/u5X1SSj8hnA0mVRpAtbPKP1yLzYCrO4Cd31ZnW31Fe8OiZrf9E
2H+g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793295431; x=1793900231;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=1R93MDTU0XytCmvnwXdPrrSy/zaN5hGMCigbTQ62llo=;
b=ti3XFL/nu3a8Gb/c8rgTwHLKfMAshPuOwHo8TYJlKWyzikxiDzZfZSbAdYpDAV/Wcy
jrqgANqSOIH/A+fFQro2oLjglwFaIn+MRW2EZQfKZWUQmOBv4zGv+jQ2DujEr7mfbTcB
700ykOB0bf7cnSIpHe2zKdLzpspo5zBeparJk4AU6sJVErE+o3W6Jz+Fr00yxPMxOect
0fLs6WtRui3BeT9djS2zcMIRxabXiGP7tlpk75HkP6b7eMUnMlIA8LOYZnlkXgm/78Dt
MjH9zG8qvq7BghUoDmjbrbVeChJnsT44xeJ/k3xM2XBElYrkB493nCgYlarKrJrsmGXD
QbrA==
X-Gm-Message-State: AFq9FYKu4dxQ1U0cPkCWuHmwmxrMjJcv1g4u7Kgx07m2irmrYn3OGipp
TOktYyc2cNzCtOUdVr8LT5L5LQrOF0nu5K8tHIoTxgsh5x5VdSiamhti
X-Gm-Gg: AYBFou07OUK18kkAndUpchkRJbsjBHiy7qWlAv/jY3jknX3K3qGhKDbTQ3YtUVUtYJE
i+r9yzf8sLX/6DSgpN6a13cJIccBhM3nFEHK+0OgrQjmCfRRoLhnDuWsRABVS6pCcRtv1uER78M
4kGNK1TYF1O2FtZkOeg3deUPelPMT5iuS/znvHybGL0dAj5wtasMNorXMoqPmB3D5/raQqxwd22
YbRJd4p6N6KAaRgQG8EwkWo3RcnZrY65+Oi2yJFgJPVpqOUN2myO/KMN/lQnof8FNlCrDvkedL5
U9Paqt4Qx5rX/424W+lgEL3rRPIpLLvn4OHU3+699ru23NrhqHWN94xZS/6XmJNLXLsTbpL0SNh
50mKCcVeKigym900TDbclDUOCzvc7W6pky3qW8etZPTWWJVLUcKE0FjRtBnzHzWe4v7jvdHJ8bY
2xA6/Dp/bq/3HiXAG911rEZCmvPUHyD305KiiC/wmyHIZm6SB/YAVhpqf4P8F96LmEGojZfIHLg
/Nvp6CvSxCz/Kc8yThia0AvmMlP5rEjsn4rID6vBYhYXPgD4cXd9HZVfmD5ToG078Ftj7UnBJjq
beH/3b5+YuBWwD1YY77MZThCHhmDKJHy07RG3cENNcd9INI5pofkRqtt
X-Received: by 2002:a05:7022:6989:b0:199:e38c:29a0 with SMTP id a92af1059eb24-1a6cf071fcdmr10788012c88.31.1793295431303;
Thu, 29 Oct 2026 10:37:11 -0700 (PDT)
X-Received: from [10.67.48.245] ([192.19.223.252])
by smtp.gmail.com with ESMTPSA id a92af1059eb24-1ac1854d925sm166684c88.7.2026.10.29.10.37.08
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Thu, 29 Oct 2026 10:37:09 -0700 (PDT)
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: netdev@vger.kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
hkallweit1@gmail.com, linux@armlinux.org.uk, shaojijie@huawei.com,
horms@kernel.org, runyu.xiao@seu.edu.cn, mmyangfl@gmail.com, hvr@gnu.org,
jeff@garzik.org, danny.kukawka@bisect.de, mugunthanvnm@ti.com,
sebastian.hesselbarth@gmail.com, linux-kernel@vger.kernel.org,
manuel.lauss@gmail.com
X-In-Reply-To: <179329051912.3134.7644702434785244368@kernel.org>