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=okHtex9gh8SROMRgBoWVtWq0YQqX2O93SHiZHgHk4XSve1+pK4VdYTIHEvM2956PC/BT vNpovz7UFBcBvAUn9IYB/Mvpk7+t0gFR+6czbYaOQ3wDyF8J7ExR4yGdPOeC/V1QBQRId wRD6F6BIVlK7vWRkWHMogb8ObBGcLFGOfmKbdLGmJ6eR5GAkAn1FCfBea8p4BtJOXUlik y2J/6zcYa2qVDe+0R7TjrJXDc6+ZGOzDgRC4hgR5j4wjlHGinHrN5I7cwYzdnhfwofWM7 Njr+Y1RDunMgfCkefzziWPbLBF8GQOG/UvlNCGC7cNa1KYLwaWiaTPwjHA+lLf2i3PA== 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=4koMkxjt0ldI2qs8nilplDBA9ww0rM9sIWYTM3Pp0LDGhgzSqE7pVZg9v9SkncKcs3zp LmX2nfshUieJcAL3vyVzhEW8tI/dOGMZAvU+Sna5cvS5km9X0G9uaH5M9N6QidB+aPzUn XJ0oGi7n8acrqX4MAQyZOVfCufjF4vQ88aSgjz1RmUu/Xh9WamV8dJBF4ZD+4COKgaiXB 9hkhGjL7zXlamxMuhPtodtawoPriQyXxWYeAjIbzpYY2SluWM/LrkeYGLNp7SkRJM5X8J cNu/uYyK2bfVWne5vkJcuNh0HFazqzD3e3O9DdsiBZlnGSGNrHOpIhDa+TOPcRcMUHA== 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=i4kjWGHF; 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 EACA8606A32C for ; Thu, 3 Dec 2026 09:51:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EACA8606A32C 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=i4kjWGHF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796291489; 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=i4kjWGHFLdcsVpW0MWk0MRxMLXHmdZYQJ/j87KsOOZuIEeH/8yqNYo/Kaf+1DmXUbx5n5J xv3/aiYE+RaDhu98/iSpDeUJ27PWKP+ymatkn2kcn2j8DfT2fzCDfIL5NjhK4HStzN42td HIUVPaAdE+zlLEtgK4Vz872f5CxEfZg= 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: linux-kernel@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