Netdev List
 help / color / mirror / Atom feed
From: Petr Oros <poros@redhat.com>
To: netdev@vger.kernel.org
Cc: Petr Oros <poros@redhat.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Simon Horman <horms@kernel.org>,
	Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
	Grzegorz Nitka <grzegorz.nitka@intel.com>,
	Paul Menzel <pmenzel@molgen.mpg.de>,
	Wojciech Drewek <wojciech.drewek@intel.com>,
	Marcin Szycik <marcin.szycik@linux.intel.com>,
	Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>,
	Ivan Vecera <ivecera@redhat.com>,
	Alice Michael <alice.michael@intel.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Jesse Brandeburg <jbrandeb@kernel.org>,
	Patryk Holda <patryk.holda@intel.com>,
	Rinitha S <sx.rinitha@intel.com>,
	Aaron Ma <aaron.ma@canonical.com>,
	intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH net v5 0/4] ice: fix DFLT Rx rule handling for promisc and switchdev
Date: Fri, 27 Nov 2026 09:57:05 +0100	[thread overview]
Message-ID: <20261127085714.1207361-1-poros@redhat.com> (raw)

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


             reply	other threads:[~2026-11-27  8:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  8:57 Petr Oros [this message]
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

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=20261127085714.1207361-1-poros@redhat.com \
    --to=poros@redhat.com \
    --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=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