Skip to contentSkip to conversation

Gentle Guide to the Network Stack

DISCUSSION Olaf Kirch 8 participants 9 messages Jun 17, 2008 – Jun 19, 2008

Subsystems (2)
lore
Share & tools
lore

Olaf Kirch

author
#0 lore raw

Hi all,

I started putting together a paper on the Linux network stack, focusing on how things fit together, and help relative beginners understand the machinery, rather than giving a full-blown highly detailed cross reference (which would be outdated more quickly than you can re-run latex anyway :-)
I intend to release it under the GPL or GNU FDL or similar license - I haven't fully made up my mind yet on what works best.

You can find the first couple of pages at
http://oss.oracle.com/~okir/network/paper.pdf

I'd be very interested in general feedback on the approach taken, the level of detail and such. In case I missed the fact that someone else is currently doing the same, please let me know, too.

Cheers,
Olaf

Signature · 2 lines
Olaf Kirch  |  --- o --- Nous sommes du soleil we love when we play
[email protected] |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
#1 lore raw
Quoted 13 lines · Olaf Kirch

Hi all,

I started putting together a paper on the Linux network stack, focusing on how things fit together, and help relative beginners understand the machinery, rather than giving a full-blown highly detailed cross reference (which would be outdated more quickly than you can re-run latex anyway :-)
I intend to release it under the GPL or GNU FDL or similar license - I haven't fully made up my mind yet on what works best.

You can find the first couple of pages at
http://oss.oracle.com/~okir/network/paper.pdf

Quoted 6 lines

I'd be very interested in general feedback on the approach taken, the level of detail and such. In case I missed the fact that someone else is currently doing the same, please let me know, too.

Cheers,
Olaf

Hi Olaf,
I suggest you take a close look at O'Reilly's "Understanding Linux Network Internals" as a jumping off point. This work deals with IPv4 Layer 3, and L2 implementations for the 2.6 kernel. In my opinion, it is very well done. What would be a very nice compliment is to focus on L4 protocols and implementations and the socket API implementation within the kernel.

Thanks,
Karen

Signature · 3 lines
 Karen Shaeffer
 Neuralscape, Palo Alto, Ca. 94306
 [email protected]  http://www.neuralscape.com
#5 lore raw
In reply to Olaf Kirch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Olaf Kirch

I started putting together a paper on the Linux network stack, focusing on how things fit together, and help relative beginners understand the machinery, rather than giving a full-blown highly detailed cross reference (which would be outdated more quickly than you can re-run latex anyway :-)
I intend to release it under the GPL or GNU FDL or similar license - I haven't fully made up my mind yet on what works best.

Quoted 7 lines

You can find the first couple of pages at
http://oss.oracle.com/~okir/network/paper.pdf

I'd be very interested in general feedback on the approach taken, the level of detail and such. In case I missed the fact that someone else is currently doing the same, please let me know, too.

Speaking as a relative beginner this is quite interesting and I'd like to read more.

Kristof

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIWBVHUEZ9DhGwDugRAsccAJ9RvPWRagIRdxSv/eUeW1WedtARWACeP3gN CnjlfnuhXH0dJJWgDuMKNw4=
=+Uj7
-----END PGP SIGNATURE-----

#2 lore raw
In reply to Karen Shaeffer

Karen Shaeffer wrote, On 06/17/2008 04:56 PM:

...

Quoted 3 lines

In my opinion, it is very well done. What would be a
very nice compliment is to focus on L4 protocols and implementations and the socket API implementation within the kernel.

Right! ...Or simply just like it is, but more!

Thanks,
Jarek P.

#3 lore raw
In reply to Karen Shaeffer
Quoted 4 lines · Karen Shaeffer

I suggest you take a close look at O'Reilly's "Understanding Linux Network Internals" as a jumping off point. This work deals with IPv4 Layer 3, and L2 implementations for the 2.6 kernel.

Yes, very nice book! It also mentions explicitly in the beginning that it doesn't cover Netfilter, IPv6, IPVS and perhaps some other topics. Of course, these were exactly the topics I was most interested in, so there's a suggestion for further writings ;)

Otherwise, very nice and easy to follow writing style in your paper, Olaf! Although it looks like it will be turning more into a small book than a paper...

Julius

Signature · 1 line
Google Switzerland GmbH
#4 lore raw
In reply to Karen Shaeffer

Hi Olaf,

Quoted 17 lines · Karen Shaeffer
Quoted 9 lines · Olaf Kirch

I started putting together a paper on the Linux network stack, focusing on how things fit together, and help relative beginners understand the machinery, rather than giving a full-blown highly detailed cross reference (which would be outdated more quickly than you can re-run latex anyway :-)
I intend to release it under the GPL or GNU FDL or similar license - I haven't fully made up my mind yet on what works best.

Quoted 6 lines

You can find the first couple of pages at
http://oss.oracle.com/~okir/network/paper.pdf

I'd be very interested in general feedback on the approach taken, the level of detail and such. In case I missed the fact that someone else is currently doing the same, please let me know, too.

Quoted 6 lines

I suggest you take a close look at O'Reilly's "Understanding Linux Network Internals" as a jumping off point. This work deals with IPv4 Layer 3, and L2 implementations for the 2.6 kernel. In my opinion, it is very well done. What would be a very nice compliment is to focus on L4 protocols and implementations and the socket API implementation within the kernel.

I strongly agree. I have not found any good, up-to-date reference that gives any detail on the Linux TCP implementation. It would be very useful to beginners for example to have a good description of the locking done by the TCP stack, what exactly the different locks protect, and the different logic flows through the TCP stack and how they interact (xmit, rcv, and control). Similarly it would be great to have an overview of other locking that is done at other layers of the Linux network stack, to get an idea of how it all fits together. At least for me, this is one of the most difficult things to get my head around when trying to read and understand the Linux network code, and I'm still not nearly where I would like to be, so any edification you could provide via this kind of document would be greatly appreciated.

-Thanks

-Bill

#6 lore raw
In reply to Olaf Kirch

Hi,
- This Linux network stack paper is a good and blessed initiative, and may be certailnly
helpful to developers.

I hope to see more of it in th future !

question:
What do you mean by :
"current kernels allocate these in as single entity named struct sockalloc," chapter 6 (page 19).

I grepped for:
struct sockalloc and struct sock_alloc under the kernel tree (git 2.6 netdev tree)
and could not find such a thing.

Regards,
Ian

Quoted 27 lines · Olaf Kirch

Hi all,

I started putting together a paper on the Linux network stack, focusing on how things fit together, and help relative beginners understand the machinery, rather than giving a full-blown highly detailed cross reference (which would be outdated more quickly than you can re-run latex anyway :-)
I intend to release it under the GPL or GNU FDL or similar license - I haven't fully made up my mind yet on what works best.

You can find the first couple of pages at
http://oss.oracle.com/~okir/network/paper.pdf

I'd be very interested in general feedback on the approach taken, the level of detail and such. In case I missed the fact that someone else is currently doing the same, please let me know, too.

Cheers,
Olaf
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
[email protected] | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#7 lore raw

From: "Ian Brown" <[email protected]>
Date: Thu, 19 Jun 2008 14:01:07 +0300

Quoted 4 lines

I grepped for:
struct sockalloc and struct sock_alloc under the kernel tree (git 2.6 netdev tree)
and could not find such a thing.

He meant "struct socket_alloc"

author
#8 lore raw
Quoted 6 lines · On Thursday 19 June 2008 13:11:46 David Miller wrote:
Quoted 4 lines

I grepped for:
struct sockalloc and struct sock_alloc under the kernel tree (git 2.6 netdev tree)
and could not find such a thing.

He meant "struct socket_alloc"

Oops, you're right!

Olaf

Signature · 2 lines
Olaf Kirch  |  --- o --- Nous sommes du soleil we love when we play
[email protected] |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax