[dpdk-dev] [PATCH v2] eventdev: fix Rx adapter event flush logic

Rao, Nikhil nikhil.rao at intel.com
Fri May 10 10:19:10 CEST 2019



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas at monjalon.net]
> Sent: Friday, May 10, 2019 12:48 AM
> To: Rao, Nikhil <nikhil.rao at intel.com>
> Cc: dev at dpdk.org; jerinj at marvell.com; matias.elo at nokia.com
> Subject: Re: [dpdk-dev] [PATCH v2] eventdev: fix Rx adapter event flush logic
> 
> 09/05/2019 06:50, Nikhil Rao:
> > The Rx adapter flushes events only if it has BATCH_SIZE events
> > buffered where BATCH_SIZE is set to 32, e.g., if a single packet is
> > sent, it is never passed to eventdev. Fix this issue by adding an
> > event buffer flush either when a Rx queue is found to be empty or the
> > adapter service function has processed the max number of packets for
> > an invocation.
> >
> > Bugzilla ID: 277
> >
> > Fixes: 6b83f5935543 ("eventdev: add event buffer flush in Rx adapter")
> >
> > Reported-by: Matias Elo <matias.elo at nokia.com>
> >
> > Signed-off-by: Nikhil Rao <nikhil.rao at intel.com>
> > ---
> > --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> > @@ -872,7 +872,7 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b)
> > -	if (buf->count >= BATCH_SIZE)
> > +	if (buf->count)
> 
> I don't this code, but it looks you are removing a test which was probably
> done on purpose.
The previous test (against BATCH_SIZE)  resulted in events permanently sitting
in the buffer if the number of events in the buffer was less than BATCH_SIZE. 

> By the way, you should make your test explicit with "!= 0".
> 
Done.

Thanks,
Nikhil 



More information about the dev mailing list