From: netdev-bot+sashiko@kernel.org
To: poros@redhat.com
Cc: netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, aleksandr.loktionov@intel.com,
horms@kernel.org, michal.swiatkowski@linux.intel.com,
grzegorz.nitka@intel.com, pmenzel@molgen.mpg.de,
wojciech.drewek@intel.com, marcin.szycik@linux.intel.com,
martyna.szapar-mudlaw@linux.intel.com, ivecera@redhat.com,
alice.michael@intel.com, jacob.e.keller@intel.com,
jbrandeb@kernel.org, patryk.holda@intel.com,
sx.rinitha@intel.com, aaron.ma@canonical.com,
intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v5 4/4] ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs
Date: Sat, 28 Nov 2026 09:30:12 +0000 [thread overview]
Message-ID: <179585821237.3135.7178956472467266393@kernel.org> (raw)
In-Reply-To: <20261127085714.1207361-5-poros@redhat.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] In ice_vsi_sync_fltr()
(drivers/net/ethernet/intel/ice/ice_main.c), the error paths rewritten…
--
ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs
On PF VSIs, this patch replaces the per-VID ICE_SW_LKUP_PROMISC_VLAN
multicast promisc rule pairs with one VLAN agnostic ICE_SW_LKUP_PROMISC
pair, so the switch lookup table no longer runs out. It removes the
per-VID handling from ice_vlan_rx_add_vid() and ice_vlan_rx_kill_vid().
The multicast subscription is now reconciled from IFF_PROMISC and
IFF_ALLMULTI in one place in ice_vsi_sync_fltr().
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index 2ce2b7138f668..ea6da46bf7955 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
[ ... ]
> @@ -399,91 +408,65 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
> goto exit;
>
> /* check for changes in promiscuous modes */
[ ... ]
> + promisc_changed = test_and_clear_bit(ICE_VSI_PROMISC_CHANGED,
> + vsi->state);
> + if ((changed_flags & IFF_PROMISC) || promisc_forced_on)
> + promisc_changed = true;
> +
> + if (promisc_changed && (vsi->current_netdev_flags & IFF_PROMISC)) {
> + /* Apply Rx filter rule to get traffic from wire */
> + if (!ice_is_dflt_vsi_in_use(vsi->port_info)) {
> + err = ice_set_dflt_vsi(vsi);
> + if (err && err != -EEXIST) {
> + netdev_err(netdev, "Error %d setting default VSI %i Rx rule\n",
> + err, vsi->vsi_num);
> + vsi->current_netdev_flags &= ~IFF_PROMISC;
> + set_bit(ICE_VSI_PROMISC_CHANGED, vsi->state);
> + dflt_err = true;
[ ... ]
> + /* promiscuous mode implies allmulticast */
> + if (promisc_changed || (changed_flags & IFF_ALLMULTI)) {
> + int mc_err = 0;
> +
> + /* a failed DFLT install leaves the netdev promiscuous */
> + if (ice_vsi_wants_mc_promisc(vsi))
> + mc_err = ice_set_promisc(vsi, ICE_MCAST_PROMISC_BITS);
> + else if (!dflt_err)
> + mc_err = ice_clear_promisc(vsi, ICE_MCAST_PROMISC_BITS);
> + if (mc_err) {
> + netdev_err(netdev, "Error %d syncing multicast promiscuous on VSI %i\n",
> + mc_err, vsi->vsi_num);
> + /* retried by the next sync, with the allmulti change */
> + vsi->current_netdev_flags ^=
> + changed_flags & IFF_ALLMULTI;
> + set_bit(ICE_VSI_PROMISC_CHANGED, vsi->state);
> + if (!err)
> + err = mc_err;
> }
> }
> goto exit;
[Severity: Medium]
Does this retry actually happen? Both the comment above and the commit
message ("a failed DFLT install does not remove it before the retry")
expect a later sync.
Three error paths are involved: the failed DFLT install (dflt_err), the
failed DFLT clear and this mc_err path. Each one only sets
ICE_VSI_PROMISC_CHANGED, returns an error and leaves through exit.
ice_sync_fltr_subtask() calls ice_vsi_sync_fltr() only when
ice_vsi_fltr_changed() is true:
ice_sync_fltr_subtask() {
...
ice_for_each_vsi(pf, v)
if (pf->vsi[v] && ice_vsi_fltr_changed(pf->vsi[v]) &&
ice_vsi_sync_fltr(pf->vsi[v])) {
/* come back and try again later */
set_bit(ICE_FLAG_FLTR_SYNC, pf->flags);
break;
}
}
ice_vsi_fltr_changed() looks only at the UMAC and MMAC bits:
return test_bit(ICE_VSI_UMAC_FLTR_CHANGED, vsi->state) ||
test_bit(ICE_VSI_MMAC_FLTR_CHANGED, vsi->state);
ice_vsi_sync_fltr() clears both bits near its start. Only the out label
sets them again, and these paths skip it. So ICE_FLAG_FLTR_SYNC is set
again after the error, but on the next service task pass the VSI is
skipped and the flag is cleared.
The admin queue can fail transiently, for example in the FW ENOSPC ->
-EIO case from the commit message. Could the VSI then stay with
IFF_PROMISC set but no DFLT Rx rule? Could it also stay with IFF_ALLMULTI
or IFF_PROMISC set and missing or stale multicast promisc rules?
Removing VLANs to free FLU entries would not trigger a resync, because
ice_vlan_rx_kill_vid() sets no sync bits. The state seems to last until
an unrelated ice_set_rx_mode() call or an eswitch resync.
The old out_promisc label had the same gating, but this patch adds new
retry state and depends on it.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261127085714.1207361-1-poros%40redhat.com
prev parent reply other threads:[~2026-11-28 9:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 8:57 [PATCH net v5 0/4] ice: fix DFLT Rx rule handling for promisc and switchdev Petr Oros
2026-11-27 8:57 ` [PATCH net v5 1/4] ice: stop the service task before the PF is unloaded Petr Oros
2026-11-27 13:34 ` Ivan Vecera
2026-11-27 14:50 ` Przemek Kitszel
2026-11-28 9:30 ` netdev-bot+sashiko
2026-11-27 8:57 ` [PATCH net v5 2/4] ice: do not leave switchdev mode while representors exist Petr Oros
2026-11-27 13:34 ` Ivan Vecera
2026-11-28 9:30 ` netdev-bot+sashiko
2026-11-27 8:57 ` [PATCH net v5 3/4] ice: resync uplink filters after a switchdev session Petr Oros
2026-11-27 13:35 ` Ivan Vecera
2026-11-28 9:30 ` netdev-bot+sashiko
2026-11-27 8:57 ` [PATCH net v5 4/4] ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs Petr Oros
2026-11-27 13:36 ` Ivan Vecera
2026-11-28 9:30 ` netdev-bot+sashiko [this message]
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=179585821237.3135.7178956472467266393@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=aaron.ma@canonical.com \
--cc=aleksandr.loktionov@intel.com \
--cc=alice.michael@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=grzegorz.nitka@intel.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=ivecera@redhat.com \
--cc=jacob.e.keller@intel.com \
--cc=jbrandeb@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcin.szycik@linux.intel.com \
--cc=martyna.szapar-mudlaw@linux.intel.com \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=patryk.holda@intel.com \
--cc=pmenzel@molgen.mpg.de \
--cc=poros@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=sx.rinitha@intel.com \
--cc=wojciech.drewek@intel.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
all inboxes | Powered by JetHome®