Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1442007pxb; Thu, 16 Sep 2021 07:36:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCf2Yymi1idvvYNQ9NuE3TYJTAWyILdILaBLrxU5qdgBu/KnZAPPjXRHBAQJBVzwYPAQUw X-Received: by 2002:a92:c5c9:: with SMTP id s9mr4211044ilt.56.1631802970764; Thu, 16 Sep 2021 07:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631802970; cv=none; d=google.com; s=arc-20160816; b=KceO0uZVuhPwYVEmA43jGDbqqEm6MP0+3Ibpyr9g7YHh85DnvPPenPKkP//ygORlvr Ir/zL3FpIiYM47YLtuf7Ndiw5D1O3Z1qjKhTUH4nhmn9/gRXvNYvkM8dcwiPHcCTp9LM PQVyK+A9xSyOUQUVT+w+jkvcJZGIc+okaDpzSVxhhThB1xSyErVV/dr089wXrZ/dpQXh KFRcpoEHGwRx0+t1/1qttsDmankpR81D//S9uU/6wXK4t/zs4KiZ/YObYGvknfAcJu4Q rABxqKuc+v+dRI9wB5Vi6iEQc2phuvM3wNA8+gwYFWD4I4R7pkcFqoPtprnxlUH/qd2P +W7A== 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=wcvysiG+b1dp73WCTlkjNon2o2iWTiRtEIgkyQXWjlE=; b=J/z2YXx+NqZF8f1G+rghnXE5meLGs8DyPDARKKuA4rXo3yu1hE56g1bWkURy4yU6Vr 6KxttXD2xHHR4/BuR2g3HJsRuthkHZWwe4Lbp5ovWx9/nx2s/sD7F2yGP9H9CCaxUerl RIPG2x6Adkve0+K6u4lGMJPIZLtx/cid9i5LJ5VE0IIxqWnPpRtD9LdrEtnV89xOFMVD QJqpXA5SMu/M9+ZTFIO+OYvzerfDwG8VtsSRUc9S4lOOBiRPiGUPW80QYl9NedKN93tH fsTMy0qQE2WUldVN8vW7yAlAE/9L6gBleMWAPLkTKtZOQUbCZm9See4QDR2e9pY+s7mN cQ2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tsSVmF47; 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 f26si2749583iog.53.2021.09.16.07.35.55; Thu, 16 Sep 2021 07:36:10 -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=tsSVmF47; 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 S236055AbhIPNx1 (ORCPT + 99 others); Thu, 16 Sep 2021 09:53:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:42900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235830AbhIPNx0 (ORCPT ); Thu, 16 Sep 2021 09:53:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4DAEB60EB4; Thu, 16 Sep 2021 13:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631800326; bh=8ELhNZODoBEnLGmVtTcOezvWfOBIyyv5HdPY1TeJV+4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tsSVmF47v39BfdWENa8eDDjjWXd1w54uLiCVo0OyD/iwal2WWQUWRKElcy9tGmzet ZSL2SC2x/5W+CyvSCbBy3lp2ksaLuT7f3EPo1d8KtsWT70jlmSvDcfXMGrMZJpjAtH X3sPJcyYS4dcFlOneQnnYq1ZoMt+M04v/w1hqd5T0C4dqPSYjiUt1EWFehxNhMXcHF I3FNx/YV3+zgFOr6+VwUVICNBS+9bPQw4T+zuB92XUA8k1iZA5SDYEZLrAzs9NwpSc Gt0eeNtedigIl82YUE97pe6kAKzqMf6YLl0GKDz5IRdfTAJdLJZ5Y7zLfC8fVmcmKZ x59mD59iuEpuw== Date: Thu, 16 Sep 2021 16:52:02 +0300 From: Leon Romanovsky To: Jakub Kicinski Cc: "David S . Miller" , Jiri Pirko , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next] devlink: Delete not-used devlink APIs Message-ID: References: <20210916063318.7275cadf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210916063318.7275cadf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 16, 2021 at 06:33:18AM -0700, Jakub Kicinski wrote: > On Thu, 16 Sep 2021 13:38:33 +0300 Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Devlink core exported generously the functions calls that were used > > by netdevsim tests or not used at all. > > > > Delete such APIs with one exception - devlink_alloc_ns(). That function > > should be spared from deleting because it is a special form of devlink_alloc() > > needed for the netdevsim. > > Do you have a reason to do this or are you just cleaning up? Yes for both questions. The trigger was my need to move parameter notifications to be delayed till devlink register (like you asked). At some point of time, I realized that devlink_*_publish() API is rubbish and can be deleted (integrated into devlink_register). So I started to cleanup as much as possible. > > The fmsg functions are not actually removed, just unexported. > Are there out of tree drivers abusing them? I don't know, but exported symbols pollute symbols table and the less we have there, the better will be for everyone. > > The port_param functions are "symmetric" with the global param > ones. Removing them makes the API look somewhat incomplete. There is no value in having "complete" API that no one uses. > > Obviously the general guidance is that we shouldn't export > functions which have no upstream users but that applies to > meaningful APIs. For all practical purposes this is just a > sliver of an API, completeness gives nice warm feelings. It is misleading, I have much more warm feeling when I see API that is used. Once it will be needed, the next developer will copy/paste it pretty fast. > > Anyway, just curious what made you do this. I wouldn't do it > myself but neither am I substantially opposed. Move of devlink_register() to be last command in the devlink init flow and removal of devlink_*_publish() calls as an outcome of that. Thanks