Re: AF_XDP and dma

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

 



On Fri, Apr 9, 2021 at 1:23 PM ratheesh kannoth <ratheesh.ksz@xxxxxxxxx> wrote:
>
> On Fri, Apr 9, 2021 at 4:36 PM Magnus Karlsson
> <magnus.karlsson@xxxxxxxxx> wrote:
>
> > In XDP/AF_XDP mode, the NIC only uses a single 4K page (on x86-64) per
> > packet so it will be physically contiguous by definition.
> How ? if userspace allocates memory, it would be only contiguous in
> virtual address space.

Physically it only has to be contiguous in a 4K page, since we are
only using a single 4K page for each packet. And a single page is
always contiguous in both virtual and physical memory by definition.
The umem is broken up into pages and these are mapped separately. The
whole umem does not have to be physically contiguous. The NIC only
cares about every single frame (and only one frame per packet is
allowed with XDP for now) being in a physically contiguous region and
that we satisfy by limiting the size of a packet to one page.

>  >Every single
> > page will be dma mapped separately and can reside anywhere.
> I agree.  My concern is not on total memory. it is about each chunk.
>
> >There is
> > no scatter-gather in XDP/AF_XDP mode.
> i agree.  i am not talking about Scatter gather (nr_frags or frag_list)
>
> > > > > > > > /Magnus



[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux