Netdev List
 help / color / mirror / Atom feed
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 v5 4/4] ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs
Date: Fri, 27 Nov 2026 14:36:00 +0100	[thread overview]
Message-ID: <70c538f4-3878-4da4-bcb3-a96b67cedf52@redhat.com> (raw)
In-Reply-To: <20261127085714.1207361-5-poros@redhat.com>

On 11/27/26 09:57, 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 before the retry.
> 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. No kernel selftests cover this.
> 
> Fixes: 1273f89578f2 ("ice: Fix broken IFF_ALLMULTI handling")
> Fixes: 43fbca02c2dd ("ice: fix lost multicast packets in promisc mode")
> Signed-off-by: Petr Oros<poros@redhat.com>
> ---
> v5:
> - Reworked after the Sashiko review of the v4 pull. PF VSIs now always
>    use the VLAN agnostic multicast pair, and the per-VID multicast rules
>    and their handling in ice_vlan_rx_add_vid() and ice_vlan_rx_kill_vid()
>    are gone.
> - The multicast subscription is reconciled from IFF_PROMISC and
>    IFF_ALLMULTI in one place, so clearing allmulti keeps the subscription
>    of a promiscuous VSI unless another VSI holds the DFLT rule.
> - ice_set_promisc() adds the Rx and the Tx rule separately.
> - New title, was "ice: skip per-VLAN promisc rules when default VSI Rx
>    rule is set".
> - Added the Fixes tag for 43fbca02c2dd.
> - Dropped the Reviewed-by and Tested-by tags because of the rework.
> 
> 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>


      reply	other threads:[~2026-11-27 13:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 13:34   ` Ivan Vecera
2026-11-27  8:57 ` [PATCH net v5 2/4] ice: do not leave switchdev mode while representors exist Petr Oros
2026-11-27 13:34   ` Ivan Vecera
2026-11-27  8:57 ` [PATCH net v5 3/4] ice: resync uplink filters after a switchdev session Petr Oros
2026-11-27 13:35   ` Ivan Vecera
2026-11-27  8:57 ` [PATCH net v5 4/4] ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs Petr Oros
2026-11-27 13:36   ` 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=70c538f4-3878-4da4-bcb3-a96b67cedf52@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