mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net v5 0/4] ice: fix DFLT Rx rule handling for promisc and switchdev
@ 2026-11-27  8:57 Petr Oros
  2026-11-27  8:57 ` [PATCH net v5 1/4] ice: stop the service task before the PF is unloaded Petr Oros
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Petr Oros @ 2026-11-27  8:57 UTC (permalink / raw)
  To: netdev
  Cc: Petr Oros, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Aleksandr Loktionov, Simon Horman, Michal Swiatkowski,
	Grzegorz Nitka, Paul Menzel, Wojciech Drewek, Marcin Szycik,
	Martyna Szapar-Mudlaw, Ivan Vecera, Alice Michael, Jacob Keller,
	Jesse Brandeburg, Patryk Holda, Rinitha S, Aaron Ma,
	intel-wired-lan, linux-kernel

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@redhat.com/

Link to v3:
https://lore.kernel.org/all/20260701133601.2118382-1-poros@redhat.com/

Link to v2:
https://lore.kernel.org/all/20260622113428.2565255-1-poros@redhat.com/

Link to v1:
https://lore.kernel.org/all/cover.1781786935.git.poros@redhat.com/

[1] https://lore.kernel.org/all/179495967132.3136.6714105968141020753@kernel.org/
[2] https://lore.kernel.org/all/179495967304.3136.16113490698897758196@kernel.org/
[3] https://lore.kernel.org/all/20261125124652.3843638-1-poros@redhat.com/
[4] https://lore.kernel.org/all/20261125224428.4126195-1-anthony.l.nguyen@intel.com/

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-27  8:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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  8:57 ` [PATCH net v5 2/4] ice: do not leave switchdev mode while representors exist Petr Oros
2026-11-27  8:57 ` [PATCH net v5 3/4] ice: resync uplink filters after a switchdev session Petr Oros
2026-11-27  8:57 ` [PATCH net v5 4/4] ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs Petr Oros

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®