Date: Tue, 6 Jul 2004 09:22:39 -0400 From: Don Bowman <don@sandvine.com> To: 'thefly' <thefly@acaro.org>, freebsd-hackers@freebsd.org Subject: RE: ZEROCOPY between kernel and userland Message-ID: <FE045D4D9F7AED4CBFF1B3B813C85337051D920B@mail.sandvine.com>
next in thread | raw e-mail | index | archive | help
From: thefly [mailto:thefly@acaro.org] > Hello everybody, i'm writing a netgraph module to get some stats about > the network traffic. Actually i have to pass all the data gathered all > in one piece, to the process which asks me for it. The client should > work like this in userland: > > int * pointer; > > ioctl(dev, MY_COMMAND, pointer); > > after this pointer points to the right memory area. The array > to pass is > about 500Kb, so copying with copyout() would be too expensive, moving > the array from kernel's addrespace to process's address space would be > fast. > The question is: what's the actual API to do that, if there's any, in > freebsd 5? We did a device, and 'mmap' some shared memory between the two. The user space has read-only access.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FE045D4D9F7AED4CBFF1B3B813C85337051D920B>