Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796044885; b=0wiFNdnVRywQpf0etEcA92nr8CS0KBNL3mIDJkBVsoj87FxiBSMZ5EjuPMMQCFGjmZLB XBW8hcGHL4VKDDrNRFHh+U3yUHatNX0taSCllkraOLYgDvzjOrDQO4iNchjeJzcxmHe5k AcVcDvCb1wXT81saB+dHFy91CurzGJxQ07vRtg//FGgeFhSZrxRIk1p3a+UXxRzGXR92h 2fKtIq5B/ck7kFrHtzf6VIHVdsVIanLZhU6qngLkhRlWS/5Z4rvPT/zCPUDYwLGLOXCF7 lVCrNQtPYdOAaHJQTC0Fw/DYq4R8642OQ0rPrHIQmK0lkM7QNr9sbiAV7poC4bD2PGQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796044885; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Cc:Subject:Date: Message-ID:MIME-Version:Content-Transfer-Encoding:X-Scanned-By; bh=LTVrvHXhyf2h9t4rAWeN942wg3rRyd+vIOAJ1XYvNoQ=; b=eZiJlQ7m/Sb4Srp/rXewypSDK9fJWsjkXqdTZVOKxLWvWusTogaEBwV3ReX1W/Fv4M2e I5qv1U2xilohNtbPYm2gJDuifN1CIoh7s4D76bL5+zo9bG/IheQDCOA/j0sAJFgSaUV6o vjgqEnYdkNQMYIsiwdwrcO6bbD1doy5qLkqgzEPpQvAOVf3LkslMEm9YW3248Xo+zpiLQ Uk6l7u80xTPxX/8siCeyBoWSvyVkFhQRDaBpibHmx0V43ICiVs+B11MoygDTODX2d4LGe Q/KcyKZtVmsPg24d8CdqxQy/qx58nwYVy7gV58LHI7NnMidi6JWAtUzo+FTlSopQuEw== 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=AnNYb5xk; arc=none smtp.remote-ip=170.10.129.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 C1884606A327 for ; Mon, 30 Nov 2026 13:21:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C1884606A327 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=AnNYb5xk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796044884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=LTVrvHXhyf2h9t4rAWeN942wg3rRyd+vIOAJ1XYvNoQ=; b=AnNYb5xkrsN3VGS1AyKfHupFXYgjFQeYQGBADAXQ98PahrsnjiuJ2hvhhJ4MrhJw2qAXYi AyWmuyNgKlN4+g3msQPvEXCOxwQ4MVG5x2Dt2031yQm3tY8DXIix+vyqrNIwJaE8yWe520 aK9D58W8KdX8PWxmqCwXqjW1tVGuO4A= Received: from mx-prod-mc-08.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-159-Oa8JqGd7OqWCqY-A6jhLGw-1; Mon, 30 Nov 2026 13:21:19 +0000 X-MC-Unique: Oa8JqGd7OqWCqY-A6jhLGw-1 X-Mimecast-MFC-AGG-ID: Oa8JqGd7OqWCqY-A6jhLGw_1796044876 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 65920180060E; Mon, 30 Nov 2026 13:21:16 +0000 (UTC) Received: from poros-thinkpadp16vgen1.redhat.corp (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3C9FC1800543; Mon, 30 Nov 2026 13:21:10 +0000 (UTC) From: Petr Oros To: netdev@vger.kernel.org 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@lists.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH net v6 0/4] ice: fix DFLT Rx rule handling for promisc and switchdev Date: Mon, 30 Nov 2026 14:21:02 +0100 Message-ID: <20261130132107.1177185-1-poros@redhat.com> 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 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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]. v5 reworked both and replaced v4. Since then the series is posted directly to net, with intel-wired-lan in Cc, as discussed in the thread on that pull request [3]. The series 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 v5, all after the Sashiko reviews of v5 [5][6]: - Patch 2 checks pf->dyn_ports instead of the representor xarray, which ice_sf_dev_probe() can change without the devlink lock of the PF, and refuses only the switch to legacy. New title, was "ice: do not leave switchdev mode while representors exist". - Patch 3 drops a pending filter sync when a session starts, so that a session a reset creates again does not run the sync queued at the end of the old one, and adds a full barrier in ice_set_rx_mode() before the is_running test. - The commit messages are corrected where the reviews of v5 showed them to be wrong or incomplete, and the message of patch 1 says which older problems on the other teardown paths are not changed here. - Patches 1 and 4 only changed their messages, so they carry the Reviewed-by tags they got. Patches 2 and 3 changed code, so I did not carry Ivan's tags there. The older problems that these reviews found next to the changed paths are not addressed here, see my replies in the v5 thread. 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 v5: https://lore.kernel.org/all/20261127085714.1207361-1-poros@redhat.com/ 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/ [5] https://lore.kernel.org/all/sashiko-outbox-238568@kernel.org/ [6] https://lore.kernel.org/all/179585820824.3135.14448452752875011743@kernel.org/ Petr Oros (4): ice: stop the service task before the PF is unloaded ice: do not leave switchdev mode while subfunction ports 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 | 44 ++++ drivers/net/ethernet/intel/ice/ice_main.c | 242 +++++++------------ 3 files changed, 137 insertions(+), 150 deletions(-) base-commit: aa40afa831ebfe45e40a23721711059f2ac584d4 -- 2.56.1