[dpdk-dev] [PATCH] lib: add warning for NULL pointer

Varghese, Vipin vipin.varghese at intel.com
Wed Dec 5 06:15:59 CET 2018


Do you plan to check for all iteration for ' flows->last_cmplt ' is successful?

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Varghese, Vipin
> Sent: Wednesday, December 5, 2018 10:07 AM
> To: Yang, Qiming <qiming.yang at intel.com>; dev at dpdk.org
> Cc: Yang, Qiming <qiming.yang at intel.com>; stable at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] lib: add warning for NULL pointer
> 
> Hi,
> 
> Should not the warning be stated for ' alloc_completion' failure
> 
> Snipped
> 
> >  				flows->num_packets * flows->categories);
> >  		}
> >
> > +		if (flows->last_cmplt == NULL)
> > +			RTE_LOG(WARNING, MALLOC, "packet tries allocate
> > failed");
> 
> Why is that we want to try this outside block?
> 
> > +
> >  		/* set completion parameters and starting index for this slot */
> >  		parms[n].cmplt = flows->last_cmplt;
> >  		transition =
> > --
> > 2.9.5



More information about the dev mailing list