[PATCH] net/gve: Allocate qpl pages using malloc if memzone allocation fails

Stephen Hemminger stephen at networkplumber.org
Thu Dec 19 23:34:28 CET 2024


On Thu, 19 Dec 2024 12:53:14 -0800
Praveen Kaligineedi <pkaligineedi at google.com> wrote:

> The TX queue requires IOVA contiguous QPL memory.  So, we still need
> memzone code for TX queues.
> 
> Regards,
> Praveen
> 
> On Wed, Dec 18, 2024 at 7:51 PM Stephen Hemminger
> <stephen at networkplumber.org> wrote:
> >
> > On Wed, 18 Dec 2024 15:46:35 -0800
> > Joshua Washington <joshwash at google.com> wrote:
> >  
> > > From: Praveen Kaligineedi <pkaligineedi at google.com>
> > >
> > > Allocating QPL for an RX queue might fail if enough contiguous IOVA
> > > memory cannot be allocated. However, the only requirement for QPL
> > > for RX is that each 4K buffer be IOVA contiguous, not the entire
> > > QPL. Therefore, use malloc to allocate 4K buffers if the allocation
> > > using memzone fails.
> > >
> > > Signed-off-by: Praveen Kaligineedi <pkaligineedi at google.com>
> > > Reviewed-by: Joshua Washington <joshwash at google.com>
> > > ---  
> >
> > Why keep the memzone code? rte_malloc and memzone are both coming from
> > huge pages. Is there any advantage to memzone for what you are doing?
> >
> > Better to not have two potential allocation paths to test.  


So then use rte_malloc for Rx queue and rte_memzone for Tx queue
and document rationale.


More information about the dev mailing list