From: netdev-bot+sashiko@kernel.org
To: daniel.zahka@gmail.com
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
Subject: Re: [PATCH net-next 2/4] eth: mpnic: add promiscuous and all-multicast filters
Date: Wed, 18 Nov 2026 09:12:11 +0000 [thread overview]
Message-ID: <179499313144.3136.4262860920559871885@kernel.org> (raw)
In-Reply-To: <20261116-mpnic-l2-oot-v1-2-8dc6eb3582b0@gmail.com>
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
next prev parent reply other threads:[~2026-11-18 9:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 21:11 [PATCH net-next 0/4] eth: mpnic: L2 address filtering Daniel Zahka
2026-11-16 21:11 ` [PATCH net-next 1/4] eth: mpnic: add filters for dev_addr and broadcast address Daniel Zahka
2026-11-16 21:11 ` [PATCH net-next 2/4] eth: mpnic: add promiscuous and all-multicast filters Daniel Zahka
2026-11-18 9:12 ` netdev-bot+sashiko [this message]
2026-11-18 10:04 ` Daniel Zahka
2026-11-16 21:11 ` [PATCH net-next 3/4] eth: mpnic: sync unicast and multicast address lists Daniel Zahka
2026-11-18 9:12 ` netdev-bot+sashiko
2026-11-16 21:11 ` [PATCH net-next 4/4] eth: mpnic: support changing the MAC address Daniel Zahka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179499313144.3136.4262860920559871885@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=alexanderduyck@fb.com \
--cc=andrew+netdev@lunn.ch \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=dimitri.daskalakis1@gmail.com \
--cc=edumazet@kernel.org \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mohsin.bashr@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox