Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp749886pxb; Wed, 29 Sep 2021 08:57:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvIJAbUicjCF4sP+y7RIzdQrMC0TwLcHoXnrbdE31cnOS1IM3l3E2K5BqwfFPtb5naiSMe X-Received: by 2002:a50:8206:: with SMTP id 6mr746164edf.220.1632931034157; Wed, 29 Sep 2021 08:57:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632931034; cv=none; d=google.com; s=arc-20160816; b=o8dN3b9YIHVNq13b6Ne0sTXUGYhWk7r5Z2Uf7kU9cf7jnKf1oLt/al8mpnAqCFrI+9 UssENLvMxkuiJElnPzbeoT2pjmzzblM3w+w4tHC9rs0yuDZn1fApWpbIC+eDKtITizZf EF+/rpzt+GHOG38KLDqARB9MThoR+ZzaKMFtSYg3aSoxQYUDarUL5iyHhUZwBPo65QrR wELz/cnP3hp4uKUoPa4Hlmdt+k+zAKBp87SbA3NwX6AZzrktuiimjMxYrfiyJLwekqHk 41nJJWspCJmJYGBmNrQszVweSBIugNzgqp2VAmvyoH8ny3cDG8Gon+IXLm/hkqsvceD9 KlOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tEU9sP09sFS0SxVFZ8VqT2tze/wPCoJQMtS7iGhwebE=; b=HKId9qgluYzJEkZI9pTCcHZFg0D37ChT78vKw6Z3tc4pGnnIQ8iAAzviuk2VhvYo3+ J2p+r2H+KA0B8UtNBOwXaen+APaB7PkFgQE7/2qjomFV4HiWYOT2/ZK+BZSWwhLbdGXe tkbcFVGxB7hLBVjKbfrvd7kQjyPxVa8flfhUYulto46uTE8vGTy3+uogYCHKtF7N+rzJ HDW7lik9gke79AxC+Z6usK5We4pmBtl8HMDScol4DZuYk9lnsiBhq2CTh3kr2RhlySV7 y9Mtv/tI5X3Sh/LRQLNTNUUx7RQ++pehFYf52VtBEXSFzYuQ+qazmyZ6al2GbbDjyPjx duPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a0WROnPx; 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 c14si324701edx.189.2021.09.29.08.56.42; Wed, 29 Sep 2021 08:57:14 -0700 (PDT) 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=a0WROnPx; 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 S1343749AbhI2OPO (ORCPT + 99 others); Wed, 29 Sep 2021 10:15:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:49172 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245475AbhI2OPN (ORCPT ); Wed, 29 Sep 2021 10:15:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 89A87613A5; Wed, 29 Sep 2021 14:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632924812; bh=eTAv1pPSQ34h7VzKpHo4amccmSX8My0viltKfGFPAcs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=a0WROnPxlwaBTjZsiibH7NJovqQtTcIp/K8ms+STDcB0ptV8A0iGu7jLOLUA/zrUB INOdkTNqEr+HXCsQa1FZU+yqpPcoGYOARxzTUh4ePsGKUBDxazH19ImM81Ssee+Mva nxmG8NM2AaOVNzG/J2UsGMAVksZFTUppR7ziA8M1mXemH97Vk+d8qoG0kYGWYdGish B9Qy4lryafOY6AelPhxlIm1cVnoVDb/CTbTE2vOsJMA/xb1kJPJdpk1+5jbmmd2KC3 vu3OyQvXaUDO9c51VtuIqQLJ54Y/7pkwRb/Ky5I0hyfeuWwgf9qtylbgp9JyDEXnTB kSVVs8i8WEI2Q== Date: Wed, 29 Sep 2021 17:13:28 +0300 From: Leon Romanovsky To: Jakub Kicinski Cc: "David S . Miller" , Alexandre Belloni , Andrew Lunn , Ariel Elior , Bin Luo , Claudiu Manoil , Coiby Xu , Derek Chickles , drivers@pensando.io, Eric Dumazet , Felix Manlunas , Florian Fainelli , Geetha sowjanya , Greg Kroah-Hartman , GR-everest-linux-l2@marvell.com, GR-Linux-NIC-Dev@marvell.com, hariprasad , Ido Schimmel , intel-wired-lan@lists.osuosl.org, Ioana Ciornei , Jerin Jacob , Jesse Brandeburg , Jiri Pirko , Jonathan Lemon , Linu Cherian , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-rdma@vger.kernel.org, linux-staging@lists.linux.dev, Manish Chopra , Michael Chan , Moshe Shemesh , netdev@vger.kernel.org, oss-drivers@corigine.com, Richard Cochran , Saeed Mahameed , Salil Mehta , Satanand Burla , Shannon Nelson , Shay Drory , Simon Horman , Subbaraya Sundeep , Sunil Goutham , Taras Chornyi , Tariq Toukan , Tony Nguyen , UNGLinuxDriver@microchip.com, Vadym Kochan , Vivien Didelot , Vladimir Oltean , Yisen Zhuang Subject: Re: [PATCH net-next v1 0/5] Devlink reload and missed notifications fix Message-ID: References: <20210929064004.3172946e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210929064004.3172946e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 29, 2021 at 06:40:04AM -0700, Jakub Kicinski wrote: > On Wed, 29 Sep 2021 15:00:41 +0300 Leon Romanovsky wrote: > > This series starts from the fixing the bug introduced by implementing > > devlink delayed notifications logic, where I missed some of the > > notifications functions. > > > > The rest series provides a way to dynamically set devlink ops that is > > needed for mlx5 multiport device and starts cleanup by removing > > not-needed logic. > > > > In the next series, we will delete various publish API, drop general > > lock, annotate the code and rework logic around devlink->lock. > > > > All this is possible because driver initialization is separated from the > > user input now. > > Swapping ops is a nasty hack in my book. > > And all that to avoid having two op structures in one driver. > Or to avoid having counters which are always 0? We don't need to advertise counters for feature that is not supported. In multiport mlx5 devices, the reload functionality is not supported, so this change at least make that device to behave like all other netdev devices that don't support devlink reload. The ops structure is set very early to make sure that internal devlink routines will be able access driver back during initialization (btw very questionable design choice), and at that stage the driver doesn't know yet which device type it is going to drive. So the answer is: 1. Can't have two structures. 2. Same behaviour across all netdev devices. > > Sorry, at the very least you need better explanation for this. Was it better explained now?