> From: Andrew Rybchenko [mailto:[email protected]]
> Sent: Sunday, 6 November 2022 12.41
>
> On 11/4/22 15:03, Morten Brørup wrote:
[...]
> > +/**
> > + * @internal When stats is enabled, store some statistics.
> > + *
> > + * @param cache
> > + * Pointer to the memory pool cache.
> > + * @param name
> > + * Name of the statistics field to increment in the memory pool
> cache.
> > + * @param n
> > + * Number to add to the statistics.
> > + */
> > +#ifdef RTE_LIBRTE_MEMPOOL_STATS
> > +#define RTE_MEMPOOL_CACHE_STAT_ADD(cache, name, n) (cache)-
> >stats.name += n
>
> I'd enclose it in parenthesis.
Me too! I had it surrounded by "do {...} while (0)" in v3, but checkpatch
complained about it [1], so I changed it to the above. Which checkpatch also
complains about. :-(
[1]: http://mails.dpdk.org/archives/test-report/2022-November/321316.html
Feel free to modify this macro at your preference when merging!
>
> > +#else
> > +#define RTE_MEMPOOL_CACHE_STAT_ADD(cache, name, n) do {} while (0)
> > +#endif
> > +