From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796295448; b=xbZ5iETnO1B0W3iw6LjGdJ60pIis7lSKvaUbGFIIaA/usGjVOhawVIXp7U4OyP2BZuZC V4F4wdl76eymvGu/vVOXmzd1DYTEiR4MStlNDZ/+aJFg/uR3nMInCgITOmm+gy1s1QLxU USQQKNIOsJleNuUelW8XztacTQHsrl8P+f35heDfS6mNgeo5FgtjhF4FYaSlpNzO/mEAv lPeiaFr5PE0kxBcT/GIjBvNSwpT7VIcZtl2auddxpctqNsExNJvJLll40uQFstQknrbYu /7gNIrdGo3iryxhRHXaToXvqQbq4FPJVQ5lgXASM9INDXKFy8qlPG3SEHlxyH4nuHeA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796295448; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-Scanned-By; bh=727Jjeb7TkPaPZm1NeGcGhEnmqAidjtxyGn4RaKd8LA=; b=rE+iX3nM1HcTA2Lfn4m80wVlNweyss353FtV9xBcwM0wxkpLEOGsWWDmGtSpOsXGgJVS W33KJhzfjKpR4A/seDrNwVe6iYJ+gsg3sGpNvaYwxXGqvS+vkCl7UTqxojxEXub2qYB59 9l5Car6q7V37s3rcFOnP49kAxiLb492ezGl2u1qKdn75umc1IEf3m+VSHMixLeEBpT1wE ku1QdnisfshbJZC8oLh9Fsdno1bSVgQQdnMSss6IbYETAeBFWiOiAYJ6Tf63LEwhxA8R4 kRNUElcdukA8W1FC3I9aG8v9WnmHSp/T5w5OQQGxm8nekzXYTuWECMMi/Hz0Rbr9PIQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hefWpire; arc=none smtp.remote-ip=170.10.133.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC6A7606A32C for ; Thu, 3 Dec 2026 10:57:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AC6A7606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hefWpire DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796295446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=727Jjeb7TkPaPZm1NeGcGhEnmqAidjtxyGn4RaKd8LA=; b=hefWpireiPl/d6v2v+286W/K0MHS7Hokg2kToyzMn/yovHsMoPwHpEEzSkJbCOyoURFaft WkxrpgCKyiCo9288fpLN1Tqi/URWCFcQ50CCpSn2wwL+sMgs/mP27d96OSmukWGeE+h0Qc uFbHSNyLAymj1GbqZpDUlgz6u4lJGd0= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-646-06Bbc2J6NgqWzuh0_Ew3iQ-1; Thu, 3 Dec 2026 10:57:22 +0000 X-MC-Unique: 06Bbc2J6NgqWzuh0_Ew3iQ-1 X-Mimecast-MFC-AGG-ID: 06Bbc2J6NgqWzuh0_Ew3iQ_1796295440 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CA1101865578; Thu, 3 Dec 2026 10:57:19 +0000 (UTC) Received: from [100.91.101.41] (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D72CA1956088; Thu, 3 Dec 2026 10:57:13 +0000 (UTC) Message-ID: <5d871f20-7cb9-4a11-9bd8-6901c896a1e1@redhat.com> Date: Thu, 3 Dec 2026 11:57:12 +0100 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net v7 4/4] ice: use a VLAN agnostic multicast promisc rule pair for PF VSIs To: Petr Oros , netdev@vger.kernel.org Cc: 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 , Alice Michael , Jacob Keller , Jesse Brandeburg , Patryk Holda , Rinitha S , Aaron Ma , intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org References: <20261202071642.2527605-1-poros@redhat.com> <20261202071642.2527605-5-poros@redhat.com> Content-Language: en-US From: Ivan Vecera In-Reply-To: <20261202071642.2527605-5-poros@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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 > Signed-off-by: Petr Oros > --- > 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