From: Randy Dunlap <rdunlap@xenotime.net>
To: "Huangqiang Zhou" <linuxkernel.xqiang@gmail.com>
Cc: "ly" <ly@yahoo.com.cn>, "linux-net" <linux-net@vger.kernel.org>,
"netdev" <netdev@vger.kernel.org>
Subject: Re: How about the order of Network stack initialize
Date: Fri, 17 Sep 2010 14:19:40 -0700 [thread overview]
Message-ID: <20100917141940.f2e5ff20.rdunlap@xenotime.net> (raw)
In-Reply-To: <201009160906134537778@gmail.com>
On Thu, 16 Sep 2010 09:06:16 +0800 Huangqiang Zhou wrote:
> Hi all:
>
> I have a question about the order of network stack initialize.
>
> From some books it says the order is as below:
> 1.core_initcall: sock_init
> 2.fs_initcall: inet_init
> 3.subsys_initcall: net_dev_init
> 4.device_initcall: device init
>
> in the source code of linux2.6.18:
> #define core_initcall(fn) __define_initcall("1",fn)
> #define postcore_initcall(fn) __define_initcall("2",fn)
> #define arch_initcall(fn) __define_initcall("3",fn)
> #define subsys_initcall(fn) __define_initcall("4",fn)
> #define fs_initcall(fn) __define_initcall("5",fn)
> #define device_initcall(fn) __define_initcall("6",fn)
> #define late_initcall(fn) __define_initcall("7",fn)
>
> obviously:
> macro section
> core_initcall <--> .initcall1.init
> fs_initcall <--> .initcall5.init
> subsys_initcall <--> .initcall4.init
> device_intcall <--> .initcall6.init
>
> Some also says:
> “Every child is to determine the sequence between sections, the first call. Initcall1 init.
> The function pointer, again. Initcall2 init. Call the function pointer, etc. And in each section
> of the function pointer is associated with links to order, is uncertain ”
>
> As the above says, the order should be: core_initcall->subsys_initcall->fs_initcall->device_intcall
>
> So which one is really correct?
>
> 2010-09-15
> Huangqiang Zhou
Hi,
BTW, did you find out anything from your previous posting's answers?
http://marc.info/?l=linux-net&m=128443018603483&w=2
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2010-09-17 21:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 1:06 How about the order of Network stack initialize Huangqiang Zhou
2010-09-17 21:19 ` Randy Dunlap [this message]
[not found] ` <201009190848041099641@gmail.com>
2010-09-19 0:53 ` Randy Dunlap
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=20100917141940.f2e5ff20.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=linux-net@vger.kernel.org \
--cc=linuxkernel.xqiang@gmail.com \
--cc=ly@yahoo.com.cn \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.