Re: [PATCH net v5 4/4] ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs

From: netdev-bot+sashiko

Date: Sat Nov 28 2026 - 04:30:55 EST


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