[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Receiving Network Packets with Mirage/kFreeBSD



Following up to my original mail in order to gently motivate Robert and Anil
to answer :-)

On Thu, Aug 16, 2012 at 03:13:27PM +0200, PALI Gabor Janos wrote:
> - Shared ring buffers are created as Io_pages by allocating page-aligned,
>   contiguous, multi-page memory areas via FreeBSD's contigmalloc(9).  These
>   are directly accessible in Mirage as character arrays.

Io_page.get currently returns a single page with the given size (in bytes),
and not an array of pages.  I did not see the reason to do so, as one can
always get the corresponding pages with the Io_page.to_pages function.


> - Each packet arriving on any of the plugged interfaces is placed to the next
>   available slot of the corresponding shared ring buffer with m_copydata().

I agree that m_copydata() involves a possibly unnecessary copying.  But it also
contributes to flattening the packets so Mirage can work with them without too
much trickery.  I suppose intercepted packets should be turned into linear 
memory
buffers at some point.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.