From: Leon Romanovsky <leon@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "David S . Miller" <davem@davemloft.net>,
Jiri Pirko <jiri@nvidia.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] devlink: Delete not-used devlink APIs
Date: Thu, 16 Sep 2021 16:52:02 +0300 [thread overview]
Message-ID: <YUNMAi0Qjj5Dxiiw@unreal> (raw)
In-Reply-To: <20210916063318.7275cadf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
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 <leonro@nvidia.com>
> >
> > 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
next prev parent reply other threads:[~2021-09-16 13:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 10:38 [PATCH net-next] devlink: Delete not-used devlink APIs Leon Romanovsky
2021-09-16 13:33 ` Jakub Kicinski
2021-09-16 13:52 ` Leon Romanovsky [this message]
2021-09-16 14:11 ` Jakub Kicinski
2021-09-17 10:13 ` Jiri Pirko
2021-09-17 13:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YUNMAi0Qjj5Dxiiw@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).