From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7F27C433F5 for ; Thu, 16 Sep 2021 13:52:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D201861246 for ; Thu, 16 Sep 2021 13:52:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236108AbhIPNx1 (ORCPT ); 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: netdev@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