Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1595826rdb; Sat, 2 Dec 2023 02:06:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6hZiNAL6a7IQbxxDdF3699KPy5KTy3zhaYkr1DzCdJt+G8NgBnGemX8mH2qnjC0fJ5eM3 X-Received: by 2002:a05:6a20:7fa8:b0:18b:47a9:66e9 with SMTP id d40-20020a056a207fa800b0018b47a966e9mr1568465pzj.40.1701511611533; Sat, 02 Dec 2023 02:06:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701511611; cv=none; d=google.com; s=arc-20160816; b=K99f5s3nutzBk7mnZF7Sj9SRtEGOgm9OcC3CyIITFs8q9IMekBQBdfvI85ZYchGyIg hV/jNyiqfJMeZnRKt0KXKxgKozSjKXjHfwBuZsQEf3nMBNx1Ft0EAEOkdzOTRB4rtWsx a30qCiZkg/BzK+fyxdBNQzw1C6Ytd+aZ3c1yxapNcdGhK9zkEZPnyG5VGS8I1XoZZ4Dq d+rasBvLv/H1ALLTTy4xOiWtbc1DeJ6Z2M31ZbsqsH29R8GmJCMamfEAxV+PoCGK1jTS 6eGSiVleelh6ieztSbE3nlELR/s+cDtvFpAuLdPIj4p6eFY9M4DKTR2dsi3ENYlsrkNt MRng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=o45hdsTEGxCn0t+rxCqz3d1GuoH4T/qGAEWkFyx+Odg=; fh=33XtzQ/E2pdadowxwg/0e1DZz7ZaQldbm6WDiovYgRU=; b=P271dUScHWS7h+E1Yt1xbk/9oLs+f8mdLXB4U5veT6ozGJEZkOlELQrbQuD5Pedvnf lcvGF7Zwh+/dzGC2tn2mOJioHrD/R7WDGLKV0M6PrHJJMuD2KXcv1cKrz6MCH5Ye3WAn k6M+EOYRaL6G2xsZFR8Z8ekdR0OUnLfGpQ76YgcR3KHb8vU/Navm3ReSlt+okuvCr/pB 6DF5fdBT2jF7p8vF9vP0+MQtQFzkhLz4Z2aenE9Ma/TxbJ+y2ovHeeDqac84pXCaQVGJ tORa9gU0Nctji1gkroJfLnnbpI39P//gCt9mxT+l3GdvIyTQQfqfJLxyRZdl1Ax1f2No ZiNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=wSmehsPW; spf=pass (google.com: domain of linux-wireless+bounces-323-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f13-20020a65400d000000b005c200b11ba7si4733537pgp.763.2023.12.02.02.06.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 02:06:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-323-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=wSmehsPW; spf=pass (google.com: domain of linux-wireless+bounces-323-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CD0E6281C31 for ; Sat, 2 Dec 2023 10:06:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE6FB15ACE; Sat, 2 Dec 2023 10:06:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="wSmehsPW" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA0C4D67; Sat, 2 Dec 2023 02:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=o45hdsTEGxCn0t+rxCqz3d1GuoH4T/qGAEWkFyx+Odg=; t=1701511600; x=1702721200; b=wSmehsPWm3+GGZlale9ITHw5TzablTSPziSGSvbGAUlynhY TA1dRhGa013lnCDdpgnaZblCX6N9s4VAle8vEjvM257LAf+KVlnVMJCJtcXKHXcYVGaEbI8zgoU+n GIGLqaVbKAL9/d68XRdv/Hls70O46k4/vw1IQlrJ2l23TlcdpZptv9YjQW4LieXF7sc1R+m3VCHA6 BPL4Hx6AczsBbjPAk8SodMpk/Q8ogc2vOmQI/zBH0i5xD3It/RzcPj9IBXYnfnAnlbnRt/+2GqDjp RK7ddV+qL/cKOfw/kNz+vUnjrqMzWGk7AjaeMeZvWhEhPqUguXo6jnogRCvMpkPg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1r9MtR-0000000CPtN-3yIk; Sat, 02 Dec 2023 11:06:38 +0100 Message-ID: <339c73a6318bf94803a821d5e8ea7d4c736dc78e.camel@sipsolutions.net> Subject: Re: [PATCH wireless-next 0/3] netlink carrier race workaround From: Johannes Berg To: Jakub Kicinski Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org Date: Sat, 02 Dec 2023 11:06:36 +0100 In-Reply-To: <20231201162844.14d1bbb0@kernel.org> References: <346b21d87c69f817ea3c37caceb34f1f56255884.camel@sipsolutions.net> <20231201104329.25898-5-johannes@sipsolutions.net> <20231201162844.14d1bbb0@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Fri, 2023-12-01 at 16:28 -0800, Jakub Kicinski wrote: > On Fri, 1 Dec 2023 11:41:14 +0100 Johannes Berg wrote: > > So I had put this aside for a while, but really got annoyed by all > > the test failures now ... thinking about this again I basically now > > arrived at a variant of solution #3 previously outlined, and I've > > kind of convinced myself that userspace should always get an event > > with a new carrier_up_count as it does today. >=20 > Would it work if we exposed "linkwatch is pending" / "link is > transitioning" bit to user space? Not sure, not by much or more than what this did? It's basically the same, I think: I exposed the carrier_up_count at the kernel time, so if userspace hasn't seen an event with a value >=3D that it knows the link is transitioning. > Even crazier, would it help if we had rtnl_getlink() run > linkwatch for the target link if linkwatch is pending? Sure, if we were to just synchronize that at the right time (doesn't even need to be rtnl_getlink, could be a new operation) that'd solve the issue too, perhaps more easily. johannes