Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Dec 2009 16:01:41 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Brett Glass <brett@lariat.net>
Cc:        net@freebsd.org
Subject:   Re: Question regarding netgraph and threading
Message-ID:  <4B15AE65.30604@elischer.org>
In-Reply-To: <200912012333.QAA16055@lariat.net>
References:  <200912011952.MAA12927@lariat.net> <4B1580E2.4080006@elischer.org> <200912012333.QAA16055@lariat.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Brett Glass wrote:
> At 01:47 PM 12/1/2009, Julian Elischer wrote:
> 
>> well, not all work is done by that thread. It is the
>> backup-doer-of-things, but many netgraph operations are done in the
>> context of a caller such as teh user of a socket.
> 
> In the case of a PPTP session, the data (ignoring the control session
> for the moment) flows from the interface (as GRE packets) through PPP
> (also implemented in netgraph) to an "ng" pseudo-interface, where it
> enters the ordinary FreeBSD IP stack. There isn't a user process listening
> on a socket anywhere in that path, so I assume that the netgraph
> kernel thread has to handle all of the work of encryption, decryption,
> handshaking, etc. Am I incorrect about this? I am concerned that the
> performance of a single core will be the bottleneck.

The work will be split between the sender of outgoing packets, the 
thread responding to the incoming packets from the interface and the 
netgraph threads.
There was a patch to make more netgraph threads but I don't remember 
if it was checked in.

> 
> --Brett Glass
> 
> P.S. -- By the way, when I compiled netgraph into the kernel to begin my 
> test, I began to get the message
> 
> WARNING: attempt to domain_add(netgraph) after domainfinalize()

yes, it is known. we really cant domainfinalize() on a system where
a protocol may be added later (like in a module).
Luckily it doesn't matter in this case.
"One day" someone will remove the printf.


> 
> each time the system boots. Why? Does it have anything to do with the 
> fact that I compiled netgraph itself in, but did not compile in all of 
> the modules I might be using?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B15AE65.30604>