[PATCH net v5 0/4] ice: fix DFLT Rx rule handling for promisc and switchdev
From: Petr Oros
Date: Fri Nov 27 2026 - 03:57:50 EST
Fixes for the promiscuous and allmulticast handling of the ice PF VSI,
and two fixes for the teardown paths they rely on.
Patch 1 stops the service task in ice_remove() before the PF is torn
down, where it was stopped before commit 8a37f9e2ff40 ("ice: move
ice_deinit_dev() to the end of deinit paths"). Patch 3 queues a filter
sync when a switchdev session ends, and a session that still runs when
the driver is removed ends in ice_remove().
Patch 2 refuses to leave switchdev mode while subfunction ports exist.
Leaving it then orphans the session, and patch 3 resyncs the uplink only
when a session ends.
Patch 3 lets the eswitch own the promiscuous configuration of the uplink
while a switchdev session runs and resyncs the uplink filters from the
netdev flags when the session ends, so the uplink no longer ends a
session without its catch-all Rx rule or with a stale promisc state.
Patch 4 subscribes PF VSIs to multicast with one VLAN agnostic promisc
rule pair instead of a pair per VID, so a wide VLAN trunk on several
bridge ports no longer exhausts the switch lookup table. A port with a
vid 2-4094 trunk goes from 12292 to 4104 FLU entries.
v1 to v4 were posted to iwl-net, and v4 went into the iwl pull request
of 2026-11-13, where the Sashiko review found real problems in both
patches [1][2]. This version reworks both and replaces v4. It is posted
directly to net, with intel-wired-lan in Cc, as discussed in the thread
on that pull request [3].
The final v5 also differs from what I described in my replies to that
review. Patch 4 no longer keeps per-VID rules for any PF VSI, so the
per-VID re-add, the rollback and the vid 0 recipe swap handling I
described there are gone, and ice_clear_promisc() clears only the VLAN
agnostic pair. Instead of skipping the allmulti branch for a promiscuous
VSI, the subscription is reconciled from both flags in one place, and
with patch 4 the resync of patch 3 no longer drops the multicast rules
or clears IFF_ALLMULTI. In patch 3 a new VSI state bit keeps every
filter sync away from the uplink promisc configuration while a session
runs, and patch 1 makes sure that the sync queued at the end of a
session cannot use a freed netdev when the PF goes away.
"ice: restore DDP state during PFR recovery", which Tony sent to net in
the pull request of 2026-11-25 [4], also stops the service task in
ice_remove(), but before ice_free_vfs(). Patch 1 keeps the place after
ice_free_vfs() that commit f844d5212cb0 ("ice: Fix removing driver while
bare-metal VFs pass traffic") chose, so that VF drivers in the host
still get answers from the PF while they are removed. The two apply
together without a conflict, and ice_remove() then stops the service
task both before and after ice_free_vfs(), so one of the two calls
should go.
Patch 4 builds on the ice_vsi_sync_fltr() changes of patch 3, which
needs the switchdev code from v6.10, so 6.6 and 6.1 need manual
backports of patches 3 and 4. The loss of the uplink VLAN filters across
a switchdev session that patch 3 mentions is older than this series, and
with patch 3 it also shows after a promiscuous session. I will send a
fix for it separately.
Changes since v4:
- Posted to net directly instead of iwl-net.
- New patches 1 and 2, found while reworking the switchdev fix.
- Patch order swapped, the switchdev fix goes before the multicast one.
- Patch 3, previously "ice: preserve uplink DFLT Rx rule on switchdev
release", reworked as described above.
- Patch 4, previously "ice: skip per-VLAN promisc rules when default VSI
Rx rule is set", reworked as described above. It now also keeps the
multicast subscription of a promiscuous VSI when allmulti is cleared,
unless another VSI holds the DFLT rule.
- Dropped the Reviewed-by and Tested-by tags of v4, both patches changed
too much to keep them.
- All commit messages say how the problems were found and how the fixes
were tested.
Link to v4:
https://lore.kernel.org/all/20260708125755.706263-1-poros@xxxxxxxxxx/
Link to v3:
https://lore.kernel.org/all/20260701133601.2118382-1-poros@xxxxxxxxxx/
Link to v2:
https://lore.kernel.org/all/20260622113428.2565255-1-poros@xxxxxxxxxx/
Link to v1:
https://lore.kernel.org/all/cover.1781786935.git.poros@xxxxxxxxxx/
[1] https://lore.kernel.org/all/179495967132.3136.6714105968141020753@xxxxxxxxxx/
[2] https://lore.kernel.org/all/179495967304.3136.16113490698897758196@xxxxxxxxxx/
[3] https://lore.kernel.org/all/20261125124652.3843638-1-poros@xxxxxxxxxx/
[4] https://lore.kernel.org/all/20261125224428.4126195-1-anthony.l.nguyen@xxxxxxxxx/
Petr Oros (4):
ice: stop the service task before the PF is unloaded
ice: do not leave switchdev mode while representors exist
ice: resync uplink filters after a switchdev session
ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs
drivers/net/ethernet/intel/ice/ice.h | 1 +
drivers/net/ethernet/intel/ice/ice_eswitch.c | 39 ++++
drivers/net/ethernet/intel/ice/ice_main.c | 233 +++++++------------
3 files changed, 124 insertions(+), 149 deletions(-)
base-commit: aa40afa831ebfe45e40a23721711059f2ac584d4
--
2.56.1