From: Ivan Vecera <ivecera@redhat.com>
To: Petr Oros <poros@redhat.com>, netdev@vger.kernel.org
Cc: 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>,
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: Re: [PATCH net v7 4/4] ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs
Date: Thu, 3 Dec 2026 11:57:12 +0100 [thread overview]
Message-ID: <5d871f20-7cb9-4a11-9bd8-6901c896a1e1@redhat.com> (raw)
In-Reply-To: <20261202071642.2527605-5-poros@redhat.com>
On 12/2/26 08:16, Petr Oros wrote:
> An allmulticast or promiscuous PF VSI with VLANs is subscribed to
> multicast with an ICE_SW_LKUP_PROMISC_VLAN rule pair for every VID, and
> each rule takes an entry of the switch lookup table (FLU), which has 32K
> entries for all PFs of the device. A port of a vlan_filtering bridge is
> allmulticast, so a wide trunk (vid 2-4094) over several such ports
> overruns the table. Firmware then rejects Add Switch Rules with ENOSPC,
> the trunk of the last port is only partly installed, and the default VSI
> (DFLT) Rx rule fails to install when a port turns promiscuous:
>
> ice 0000:5c:00.1: Failed to set VSI 14 as the default forwarding
> VSI, error -5
> ice 0000:5c:00.1 ens1f1: Error -5 setting default VSI 14 Rx rule
>
> Subscribe PF VSIs with the VLAN agnostic pair (ICE_SW_LKUP_PROMISC, vid
> 0) only. Drop the per-VID handling from ice_vlan_rx_add_vid() and
> ice_vlan_rx_kill_vid(), and stop clearing the multicast rules in
> ice_eswitch_resync_uplink(), whose queued sync now reconciles them. The
> pair matches multicast on every VLAN. VLAN pruning still limits what it
> delivers to the VLANs of the VSI, and with pruning off, as for the DFLT
> holder, it delivers on every VLAN. The subscription now follows
> IFF_PROMISC and IFF_ALLMULTI in one place, so clearing allmulti no
> longer unsubscribes a promiscuous VSI unless another VSI holds the DFLT
> rule, and a failed DFLT install does not remove it. As before this
> patch, nothing retries a failed promisc step on its own. The service
> task skips a VSI that has only ICE_VSI_PROMISC_CHANGED set, so the retry
> comes with the next filter sync that an rx mode change or the end of a
> switchdev session starts. ice_set_promisc() adds the Rx and the Tx rule
> one at a time, so a rule left by an earlier failure does not keep the
> other one from being added.
>
> A trusted VF that holds the DFLT rule no longer gets through it the
> multicast on VLANs the PF is not a member of, because the promisc recipe
> has a higher priority than the default one. It keeps what its own
> multicast promisc rules match.
>
> The overrun was observed on a machine in real use, and the allmulti
> problem was found by the Sashiko review of v4. The overrun reproduces on
> an E810-C (FW 8.1.1, ICE COMMS package 1.3.55.0) without kernel changes:
>
> for p in $P0 $P2 $P3; do
> ip link add br-$p type bridge vlan_filtering 1
> ip link set br-$p up
> ip link set $p master br-$p
> bridge vlan add vid 2-4094 dev $p
> done
> ip link set br-$P0 promisc on
>
> With the per-VID pairs a trunked port took 12292 FLU entries, the third
> bridge vlan add failed part way and the promisc on logged the errors
> above. With this patch a trunked port takes 4104 entries, all three
> trunks fit with 20387 of the 32768 entries free, and the DFLT rule
> installs. The FLU numbers come from a test-only debugfs file that issues
> Get Resource Allocation (AQ 0x0204). Also tested with multicast to
> joined and unjoined groups on member and non-member VLANs, with promisc
> and allmulti changed in every order, with VLANs added and removed while
> allmulticast, with a trusted promiscuous VF, and with the DFLT install
> made to fail by a test-only change. Also tested with a trusted VF in
> allmulticast over its VLANs while the PF was allmulticast, which still
> receives all of its multicast. No kernel selftests cover this.
>
> Fixes: 1273f89578f2 ("ice: Fix broken IFF_ALLMULTI handling")
> Fixes: 43fbca02c2dd ("ice: fix lost multicast packets in promisc mode")
> Reviewed-by: Ivan Vecera <ivecera@redhat.com>
> Signed-off-by: Petr Oros <poros@redhat.com>
> ---
> v6:
> - No code changes. The message says that nothing retries a failed
> promisc step on its own and what starts the retry (Sashiko review of
> v5).
>
> v6: https://lore.kernel.org/all/20261130132107.1177185-5-poros@redhat.com/
> v5: https://lore.kernel.org/all/20261127085714.1207361-5-poros@redhat.com/
> v4: https://lore.kernel.org/all/20260708125755.706263-2-poros@redhat.com/
> v3: https://lore.kernel.org/all/20260701133601.2118382-2-poros@redhat.com/
> v2: https://lore.kernel.org/all/20260622113428.2565255-2-poros@redhat.com/
> v1: https://lore.kernel.org/all/89efbea9831175e6f57e9fe8557f7a0e48e050b7.1781786935.git.poros@redhat.com/
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
prev parent reply other threads:[~2026-12-03 10:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 7:16 [PATCH net v7 0/4] ice: fix DFLT Rx rule handling for promisc and switchdev Petr Oros
2026-12-02 7:16 ` [PATCH net v7 1/4] ice: stop the service task before the PF is unloaded Petr Oros
2026-12-03 8:01 ` netdev-bot+sashiko
2026-12-03 10:55 ` Ivan Vecera
2026-12-02 7:16 ` [PATCH net v7 2/4] ice: do not leave switchdev mode while subfunction ports exist Petr Oros
2026-12-03 8:01 ` netdev-bot+sashiko
2026-12-03 10:56 ` Ivan Vecera
2026-12-02 7:16 ` [PATCH net v7 3/4] ice: resync uplink filters after a switchdev session Petr Oros
2026-12-03 8:01 ` netdev-bot+sashiko
2026-12-03 9:51 ` Petr Oros
2026-12-03 10:56 ` Ivan Vecera
2026-12-02 7:16 ` [PATCH net v7 4/4] ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs Petr Oros
2026-12-03 10:57 ` Ivan Vecera [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=5d871f20-7cb9-4a11-9bd8-6901c896a1e1@redhat.com \
--to=ivecera@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=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