netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 00/21] treewide: Use consistent api style for address testing
Date: Fri, 19 Oct 2012 03:29:36 -0700	[thread overview]
Message-ID: <1350642576.11308.13.camel@joe-AO722> (raw)
In-Reply-To: <1350630254.2293.183.camel@edumazet-glaptop>

(trimmed over long cc list from original 00/21 post)

On Fri, 2012-10-19 at 09:04 +0200, Eric Dumazet wrote:
> On Thu, 2012-10-18 at 20:55 -0700, Joe Perches wrote:
> > ethernet, ipv4, and ipv6 address testing uses 3 different api naming styles.
> > 
> > ethernet uses:	is_<foo>_ether_addr
> > ipv4 uses:	ipv4_is_<foo>
> > ipv6 uses:	ipv6_addr_<foo>
> > 
> > Standardize on the ipv6 style of <prefix>_addr_<type> to reduce
> > the number of styles to remember.
[]
> Yes they are some names discrepancies, thats a big deal.

missing a not maybe?

> And we have alloc_skb() / kfree_skb() / skb_clone() 
> Why not skb_alloc() / skb_free() / skb_clone() ?

Not really a similar use case to this renaming, as alloc/free
functions generally start with alloc/free.

These particular functions all refer to address tests.

> Some people actually know current code by name of functions, they dont
> want to change their mind and having to grep include files and git log
> to learn the new names of an old function, especially when traveling and
> using a laptop.
> 
> Sure, when we want to use eth_random_addr(), a grep into include files
> to check if its still the right name (old one was random_ether_addr())
> is OK because we dont use this one often.
> 
> If you think about it, eth_random_addr() was not the perfect name.

Luckily, that one's only got 46 references.
I don't care for the <type>_<action>_addr vs <type>_addr_<test>
use either.  Maybe a set in the name would have been/still be better.

> Think about all the documentation you can find outside of kernel tree,
> RFC and things like that, copy/pasting some linux kernel code.
> 
> This kind of changes make our life more difficult, when we have to
> backport patches or rebase code, or even perform some searches to find
> prior issues/discussions.
> 
> Life of a kernel developer is not only dealing with latest Linus (or
> -next) tree, and using automatic 'tools'.
> 
> Thats a real pain for me at least.

Pity, api consistency has some value.

cheers, Joe

  reply	other threads:[~2012-10-19 10:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19  3:55 [PATCH net-next 00/21] treewide: Use consistent api style for address testing Joe Perches
2012-10-19  3:55 ` [PATCH net-next 01/21] etherdevice: Rename is_<foo>_ether_addr tests to eth_addr_<foo> Joe Perches
     [not found] ` <cover.1350618006.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2012-10-19  3:55   ` [PATCH net-next 02/21] net: Convert is_<foo>_ether_addr uses " Joe Perches
2012-10-19  3:55 ` [PATCH net-next 04/21] wireless: " Joe Perches
2012-10-20  2:30   ` Bing Zhao
2012-10-20 10:51   ` Luciano Coelho
2012-10-20 16:19   ` Arend van Spriel
2012-10-19  4:13 ` [PATCH net-next 03/21] arch: " Joe Perches
2012-10-19  4:14 ` [PATCH net-next 05/21] drivers: net: " Joe Perches
2012-10-19  4:14 ` [PATCH net-next 06/21] staging: " Joe Perches
2012-10-19  4:14 ` [PATCH net-next 07/21] infiniband: " Joe Perches
2012-10-19  4:14 ` [PATCH net-next 08/21] scsi: " Joe Perches
2012-10-19  4:14 ` [PATCH net-next 09/21] of: " Joe Perches
2012-10-19  4:14 ` [PATCH net-next 10/21] s390: " Joe Perches
2012-10-19  4:14 ` [PATCH net-next 11/21] usb: " Joe Perches
2012-10-19  4:14 ` [PATCH net-next 12/21] uwb: " Joe Perches
2012-10-19  4:14 ` [PATCH net-next 13/21] Documentation: networking: " Joe Perches
2012-10-19  4:14 ` [PATCH net-next 14/21] llc_if.h: " Joe Perches
2012-10-19  4:14 ` [PATCH net-next 15/21] in.h: Rename ipv4_is_<foo> functions to ipv4_addr_<foo> Joe Perches
2012-10-19  4:15 ` [PATCH net-next 16/21] net: Convert ipv4_is_<foo> uses " Joe Perches
2012-10-19  4:15 ` [PATCH net-next 17/21] infiniband: " Joe Perches
2012-10-19  4:15 ` [PATCH net-next 18/21] ath6kl: " Joe Perches
2012-10-19  4:15 ` [PATCH net-next 19/21] parisc: " Joe Perches
2012-10-19  4:15 ` [PATCH net-next 20/21] lockd: " Joe Perches
2012-10-19  4:15 ` [PATCH net-next 21/21] sctp: " Joe Perches
2012-10-19  7:04 ` [PATCH net-next 00/21] treewide: Use consistent api style for address testing Eric Dumazet
2012-10-19 10:29   ` Joe Perches [this message]
2012-10-19 15:55   ` [ath9k-devel] " Pavel Roskin
2012-10-19 16:39     ` Joe Perches
2012-10-19  7:36 ` David Miller

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=1350642576.11308.13.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=eric.dumazet@gmail.com \
    --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).