Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2082439lqa; Tue, 30 Apr 2024 07:45:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVBC0+nKW90dEWLIXuQxtXqfe5tbruB9OMSCyZP0eWAKtVAq58gZOlHvxCpED8pD2zO7cRjBHk8SfSxMT6kDExV3mRPFmzCSls6yHi84Q== X-Google-Smtp-Source: AGHT+IGSwR0QT+tM1FjvfTVJ4csP8MZXPHQMy+5gpBkvOci6QXBJo5Z8XM/EyyYNEnaItGxAgygq X-Received: by 2002:a05:620a:1993:b0:78e:dd41:29e3 with SMTP id bm19-20020a05620a199300b0078edd4129e3mr18173465qkb.35.1714488357595; Tue, 30 Apr 2024 07:45:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714488357; cv=pass; d=google.com; s=arc-20160816; b=MDVMMaJuKEzIim0vcgWzVkFebkm/Y7xhWoIzPnFVh04JZFaBKj01gUCqOPJ1sjfHdh P307hL6hvLIAMX0HlXqHJsXjqvkQvkEQewBukMXkRaX3/r0GuSXzjwGZts7Tk6c4HWeS SbQitmgGyGjYPZVybbRukBXcWcziTTeXdLUakfJQ0fx1i0dNgoMQypH4NLc8M9/LYpTK JdR9DcIZBRjQUr3zOOTMY+Lyt38HSWZ8j6PebDS/izI2HIFi+KeFeGWNr4FFvhPYEkGh lx+VNwKlI4POMigryv22IrA2wbrG6qd/lTyx7MkIwBSH1D6BOWoW1QMqMNePa7EIwnKB H3Ow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=H4mLifNQ8FrIa/7YCjyYid/VfyLmmcxHmngE7TMpg3w=; fh=t1qVYhxaPJzDJLLHUqilzQXhc6fd/cVAZ/NhMNE0noE=; b=oYZxPPNLZFH7u+E2jd9lTiw1WdT/PGpUEAAB/5Qm3tICfbsrYX6LWN/CAjATY5DNSp 15OvAJD3C67paxeH7F5G46Bvy1OyhWA6EZef8KcZEmeqI1ZpVxL+PSn2oBI23mLnWiE3 Iui9lCI8A4HgzNAlTBOwwyXbuFKzUbj81kfkfcZy+PAJshLfpf/V7TeqoPpkXZib+Wua zwqwm3o8dHA4UcERD7B2bM/uP3oufhpPFl8v1OgUDMAlAPvpLdSCLAzOIkgOr37HxI6J afggfuZZiv/Y1iJtES6dkxVmekpPKJ+Cvif+RudTwBo98+VfrovpFVmJZw7iSy8iYMN6 1EWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X5zb0+b7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-164188-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164188-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y5-20020a05620a0e0500b0078d69110f79si27416541qkm.486.2024.04.30.07.45.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:45:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164188-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X5zb0+b7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-164188-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164188-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 510DB1C22C38 for ; Tue, 30 Apr 2024 14:45:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 12859152781; Tue, 30 Apr 2024 14:42:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X5zb0+b7" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38B931527B2; Tue, 30 Apr 2024 14:42:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714488174; cv=none; b=UTcSqs6BVEu9Jp8f2U/9GZEEtNOaQycuu1vbcc18L8Fh6axa10nj9Dkm4EzR2s/jHZJSlqOXRotJub0Nn4/IFOeOFkJtJU/ij78j3OP3jsoczLbWAaH0m+vKhjdrTJCBjW+xUxsk0Zk+pH0Tjx/IHf/Mt3d7easYyWW2jlNl29k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714488174; c=relaxed/simple; bh=QH1dfcYyIcPetkUCl+atKwQJ978quIcfRWzXslCTQwI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lkUgWS7fOMnXw9vFwNo7EUosT9XhEUYJla+bHpVZiRjxg0ClYJ9YkIfXliHH8i6bsGbaqcyeW/V/Y+qITlhS3oF0QmVtMdcx8bGv/TLe020Bqkx0Rpj1qbE/7UXTDXolAE2lgTuTwCyop50tTDOAa4ZIfLcinEyPGdoF/jilRZU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X5zb0+b7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E979C2BBFC; Tue, 30 Apr 2024 14:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714488174; bh=QH1dfcYyIcPetkUCl+atKwQJ978quIcfRWzXslCTQwI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=X5zb0+b7+f45iFblEiSD/PT3vhYkLnqmZt0lVzVvqm5be/Ryl5j5Vft1WqY9bN9vv Pg/BitOvX6C7v8nBBjjeLK4v4N1UmN5dyReZT/34rnVY0JK8/wRMuf57VbvhRkigVu ABwlzx19+Ymje6YrRjRfDsnkKL04JsgeCzJVm+O4JmuLTV6ua6BLEVXli/hl0cs+rG 5GJZ4E8GKI83/KJLHc+WO8Uao8CRJzFInfiC5gkEsi0VjIzek1mgMqYpr6n53stEPy hFBOv+DeGDlc6v9sRWDYNmdaRmWSrCtKcPaI3RuIzDDeiRP1xuzsOkdW15u7sbRLzI KlG73TU8hz/+w== Date: Tue, 30 Apr 2024 07:42:52 -0700 From: Jakub Kicinski To: Lukasz Majewski Cc: netdev@vger.kernel.org, Paolo Abeni , Casper Andersson , Andrew Lunn , Eric Dumazet , Vladimir Oltean , "David S. Miller" , Oleksij Rempel , Tristram.Ha@microchip.com, Sebastian Andrzej Siewior , Ravi Gunasekaran , Simon Horman , Nikita Zhandarovich , Murali Karicheri , Jiri Pirko , Dan Carpenter , Ziyang Xuan , Shigeru Yoshida , "Ricardo B. Marliere" , linux-kernel@vger.kernel.org Subject: Re: [net-next PATCH] hsr: Simplify code for announcing HSR nodes timer setup Message-ID: <20240430074252.2690b639@kernel.org> In-Reply-To: <20240430145243.34b82105@wsk> References: <20240425153958.2326772-1-lukma@denx.de> <20240426173317.2f6228a0@kernel.org> <20240429120904.2ab5248c@wsk> <20240429104026.0fe3de0f@kernel.org> <20240430145243.34b82105@wsk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 30 Apr 2024 14:52:43 +0200 Lukasz Majewski wrote: > > Practically speaking I'm not sure if anyone uses any of the weird > > IFF_* flags, but they are defined in uAPI (enum net_device_flags) and > > I don't see much validation so presumably it's possible to flip them. > > Ok, I see. > > Then - what would you recommend instead? The approach with manual > checking the previous state has described drawbacks. Add a bool somewhere to track if the timer has been scheduled? The NETDEV_ events in question are called under rtnl_lock, so no extra locking should be needed.