Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp466552pxb; Mon, 8 Nov 2021 16:47:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2Ger/Spwimyp2BEOgu3khHC6Ge5jWuO4FyLb6BNUhvCaa0UJXofETnfkPmLLPI7eYqXH4 X-Received: by 2002:a17:906:1457:: with SMTP id q23mr4062984ejc.561.1636418832905; Mon, 08 Nov 2021 16:47:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636418832; cv=none; d=google.com; s=arc-20160816; b=jAnsPzXOkSsWFLO9gZyWm2hxvAR+16MZ8L/6Hxm8JMDyOt2Q54Kjnao8oyUExKt5Z+ x5mJ4p+AU8Hh8ae/1j4M0GWDXTnLKSa29m2f4TlylGSlXkvB/vf6RncR/ofMF9ssXzEh C8eRX7MHeuEAR8g5KaS1Srr6KAtPO1HOww01WQ6J+RVrbu3n0RSZwLl/W7LEqJf+0RIE ef/IX7xUO7ZNvcnUxCoOr9ZV6Z6BIQtbm8hS89IgCTSVvZIjBUgWBpncndBzDcOqCPw4 jhRYy2vsbAJOECdmC4n1NPV0uxdNDtqvwaPn7Dp0z8aKe5mKoc5qCAuJ5R2UHNfg1KMk 58wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=9UjBUqk8DF1tXz+hQtS4C6sYnR55I99az+KlTpMlFXU=; b=jk9GMkBrmy4I94fsm/7seR2OHC9NThTSr4z6PQ8eoUbJbNgIYs+Xv7RGyV5UwjBd34 lU6mAEhUj5JvYuFRGzPOpAX4L3Y6+dGeVdpjKz/kkcJXZJVZa8Zr23+Gxbwdkj3EBFPy g8krYHIrDYKsGu6s7iw/9MHFWnC5ABsdqGdIwl3VVWbCaEM9572YjZ/VkcX8sUAqKdUr 1tRKD8JxjrzciVoWrFqdfgpmoNZVbw4pp1WaGjDpn01pKmSIG+21oBsesQg3qI0FT3nK LCf254uELWkLkEsbYn0UafHB4LGxVdo2Hxfd+r+CFAr6OuYVMqeKeAF6LalWTzhMTgvk Ql/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nfV1B8AH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j15si29078680edl.466.2021.11.08.16.46.47; Mon, 08 Nov 2021 16:47:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nfV1B8AH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236003AbhKHSsz (ORCPT + 99 others); Mon, 8 Nov 2021 13:48:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:46990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235369AbhKHSsy (ORCPT ); Mon, 8 Nov 2021 13:48:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 42566619A6; Mon, 8 Nov 2021 18:46:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636397169; bh=OL2pijau4dCFXd79EY6K4KgyqMTw/4w/M9XevyAdKjw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nfV1B8AHWbUPJFCOG/FeW4DjNSZctOjvK02VByspEAFyKPVEvzqW84KIoCyf3rCbC pw6XSpccxuvfNvJwveA65upAFqQPw8iMjo2/iG8oBjV3dNtsZkeWZVeEpeeKnUa7vT HvDCggpZ/Xd2Xs0yqayoBVTG7yIV6RVR6Yk3ixL0VVvKF/2OcATnZ2p3z7ZZ2GAMOG ZX2T5UeI+IKgxWIWXe3TLLrS8CU2tRnj0/HRIDVFnpzKdwQFhON0q4e4h//DHNClY1 cA1qZuYp2QLV7BlHWzxVWm1rDWLOTmZTo7Gr09OKwvVAG2GorT3rr9pBHjOcPU+IJM EWWQyRriK/Vow== Date: Mon, 8 Nov 2021 10:46:08 -0800 From: Jakub Kicinski To: Leon Romanovsky Cc: Ido Schimmel , Jiri Pirko , "David S . Miller" , Jiri Pirko , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, edwin.peer@broadcom.com Subject: Re: [PATCH net-next] devlink: Require devlink lock during device reload Message-ID: <20211108104608.378c106e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <9716f9a13e217a0a163b745b6e92e02d40973d2c.1635701665.git.leonro@nvidia.com> <20211101161122.37fbb99d@kicinski-fedora-PC1C0HJN> <20211108080918.2214996c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211108101646.0a4e5ca4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 Nov 2021 20:24:37 +0200 Leon Romanovsky wrote: > > I prefer my version. I think I asked you to show how the changes make > > drivers simpler, which you failed to do. > > Why did I fail? My version requires **zero** changes to the drivers. > Everything works without them changing anything. You can't ask for more. For the last time. "Your version" does require driver changes, but for better or worse we have already committed them to the tree. All the re-ordering to make sure devlink is registered last and more work is done at alloc, remember? The goal is to make the upstream drivers simpler. You failed to show how your code does that. Maybe you don't see the benefit because upstream simplifications are hard to depend on in out-of-tree drivers? > > I already told you how this is going to go, don't expect me to comment > > too much. > > > > > However for net namespace aware drivers it still stays DOA. > > > > > > As you can see, devlink reload holds pernet_ops_rwsem, which drivers should > > > take too in order to unregister_netdevice_notifier. > > > > > > So for me, the difference between netdevsim and real device (mlx5) is > > > too huge to really invest time into netdevsim-centric API, because it > > > won't solve any of real world problems. > > > > Did we not already go over this? Sorry, it feels like you're repeating > > arguments which I replied to before. This is exhausting. > > I don't enjoy it either. > > > nfp will benefit from the simplified locking as well, and so will bnxt, > > although I'm not sure the maintainers will opt for using devlink framework > > due to the downstream requirements. > > Exactly why devlink should be fixed first. If by "fixed first" you mean it needs 5 locks to be added and to remove any guarantees on sub-object lifetime then no thanks.