Article View: linux.kernel.netdev
Article #18386Re: [PATCH net-next 2/4] eth: mpnic: add promiscuous and all-multicast filters
From: netdev-bot+sashiko
Date: Wed, 18 Nov 2026 09:12
Date: Wed, 18 Nov 2026 09:12
83 lines
10905 bytes
10905 bytes
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] On every ndo_stop, mpnic_clear_rx_mode()
(drivers/net/ethernet/meta/mpnic/mpnic_netdev.c, called fromβ¦
--
eth: mpnic: add promiscuous and all-multicast filters
This commit implements IFF_PROMISC and IFF_ALLMULTI using the last DMAC
TCAM entry, which matches either every address or only the multicast bit.
It also changes the default action on TCAM misses from pass to drop.
> diff --git a/drivers/net/ethernet/meta/mpnic/mpnic_netdev.c b/drivers/net/ethernet/meta/mpnic/mpnic_netdev.c
> index 16611813db555..43547a7d6e5c7 100644
> --- a/drivers/net/ethernet/meta/mpnic/mpnic_netdev.c
> +++ b/drivers/net/ethernet/meta/mpnic/mpnic_netdev.c
[ ... ]
> @@ -54,6 +64,7 @@ static void mpnic_clear_rx_mode(struct mpnic_dev *mpd)
>
> mac_addr[MPNIC_TCAM_MACDA_BROADCAST_IDX].state = MPNIC_TCAM_S_DELETE;
> mac_addr[MPNIC_TCAM_MACDA_HOST_ADDR_IDX].state = MPNIC_TCAM_S_DELETE;
> + mac_addr[MPNIC_TCAM_MACDA_PROMISC_IDX].state = MPNIC_TCAM_S_DELETE;
[Severity: Low]
Should this check for MPNIC_TCAM_S_VALID before moving the promisc entry
to delete?
The broadcast and host address entries are always valid while the
interface is up. The promisc entry is usually MPNIC_TCAM_S_DISABLED,
though. That is its state whenever IFF_PROMISC and IFF_ALLMULTI are both
clear and the mc list is empty, and also after mpnic_promisc_sync() has
already removed it.
The state comment in mpnic_rpc.h only lists valid as a source of delete:
* Valid 1 -> Delete 3
* Delete 3 -> Disabled 0
The other place this patch adds that deletes the same entry follows
that rule:
mpnic_promisc_sync() {
...
} else if (mac_addr->state == MPNIC_TCAM_S_VALID) {
mac_addr->state = MPNIC_TCAM_S_DELETE;
}
}
With ip link set dev X up and no promisc/allmulti flags set, followed by
ip link set dev X down, the path is mpnic_stop()->mpnic_clear_rx_mode()
->mpnic_write_macda(). This takes a disabled entry straight to delete,
and then issues an UNLOAD_TRIG for entry 1023 even though it was never
loaded.
The extra unload looks harmless, because mpnic_rxb_init() already
unloads every entry at init. The remaining problem is that the code no
longer matches the documented state ordering, and the two delete sites
behave differently.
This is still the case at the end of the series. The later commit "eth:
mpnic: sync unicast and multicast address lists" updates the same
comment to add "Delete 3 -> Add 2". It does not add a disabled to delete
transition, and it does not add a state check here.
Could this either check the state, the way mpnic_promisc_sync() does, or
document disabled to delete as an allowed transition?
>
> mpnic_write_macda(mpd);
> }
[ ... ]
--
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116-mpnic-l2-oot-v1-0-8dc6eb3582b0%40gmail.com
Technical Details
Message-ID:
<179499313144.3136.4262860920559871885@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365971-linux-kernel-netdev=dewy.ruReferences:
<20261116-mpnic-l2-oot-v1-2-8dc6eb3582b0@gmail.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-365971-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 2/4] eth: mpnic: add promiscuous and all-multicast filters Date: Wed, 18 Nov 2026 09:12:11 +0000 Organization: Usenet Network Message-ID: <179499313144.3136.4262860920559871885@kernel.org> References: <20261116-mpnic-l2-oot-v1-2-8dc6eb3582b0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2550702"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:CM7BoD5Tej3bZM26NTCvASjsrB8= sha256:zLuu43RQSFvH7hlaIEuKcZGW1gNf0p3ONDCC/7cI+d4= sha1:BpTFXt2K8ULQzN40DgFuisY6AtE= sha256:WDCxGZDFRw+V9QkS/GR22NVgByB4vt8qxuTPYiha/KU= 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 B309711520A; Wed, 18 Nov 2026 12:12:44 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org 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 FdlN4PKiq9Ch; Wed, 18 Nov 2026 12:12:40 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-365971-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 04386115206; Wed, 18 Nov 2026 12:12:30 +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 858782E7AA; Wed, 18 Nov 2026 09:12:27 +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=1794993133; b=Bo23cboCjSg1MZhDAe/g7mUCrglfaQUq6DSPag9Y0iTx7cUiCf6w0m21TUTYik6VNLL/ 4Y/jZ+EjkVNmERiELrP4n4c4FyMso6Ws+MZKhUnEOcoy9FhiwzfN6Vo6y9rYghH/K55ar xUD4izQCzGf9KV8Vs1aWiOgThU4/l9fHugFtT4cTMMxxi2rOKiH4P5XhAgka7yTff/t0o +QgFMVCOkc+oxeT04+rY1LP440UcnsRTKIteA/y5N9UxoR76KWNdZgPLwx/4r49NWwiNs hpj21z99ss6wtxPACgot/jUw4khZVEr+oz7nqnBuE4h6nHR/t/TJFCrLNJic384UuLw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794993133; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=1x0JvTH95xlVccUSIz+p1toU0TMB79EnxF+TvySYDik=; b=CzhWWxDv3dzhIVlYH2jNm5Qm4vp52bdmpYDCEYXI3RV0pJ8SpRtnUaOAWrgy0CVWeDp8 nVaoCSPFh5EX2Tv8j2KrLTc1GI0gptYJPZ4sdlvdpfkCiSlYyTmT3wlHP/7pri+1+jzUS 9kn8vRZWzhWdTW/AmDiadnUAmXLu69z0+GrmMZFYwH4u9NH8vQak/ZQErmSyD6HlYHdkR 4TfKtgo12vLmJ0+JhZis0udKvJB0kv4Re7ZMXgmVdPjKwBPxQJu38ssuo9MBdBg5z2Fo4 Pnt4JIxr5ooraIScE5EFaPz2plBNg2q7duu5Gb3gsfN/U0iiNO1vhTzlbcs2XCK9uqQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=O1URnl7s; 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 AFD6560A2616; Wed, 18 Nov 2026 09:12:13 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=O1URnl7s X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794993132; b=0Q4THspvZb3ghkBoRaDkakn0kKes1bS0XW2vy0relaCxN5JMw3VSrYLFM/bkcv/Fkm6T oJSmixePn5zxS5vO54a7uQkupf+MupA+u/VeQcEIju99ql7PjOH9oN+Y+DQG/4M/0zkL/ ePwnSy73EXS9xR+zZ7v6T5EFBMKeRYPBTPqP4Few9y+Wq+XLBjJ6ee4xGyKtj4O9+AV5U U/i/PbxDtcKVxoRxuKl72do4H5UCMSwVmBoCE+vmD+2V+Ut6ThlTv9HHbU7YhwD2M6E0q /yPWmfCSWy05+ic65thu+PONWPYVEezfyEt3sL6WyIVY6aBjZ7DX0GmzzID/+lSb7aw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794993132; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=1x0JvTH95xlVccUSIz+p1toU0TMB79EnxF+TvySYDik=; b=CCFPLxBYcTO909v/qOzm5Ta7sB3DspePUm8u7Pkhl/M0A8PoekX+TWpJYXmXgzuTAKDw AsQicJ3PG6o8xft3sMGnaLQxU5/wyBuOcKM77CWx/02KukWhc4UBKoSvMgSUVnuFjoRPs TQcosV4orM9viSgeqKU7VqyAmyrspdLkZM64pn8+HfMLVkY3FNZYl1IQshxRG6Bohr3QH Dpf+H8lkoo9jK/4E4ZYQCGZxb6zPEIECdv+Aomja5hNE/GmCBKFnwwpRTBgdSERULzZss Pt2T0GkhcwugfCXadY+dv9a1GfTrxz0iCWNAr2b/7QwY/RyummH/1oGpnFyKcARcoRA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=O1URnl7s; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2CE9606A89A; Wed, 18 Nov 2026 09:12:12 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D56601F000C4; Wed, 18 Nov 2026 09:12:11 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794993132; bh=1x0JvTH95xlVccUSIz+p1toU0TMB79EnxF+TvySYDik=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=O1URnl7samSzWAfKkFnwmg2lkOkTknHxowI0kSwtp9/Hs0N62CaLDELNm4wi7KP4G 6Kw3tMtk3B4+yph4HL2ex962gNz6zoDy7UyZ4qLUbDD4JK7Yne767Mtw3zqOcYvWOl 3OpogKjm6BL4GoVk6VBzBIQmwDkde8cS4YtbcP/CoOK1q7GgQ9i6VCDIOHjZ5yzBj5 wh+6llTmZn0bcq3jZ9p1CW8+6j3infvvcy4uC9suBlTrxEDg1uLGVxDCCdUaMhDqvm 7WvTD1w2buZVBfG3X7LVCgl4jcToK5yyJYS/qPXOJbQuThdSYhJUqON97HZlqAcqnm 1+sWLYh3ho06g== X-Cc: alexanderduyck@fb.com, kuba@kernel.org, kernel-team@meta.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com, dimitri.daskalakis1@gmail.com, mohsin.bashr@gmail.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org X-In-Reply-To: <20261116-mpnic-l2-oot-v1-2-8dc6eb3582b0@gmail.com> X-sashiko-severity: Low 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