netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: Andy Gospodarek <andy@greyhouse.net>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Jay Vosburgh <fubar@us.ibm.com>
Subject: Re: [RFC Patch] bonding: move to net/ directory
Date: Thu, 26 May 2011 17:32:08 +0800	[thread overview]
Message-ID: <BANLkTin2HaYjHgGACkwvKwuY-Y_e3+r3JQ@mail.gmail.com> (raw)
In-Reply-To: <20110525152023.GC11867@hmsreliant.think-freely.org>

On Wed, May 25, 2011 at 11:20 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
> On Wed, May 25, 2011 at 08:43:21PM +0800, Américo Wang wrote:
>> On Wed, May 25, 2011 at 12:33 AM, Neil Horman <nhorman@tuxdriver.com> wrote:
>> > This all sounds like change for the sake of change to me.  I don't see any
>> > compelling argument for moving bonding (or bridging or vlans, etc) around at
>> > all.  All of these software drivers have feet in multple subsystems, but that
>> > just means that theres not going to be a compelling argument to move them any
>> > place,  at least not without an immediate subsequent argument that it really
>> > belonged back where it was.  Unless you can show a solid benefit to moving the
>> > code, I don't see why any reorganization is needed.
>>
>> Well, as a people who worked on bonding code, I have no problem to know
>> bonding code is under drivers/net/, but for people who don't know this, probably
>> net/ is the first place they want to search.
>>
> you've asked them?
>
> cd git/net-next-2.6
> find . -name '*bond*'

No, somone asked me why bonding is not in net/ and after some thinking,
I see no reasons myself (thus sent this patch).


>> The other similar thing is that pktgen is in net/core/ while netconsole is in
>> drivers/net/, which seems a little strange too.
>>
> Its is, and loopback is in /drivers/net, as is tun-tap and xen-netfront (none of
> which touch actual hardware), as is slip and ppp, which are net drivers, but
> only operate on non net hardware. ppoe is another example which operates on
> ethernet, but sits on top of a secondary physical device (and so has no real
> hardware itself).  These could all arguably be moved to /net, because they have
> no real hardware, but are in drivers because they implement instances of the net
> driver interface.
>
>> vlan vs macvlan is the third example.
>>
> yes, it is, macvlan, like you assert could be moved, but you could just as
> easily move vlan to /drivers because it implements an instance of the net device
> driver interface.

Then I agree here.

>
> The bottom line is, sometimes things aren't black and white, they're gray. And
> we put code where it makes the most sense at the time.  We move it when it
> makes sense to, but I don't hear any compelling argument to make that move.
> Yes, we're not always consistent with where we put hardwareless drivers, but to
> make a policy and shove everything to one place or another doesn't any more
> sense.  If we do that we either wind up with things that we think of as drivers
> in the /net directory, or we wind up with stuff thats really protocol oriented
> in the /drivers directory.  And if the major problem we solve by doing so is
> making life easier for someone who otherwise wouldn't be able to find said code
> with a quick grep or find operation, it really doesn't seem like its worthwhile
> to me
>

Well, the problem is our code organisation, if we could organize the code
in a better way that would help grepping the code.

>> In short, there are three callers of netdev_rx_handler_register(), macvlan,
>> bonding and bridge, only bridge code stays in net/ directory.
> Why is calling netdev_rx_handler_register a gating factor here?
>

I don't think other drivers are supposed to use this function to register
a packet handler, which is an important difference from my view.

  reply	other threads:[~2011-05-26  9:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 12:45 [RFC Patch] bonding: move to net/ directory Américo Wang
2011-05-23 15:13 ` Andy Gospodarek
2011-05-24 14:00   ` Américo Wang
2011-05-24 15:03     ` Andy Gospodarek
2011-05-25 12:32       ` Américo Wang
2011-05-25 15:01         ` Neil Horman
2011-05-26  9:11           ` Américo Wang
2011-05-26 13:38             ` Neil Horman
2011-05-24 16:33     ` Neil Horman
2011-05-25 12:43       ` Américo Wang
2011-05-25 15:20         ` Neil Horman
2011-05-26  9:32           ` Américo Wang [this message]
2011-05-26 13:50             ` Neil Horman
2011-05-26 14:25               ` Michał Mirosław
2011-06-06 16:34                 ` Américo Wang
2011-06-06 16:50                   ` Joe Perches
2011-06-06 17:04                     ` Eric Dumazet
2011-06-06 17:20                       ` Joe Perches
2011-06-06 17:31                         ` Jeff Kirsher
2011-06-06 20:11                         ` Ben Hutchings
2011-06-06 17:31                     ` Jeff Kirsher
2011-06-18  2:48                       ` WANG Cong

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=BANLkTin2HaYjHgGACkwvKwuY-Y_e3+r3JQ@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=fubar@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.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).