Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Aug 2009 16:04:29 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Maslan <maslanbsd@gmail.com>
Cc:        =?ISO-8859-1?Q?Dag-Erling_Sm?=, =?ISO-8859-1?Q?=F8rgrav?= <des@des.no>, Pawel Jakub Dawidek <pjd@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: sosend() and mbuf
Message-ID:  <4A78BE7D.1010902@elischer.org>
In-Reply-To: <319cceca0908041536g71e416dao13864b7b220fb89a@mail.gmail.com>
References:  <319cceca0908030119i3432a495ya60aa431dab0e1b1@mail.gmail.com>	<864ospvvkv.fsf@ds4.des.no>	<319cceca0908031043x6bfe5771wa73553dce922756a@mail.gmail.com>	<86eirs65gb.fsf@ds4.des.no>	<319cceca0908031425r3516de29q34807cdf2c7489ed@mail.gmail.com>	<20090804210457.GF2181@garage.freebsd.pl> <319cceca0908041536g71e416dao13864b7b220fb89a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Maslan wrote:
>> When you did kern_open() without creating kernel thread, it worked,
>> because kern_open() used file descriptor table from your current
>> (userland) process. In FreeBSD 7.x kthread_create() creates a process
>> without file descriptor table, so you can't use kern_open() and actually
>> you shouldn't do this either.
> I understood now. Thanks
> 
>> Take a look at sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c,
>> where you can find functions to do what you want.
>>
>> I guess you already considered doing all this in userland?:)
> 
> I'm not deploying this http server for any production, i just want to
> study its performance compared to a userland http server.
> And to experience FreeBSD kernel hacking.
> 
> I'm still trying to figure out, how to play with soreceive() now.
> But Thanks a lot, It's now clearer for me.
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"




have a look at the netgraph modules.
There is a module called ksocket that allows other netgraph modules to 
use sockets. more than one person has implemented an in-kernel http 
server in a netgraph module.




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