From: Alan Cox <alan@cymru.net> To: lm@gate1-neteng.engr.sgi.com (Larry McVoy) Cc: dm@neteng.engr.sgi.com, nn@lanta.engr.sgi.com, torvalds@cs.helsinki.fi, alan@cymru.net, sparclinux-cvs@caipfs.rutgers.edu, lmlinux@neteng.engr.sgi.com Subject: Re: linux needs bsd networking stack Date: Thu, 30 May 1996 11:06:25 +0100 (BST) [thread overview] Message-ID: <199605301006.LAA24792@snowcrash.cymru.net> (raw) In-Reply-To: <199605292304.QAA06115@neteng.engr.sgi.com> from "Larry McVoy" at May 29, 96 04:04:37 pm > This is one of my complaints. The BSD stack has a defined set of "objects" > for dealing with networking; an incomplete list: > > protocol structure for different address families We have these. > interface structure for different media types We have these > socket structure that cleanly handles different protocols We have most of this. > Another big plus of the BSD stack is tcp_input.c and tcp_output.c. These > are what most people mean when they say "BSD networking". Yep. For 2.0 we have all the core stuff. For pre 2.1 we have stuff going beyond what BSD is doing - Vegas flow control. If you want to work on stealing and working stuff in talk with Pedro Roque, get pre 2.1 and take a good look. > . There are layering "invariants" that affect performance: you really > should allocate your send buffers from the interface driver, because > it could do some interesting things that would minimize cache flushing. > I think Van's prototype did this for witless cards. We could certainly add the allocate via device at very little cost. We just start using dev->kmalloc(). Note that you can't always win on this a packet may change route. > . Single processor design. This is the biggest drawback, IMO. The Linux one is semi designed for MP work. A given socket can do its own locking, and there are only a small number of areas of overlap at the moment. Notably Demultiplex table needs locks Multiple processor writes in parallel/reads in parallel on datagram requires about 10 lines of lock code. We dont run the net_bh() in parallel although most of it we can do very easily. > Proposal/suggestion: > . Come up with a strawman proposal for the set of "objects" we think > we need in Linux. Do this as part of the work Linus suggested to > merge the socket ops with the vfs ops. That certainly cant be counter-productive. > . Steal the TCP code outright. Nuke the mbuf stuff, use the skbufs > or a slightly modified version thereof. We can't steal it outright. 4.4BSD has abominable problems as is. The FreeBSD people have the worst of them fixed but don't have stuff like Vegas and have all the horrible spoofing problems caused by bad timers. > . Design in SMP support from the start. This means thinking about > thousands of connections running in parallel. So long as it still runs very fast for the 99.99% of people with a single CPU 486 PC. Thats the primary target by market volume. > : have 20 books analyzing the code c-statement by c-statement like the > : bsd stuff does. If we had that, I think this desire to use the > : berkeley stack would not be as strong. > Yeah, but a very reasonable point is "we don't have that". BSD does. > This is a big deal. Documentation is useful. Its coming. In fact AW should now have released an English language version of the 1.2 kernel programming book. Alan
WARNING: multiple messages have this Message-ID (diff)
From: Alan Cox <alan@cymru.net> To: Larry McVoy <lm@gate1-neteng.engr.sgi.com> Cc: dm@neteng.engr.sgi.com, nn@lanta.engr.sgi.com, torvalds@cs.helsinki.fi, alan@cymru.net, sparclinux-cvs@caipfs.rutgers.edu, lmlinux@neteng.engr.sgi.com Subject: Re: linux needs bsd networking stack Date: Thu, 30 May 1996 11:06:25 +0100 (BST) [thread overview] Message-ID: <199605301006.LAA24792@snowcrash.cymru.net> (raw) Message-ID: <19960530100625.QSETcOh6V2XCiyvA3IEhC4NIsB04VF1-2opCKKkMuTw@z> (raw) In-Reply-To: <199605292304.QAA06115@neteng.engr.sgi.com> from "Larry McVoy" at May 29, 96 04:04:37 pm > This is one of my complaints. The BSD stack has a defined set of "objects" > for dealing with networking; an incomplete list: > > protocol structure for different address families We have these. > interface structure for different media types We have these > socket structure that cleanly handles different protocols We have most of this. > Another big plus of the BSD stack is tcp_input.c and tcp_output.c. These > are what most people mean when they say "BSD networking". Yep. For 2.0 we have all the core stuff. For pre 2.1 we have stuff going beyond what BSD is doing - Vegas flow control. If you want to work on stealing and working stuff in talk with Pedro Roque, get pre 2.1 and take a good look. > . There are layering "invariants" that affect performance: you really > should allocate your send buffers from the interface driver, because > it could do some interesting things that would minimize cache flushing. > I think Van's prototype did this for witless cards. We could certainly add the allocate via device at very little cost. We just start using dev->kmalloc(). Note that you can't always win on this a packet may change route. > . Single processor design. This is the biggest drawback, IMO. The Linux one is semi designed for MP work. A given socket can do its own locking, and there are only a small number of areas of overlap at the moment. Notably Demultiplex table needs locks Multiple processor writes in parallel/reads in parallel on datagram requires about 10 lines of lock code. We dont run the net_bh() in parallel although most of it we can do very easily. > Proposal/suggestion: > . Come up with a strawman proposal for the set of "objects" we think > we need in Linux. Do this as part of the work Linus suggested to > merge the socket ops with the vfs ops. That certainly cant be counter-productive. > . Steal the TCP code outright. Nuke the mbuf stuff, use the skbufs > or a slightly modified version thereof. We can't steal it outright. 4.4BSD has abominable problems as is. The FreeBSD people have the worst of them fixed but don't have stuff like Vegas and have all the horrible spoofing problems caused by bad timers. > . Design in SMP support from the start. This means thinking about > thousands of connections running in parallel. So long as it still runs very fast for the 99.99% of people with a single CPU 486 PC. Thats the primary target by market volume. > : have 20 books analyzing the code c-statement by c-statement like the > : bsd stuff does. If we had that, I think this desire to use the > : berkeley stack would not be as strong. > Yeah, but a very reasonable point is "we don't have that". BSD does. > This is a big deal. Documentation is useful. Its coming. In fact AW should now have released an English language version of the 1.2 kernel programming book. Alan
next prev parent reply other threads:[~1996-05-30 10:27 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 1996-05-29 23:04 linux needs bsd networking stack Larry McVoy 1996-05-30 10:06 ` Alan Cox [this message] 1996-05-30 10:06 ` Alan Cox -- strict thread matches above, loose matches on Subject: below -- 1996-05-30 18:17 Steve Alexander 1996-05-30 18:17 ` Steve Alexander 1996-05-30 0:36 Neal Nuckolls 1996-05-30 3:02 ` David S. Miller 1996-05-30 10:12 ` Alan Cox 1996-05-30 10:12 ` Alan Cox 1996-05-29 21:59 Neal Nuckolls 1996-05-29 22:50 ` David S. Miller 1996-05-30 9:46 ` Alan Cox 1996-05-30 9:46 ` Alan Cox 1996-05-30 5:21 ` Linus Torvalds 1996-05-30 9:43 ` Alan Cox 1996-05-30 9:43 ` Alan Cox
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=199605301006.LAA24792@snowcrash.cymru.net \ --to=alan@cymru.net \ --cc=dm@neteng.engr.sgi.com \ --cc=lm@gate1-neteng.engr.sgi.com \ --cc=lmlinux@neteng.engr.sgi.com \ --cc=nn@lanta.engr.sgi.com \ --cc=sparclinux-cvs@caipfs.rutgers.edu \ --cc=torvalds@cs.helsinki.fi \ /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: linkBe 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.