"Joseph Liu" <froseph@xxxxxxxxx> wrote: > > > I still need to read more Haiku code, but it we need to have > > > uio, mbufs, sockets and all the stuff which makes up the > > > transport and > > > network layers. Any one have any thoughts/opinions? > > The current stack code have already many of these beasts under > > src/add-ons/kernel/network/core/*, so it's not a port stopper. Not > > that I'm > > used to all these BSD networkishes that much myself... > > I never understand what uio was really about, btw. Do you know? > I was under the impression we wanted to scrap our current kernelland > implementation, dump in what BSD has and the hack at the glue layers > to make it compatible with what we have. This would make it easier to AFAICT, our current networking stack has been a BSD port as well, although not from FreeBSD, and in some parts badly done (very fragile code). > maintain the port. UIO - universial io. From > http://www.freebsd.org/cgi/man.cgi?query=uio&sektion=9 it's an io api > which device drivers implement. We don't have UIOs or even something too similar yet. However, the disk architecture is using something like this internally, and I wanted to pull that out into the kernel (but this would be physical memory then, not virtual). The only problem is that we have lots of networking drivers, and we should definitely provide a compatibility layer to the FreeBSD stack for them - the device API is nothing the stack should have an influence on. OTOH this is still a bit of an "open area" in the Haiku kernel, since BeOS used to lock all user memory that was given into the kernel. That way, a read() didn't have to care where the buffer came from (as long as it was executed in the same thread). In Haiku, these accesses are currently unsafe, and could potentially crash the kernel. Bye, Axel.