Hi, j-schwerer@xxxxxxx wrote: > Hi, > > >>what worries me about such a change that in the future (when the stack = >> > >>moves into the kernel) we will have to rewrite a lot of stuff (I am = >> > >>afraid that even if the plugin approach is taken the code will not be = >> > >>iimediately reusable). >> > > As I put it in an earlier mail I don't clearly understand how much of a > difference that brings on a network stack (in which I would expect most o= > f the > code to be protocol-related and "anywhere-land" independant?). Therefore = > Id' > really appreciate if someone would *clearly* (clearly, as in "clearly det= > ailed > with examples for the dummies" =3DP) explain WHY there would be "a lot of= > stuff" > to rewrite. > > The main difference is in the performance: for a user-land stack a packet processing will require three context switches: nic recives a packet; driver forwards it to the net-server (kernel); net-server receives a packet; does its magic; sends a reply (let's assume that is does) (user-land); driver receives a packet and forwards it to the nic (kernel); if the final destination of all packets is some application-layer talking server (like http server) it may or may not make a difference. Does anybody know any details on performance of network application with different types of networks stacks? One thing to keep in mind though is that user-land stack will share cpu time will other applications that happen to run on this CPU. For lower levels (arp, icmp, etc) it will make a difference as the user-land model adds additional context switches (for the kernel-land stack no context switches are required). Now last, but not least, Be themselves in the end discarded the user-land stack in favor of kernel-land one. >>At this point it doesn't really matter whether one should learn kernel = >> > >>API or learn how to write network server plug-ins (IMHO the difference = >> > >>will not be that big). >> > > IMHO I also think there shouldn't be that big a difference. So I am getti= > ng > even more confused now when you say there would be a lot to rewrite ^_^ > > The difference I meant is in what model we will code for; It may not necessary be the case that the code written for one model is easily ported to another one. >>With the approach that was discussed before (plug-in architecture) the = >> > >>"entry requirements" depend not as much on ones understanding of = >> > >>kernel structures and API, but rather on understanding of networking = >> > >>protocols and algorithms to implement them, which will be the same in = >> > >>either case. >> > > Jean All i'm trying to do is consider both options and find the one which would be the best to implement. Dmitri