From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, dsahern@kernel.org,
steffen.klassert@secunet.com, jreuter@yaina.de,
razor@blackwall.org, kgraul@linux.ibm.com, ivecera@redhat.com,
jmaloy@redhat.com, ying.xue@windriver.com, lucien.xin@gmail.com,
arnd@arndb.de, yajun.deng@linux.dev, atenart@kernel.org,
richardsonnick@google.com, hkallweit1@gmail.com,
linux-hams@vger.kernel.org, dev@openvswitch.org,
linux-s390@vger.kernel.org,
tipc-discussion@lists.sourceforge.net
Subject: Re: [PATCH net-next] net: rename reference+tracking helpers
Date: Wed, 8 Jun 2022 10:27:15 +0200 [thread overview]
Message-ID: <YqBdY0NzK9XJG7HC@nanopsycho> (raw)
In-Reply-To: <20220608043955.919359-1-kuba@kernel.org>
Wed, Jun 08, 2022 at 06:39:55AM CEST, kuba@kernel.org wrote:
>Netdev reference helpers have a dev_ prefix for historic
>reasons. Renaming the old helpers would be too much churn
Hmm, I think it would be great to eventually rename the rest too in
order to maintain unique prefix for netdev things. Why do you think the
"churn" would be an issue?
>but we can rename the tracking ones which are relatively
>recent and should be the default for new code.
>
>Rename:
> dev_hold_track() -> netdev_hold()
> dev_put_track() -> netdev_put()
> dev_replace_track() -> netdev_ref_replace()
[...]
>diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
>index 817577e713d7..815738c0e067 100644
>--- a/drivers/net/macsec.c
>+++ b/drivers/net/macsec.c
>@@ -3462,7 +3462,7 @@ static int macsec_dev_init(struct net_device *dev)
> memcpy(dev->broadcast, real_dev->broadcast, dev->addr_len);
>
> /* Get macsec's reference to real_dev */
>- dev_hold_track(real_dev, &macsec->dev_tracker, GFP_KERNEL);
>+ netdev_hold(real_dev, &macsec->dev_tracker, GFP_KERNEL);
So we later decide to rename dev_hold() to obey the netdev_*() naming
scheme, we would have collision. Also, seems to me odd to have:
OLDPREFIX_x()
and
NEWPREFIX_x()
to be different functions.
For the sake of not making naming mess, could we rather have:
netdev_hold_track()
or
netdev_hold_tr() if the prior is too long
?
next prev parent reply other threads:[~2022-06-08 9:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 4:39 [PATCH net-next] net: rename reference+tracking helpers Jakub Kicinski
2022-06-08 8:27 ` Jiri Pirko [this message]
2022-06-08 14:58 ` Jakub Kicinski
2022-06-08 22:58 ` David Ahern
2022-06-08 23:00 ` Eric Dumazet
2022-06-09 11:49 ` Paolo Abeni
2022-06-09 13:53 ` Eric Dumazet
2022-06-09 3:29 ` Jakub Kicinski
2022-06-09 4:40 ` Jiri Pirko
2022-06-10 5:40 ` 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=YqBdY0NzK9XJG7HC@nanopsycho \
--to=jiri@resnulli.us \
--cc=arnd@arndb.de \
--cc=atenart@kernel.org \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=ivecera@redhat.com \
--cc=jmaloy@redhat.com \
--cc=jreuter@yaina.de \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-hams@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=richardsonnick@google.com \
--cc=steffen.klassert@secunet.com \
--cc=tipc-discussion@lists.sourceforge.net \
--cc=yajun.deng@linux.dev \
--cc=ying.xue@windriver.com \
/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).