netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Savochkin <saw@swsoft.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: netdev@vger.kernel.org, Kirill Korotaev <dev@openvz.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Subject: Re: [patch 1/7] net_device list cleanup: core
Date: Tue, 4 Jul 2006 11:24:05 +0400	[thread overview]
Message-ID: <20060704112405.A25305@castle.nmd.msu.ru> (raw)
In-Reply-To: <20060703174650.GA22295@infradead.org>; from "Christoph Hellwig" on Mon, Jul 03, 2006 at 06:46:50PM

Christoph,

On Mon, Jul 03, 2006 at 06:46:50PM +0100, Christoph Hellwig wrote:
> On Mon, Jul 03, 2006 at 12:18:51PM +0400, Andrey Savochkin wrote:
> > Cleanup of net_device list use in net_dev core and IP.
> > The cleanup consists of
> >  - converting the to list_head, to make the list double-linked (thus making
> >    remove operation O(1)), and list walks more readable;
> >  - introducing of for_each_netdev wrapper over list_for_each.
> 
> When you change all this please make sure dev_base_head is never directly
> accessed anymore, not even through macros and dev_base_head is not exported
> anymore.  That's the only way to keep drivers messing with it.
> 
> Yes, it's a little more work as you need to audit all drivers to see what
> they are doing and find suitable abstractions but it's a must have that
> should have been done a lot earlier.

Hiding dev_base_head can be done by converting first_netdev/next_netdev into
functions and implementing for_each_netdev loop through them.

Or are you talking about abstractions like functions
for_each_netdev/find_netdev with callbacks?
Do you think that hiding the list internals is worth the additional
complexity and substantial increase of the patch size?

	Andrey

  reply	other threads:[~2006-07-04  7:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-03  8:18 [patch 1/7] net_device list cleanup: core Andrey Savochkin
2006-07-03  8:18 ` [patch 2/7] net_device list cleanup: proc seq_file output Andrey Savochkin
2006-07-03  8:18 ` [patch 3/7] net_device list cleanup: netlink_dump Andrey Savochkin
2006-07-03  8:18 ` [patch 4/7] net_device list cleanup: drivers and non-IP protocols Andrey Savochkin
2006-07-07 19:18   ` Stephen Hemminger
2006-07-03  8:18 ` [patch 5/7] net_device list cleanup: arch-dependent code and block devices Andrey Savochkin
2006-07-03  8:18 ` [patch 6/7] net_device list cleanup: dev_base removal Andrey Savochkin
2006-07-03  8:18 ` [patch 7/7] net_device list cleanup: debugging Andrey Savochkin
2006-07-03 17:46 ` [patch 1/7] net_device list cleanup: core Christoph Hellwig
2006-07-04  7:24   ` Andrey Savochkin [this message]
2006-07-04  9:10     ` Christoph Hellwig
2006-07-04 14:50       ` Andrey Savochkin
2006-07-04 16:35         ` Alexey Kuznetsov
2006-07-05  8:26           ` Andrey Savochkin
2006-07-07  4:34 ` YOSHIFUJI Hideaki / 吉藤英明
2006-07-07  7:54   ` Andrey Savochkin
2006-07-07 16:48     ` YOSHIFUJI Hideaki / 吉藤英明
2006-07-10  6:53       ` Andrey Savochkin

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=20060704112405.A25305@castle.nmd.msu.ru \
    --to=saw@swsoft.com \
    --cc=dev@openvz.org \
    --cc=ebiederm@xmission.com \
    --cc=hch@infradead.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --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).