[dpdk-dev] [PATCH v5 01/41] pipeline: add new SWX pipeline type

Dumitrescu, Cristian cristian.dumitrescu at intel.com
Wed Sep 23 20:37:19 CEST 2020


Hi Stephen,

> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Wednesday, September 23, 2020 7:25 PM
> To: Dumitrescu, Cristian <cristian.dumitrescu at intel.com>
> Cc: dev at dpdk.org; thomas at monjalon.net; david.marchand at redhat.com
> Subject: Re: [dpdk-dev] [PATCH v5 01/41] pipeline: add new SWX pipeline
> type
> 
> On Wed, 23 Sep 2020 19:06:05 +0100
> Cristian Dumitrescu <cristian.dumitrescu at intel.com> wrote:
> 
> > +/*
> > + * Pipeline.
> > + */
> > +struct rte_swx_pipeline {
> > +	int build_done;
> > +	int numa_node;
> > +};
> > +
> 
> Nit, could build_done be a bool type?
> 

As we discussed this in an earlier version of this patch set:
Isn't the difference between int and bool mostly cosmetic?
AFAIK we don't have a hard rule in DPDK about bool vs. int.
IMO doing this change now it likely not going to add any value.

> +void
> +rte_swx_pipeline_free(struct rte_swx_pipeline *p)
> +{
> +	if (!p)
> +		return;
> +
> +	free(p);
> +}
> 
> The free() function in libc is defined to accept NULL as ok.
> Please remove the if()

This is just the early function wrapper in patch 1 out of 41, mode code is added in this function by later patches that need the if statement. IMO this change will not add any value at all here.

Thanks,
Cristian


More information about the dev mailing list