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=1796291489; b=O0rA3e//xZWvtgpCdFIXY6SQOZQOwL8SP8n7+Tl6NfncrKIpQezu545L2uCkdTxO1FmU gBST9KDXF7FcE0ONjHH6KeMi7xESme4YiVekJ8nkWnbyt5FGPrbBvAArVBrQzOFDRozBx PMJpE6KSsF4YgiFWHgX9GOvhfPBESn8XzeosU/mJnF0DLY71zawPu3tj50YEMrj8X4eDl dbj3NPVUkCoRfeeY/eiS96+EcHb8YSB8Jf6cPp3906Po72h/E9b2ztOTsh0vnSHK5m/e1 LpoQM55WbJVsX7OnaJbnFDveJ7rU0B876ylB4JN8V7+DSkqq05mZOAsdWwcHlFkSaqQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796291489; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Scanned-By; bh=tfF+pR69Xl6B1s3YJdx6m4hViNykdBKCW9iWnh1MR6E=; b=ms0wJVDm/IhxFWL7ggSxrz6s7Q2K4AwiHR6wSYp+Bokhe484awEwfBy4LjrtiXSGJY4S d7qjyIjasH5bK1sbXHG1hnawxibCiN2cCw0pv4SxW+xFWh880+9z+o7VhcQ1Jobg12GOn qwUs26PuDl46sy4t+Yqva/Y9OlWDLjNm5SKxW8lxFLejttR2ZMY1rT4Yvql1IhBwXtk2y g8X1BxIWugZbxNSG+x8P0QP61uoy2eKzsZebEu9NazjnEMiXAbNds3kTMax3ag12lXZtT ht7Dc/z17pST51SNfIU1Ny/yve85S3jluRK7Q9ODkT1ff0anmX156is4zNN0cKE2fcA== 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=L59imiau; 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 4FBC7606A322 for ; Thu, 3 Dec 2026 09:51:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4FBC7606A322 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=L59imiau DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796291488; 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: in-reply-to:in-reply-to:references:references; bh=tfF+pR69Xl6B1s3YJdx6m4hViNykdBKCW9iWnh1MR6E=; b=L59imiau3Wesw91Rg6fiS3urfdbGQ43j7xUCCYRtFoiadFbyJMwwfpj4uOYsRfneoLquQU k7wu/jfz++g66CmltSMy3WN4xbQSHwU/ECc3yj24LweuyKEoTLPr5KPpzItFNyXGuHgM1K d4n6N2ur2pUuxnMzoOjChR2pWkWNzg8= 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-656-PUa0cjICO0ypiqsigicBgA-1; Thu, 3 Dec 2026 09:51:23 +0000 X-MC-Unique: PUa0cjICO0ypiqsigicBgA-1 X-Mimecast-MFC-AGG-ID: PUa0cjICO0ypiqsigicBgA_1796291480 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 55B7B1889B47; Thu, 3 Dec 2026 09:51:19 +0000 (UTC) Received: from poros-thinkpadp16vgen1.tpbc.com (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0CFA730000E8; Thu, 3 Dec 2026 09:51:11 +0000 (UTC) From: Petr Oros To: netdev-bot+sashiko@kernel.org Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org, 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 Subject: Re: [PATCH net v7 3/4] ice: resync uplink filters after a switchdev session Date: Thu, 3 Dec 2026 10:51:08 +0100 Message-ID: <20261203095109.3289229-1-poros@redhat.com> In-Reply-To: <179628491749.3146.14362879400914207891@kernel.org> References: <20261202071642.2527605-1-poros@redhat.com> <20261202071642.2527605-4-poros@redhat.com> <179628491749.3146.14362879400914207891@kernel.org> 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.4 On Wed, Dec 03, 2026 at 08:01:57AM +0000, Sashiko wrote: > Would a per-VSI mutex around the filter and promisc state give the same > exclusion, with proper acquire/release semantics? No, it would give none. The state the two new sections touch is the state ice_vsi_sync_fltr(), ice_vlan_rx_add_vid() and ice_vlan_rx_kill_vid() already touch under ICE_CFG_BUSY in vsi->state. A fresh mutex taken only by the eswitch paths would not exclude any of them and the handoff would stop working, so all of them would have to be converted at once. ICE_CFG_BUSY also cannot just become a mutex. ice_reset_subtask(), ice_watchdog_subtask() and ice_update_vsi_stats() only test_bit() it to decide whether to skip a pass, so it would first have to be split into a lock and a separate "reconfiguration in flight" flag, across vsi->state and pf->state both. That is a driver wide cleanup, and this is a fix for net with four Fixes tags reaching back to 1a1c40df2e80 ("ice: set and release switchdev environment") from 2021, headed for stable. The review found no concrete deadlock among the current holders, so there is nothing incorrect here to fix, and using the serialization the driver already has is what keeps the backport small. > This version had to switch ice_vsi_sync_fltr() to clear_bit_unlock(), > but other holders of the same bit still release it with a plain > clear_bit(): Fair, and pre-existing. Both VLAN ndos write current_netdev_flags and reprogram promisc rules in their section and release with plain clear_bit(), which is already weak against ice_vsi_sync_fltr() without this series. v7 tightened the one release the handoff depends on and left the rest alone on purpose. I will send the ndos, and the full conversion if people want it, for net-next. Thanks, Petr