svn commit: r234228 - head/sys/dev/netmap

Luigi Rizzo rizzo at iet.unipi.it
Fri Apr 13 18:12:22 UTC 2012


On Fri, Apr 13, 2012 at 10:59:59AM -0700, Adrian Chadd wrote:
> On 13 April 2012 09:32, Luigi Rizzo <luigi at freebsd.org> wrote:
> > Author: luigi
> > Date: Fri Apr 13 16:32:33 2012
> > New Revision: 234228
> > URL: http://svn.freebsd.org/changeset/base/234228
> >
> > Log:
> > ?add the new memory allocator for netmap, which allocates memory
> > ?in small clusters instead of one big contiguous chunk.
> > ?This was already enabled in the previous commit.
> 
> Hi,
> 
> is there any scope to make this more generic? I can imagine other
> parts of the system wanting to use this kind of ring buffer to
> userland.

well, it is already exported to userland through mmap.

Perhaps you want to (a) have the buffers allocated on demand,
and yes, this could also be done, either per-interface or globally.
For instance the NIOCREGIF ioctl could specify how many buffers you
want, and allocate them before you malloc.

I still need to make up my mind on what is a good model for
sharing buffers among different interfaces.

cheers
luigi


More information about the svn-src-head mailing list