Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2822227rdb; Mon, 4 Dec 2023 08:24:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IG67v8hKht92xN8AtZpwDSXN1LdOiHLc7/ehYpfyZMiFGvbeBPQk6S4meDSz/p72ArkV3yM X-Received: by 2002:a05:6359:6794:b0:170:17eb:3781 with SMTP id sq20-20020a056359679400b0017017eb3781mr4141494rwb.41.1701707044292; Mon, 04 Dec 2023 08:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701707044; cv=none; d=google.com; s=arc-20160816; b=S4cEGF3QmiqxoGsth6Yh84/A6sF+Y/NfiTUtoVAAWXYd6pC8oSKuN5ApaNSow0RS5j ckniQjSSNU6cBLsMqEtaIs+NXPNOMfrO/cnPwY6B4zSypr9iil7o9sKSFOW0eFU7bJsU q6V6eyBA896CjoeajJ4/V2ra28On+aTQznDzBQ5LwT/euFY/zaWg15B+1ym6+HX6C3RH RVV1d8nAPbyCXDXeeIgjxQzdJBS9Qpk2E+L3JdATJFTyzA8mMNrtA4OoKvb1bVuAFQgm EkfvT7qSq/+xgLlosQytwA8Nf/iioPMmsvcXWq44vEa+XhaY2AiFaBiyOG50OaYMLlzD bgtg== ARC-Message-Signature: i=1; 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=ZbKR/GiibxinMTwe3e1OL0Fk+/8nfwiJudNZL/nfcCA=; fh=wF9sg2YKRy/mhluOpUwroQPBxl99MdbRccr9km/XeIg=; b=vhugn2fUwIj2jRhC86gFsOaPVLsLgVYfcZZ+PDTUHRhelFDCNTu8ly+MltsIkqEa/V at+B1BWfO+JfqfBNOMveciSWYzH4nHx0A1q8z9qKzFMAm1HrP+/+RCuiVJiZKruGkITW kUeMRxgwstL8DhMkYGi7tIZIY/jvKmtblujPqMWEnchZl5NW1H1QF16utjavkb479N8T HbfGhrl7/AH8tpw5qxWFSjXj6eETGXcIOyYpetzWEO9n+CFmfDgqM+Uij4fbDdxNd/dY 4YVj0+zF2ukzP3u8wLjWOvmsULLeY39w1bDMGqvn+W84/gqiXhd/jCRbUl+3uTb1ZsKI kfiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZDRxVbwm; spf=pass (google.com: domain of linux-wireless+bounces-383-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-383-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q17-20020a632a11000000b005c62aaed5acsi7746372pgq.889.2023.12.04.08.24.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 08:24:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-383-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZDRxVbwm; spf=pass (google.com: domain of linux-wireless+bounces-383-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-383-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6F4E6B207E7 for ; Mon, 4 Dec 2023 16:24:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0779E2DF73; Mon, 4 Dec 2023 16:23:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZDRxVbwm" X-Original-To: linux-wireless@vger.kernel.org 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 D5C532D796; Mon, 4 Dec 2023 16:23:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FE7CC433C7; Mon, 4 Dec 2023 16:23:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701707035; bh=ZbKR/GiibxinMTwe3e1OL0Fk+/8nfwiJudNZL/nfcCA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZDRxVbwm2GN/xBSUZOmrGkqtv7Xp4TMPCwMyiF8S+KkDBJdk/IpcWQEcnhiefUhsd vXiT1+vs/5+5wUEvZF06zYVGojR9mtQyIY3YEzIFl+geUIUFptBqvGLglTr4E6IYd1 dYuJX7RZ57RMJ44NyozolZIJ96w81GC2xyi987CgMlRLSVPml+YiaIJDcbR8KURw0m idCPWULoSF0cYuB0IRdMpIteazE7pd+yK3FdqTbkCyf93rgLT/IqQoCfxz9/5yjECJ pDBgdQJ3YKuS4kzSeJjIzdIgiJFMnjmFN+FxmyDL6mmnxFgrJxg8D7Lox4LFq3jRqq RuKWcGYgFZ3wA== Date: Mon, 4 Dec 2023 08:23:54 -0800 From: Jakub Kicinski To: Johannes Berg Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH wireless-next 0/3] netlink carrier race workaround Message-ID: <20231204082354.78122161@kernel.org> In-Reply-To: References: <346b21d87c69f817ea3c37caceb34f1f56255884.camel@sipsolutions.net> <20231201104329.25898-5-johannes@sipsolutions.net> <20231201162844.14d1bbb0@kernel.org> <339c73a6318bf94803a821d5e8ea7d4c736dc78e.camel@sipsolutions.net> <20231202104655.68138ab4@kernel.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 03 Dec 2023 19:51:28 +0100 Johannes Berg wrote: > I think I wouldn't mind now, and perhaps if we want to sync in netlink > we should also do this here so that it's consistent, but I'm not sure > I'd want this to be the only way to do it, I might imagine that someone > might want this in some kind of container that doesn't necessarily have > (full) access there? Dunno. Also dunno :) We can add a "sync" version of netif_carrier_ok() and then call if from whatever places we need. > We _could_ also use an input attribute on the rtnl_getlink() call to > have userspace explicitly opt in to doing the sync before returning > information? Yeah, maybe.. IMHO a more "Rusty Russell API levels" thing to do would be to allow opting out, as those who set the magic flag "know what they are doing" and returning unsync'ed carrier may be surprising. Also a "don't sync flag" we can add later, once someone who actually cares appears, avoiding uAPI growth =F0=9F=98=81=EF=B8=8F Anyway, up to you :)