[dpdk-dev] [PATCH v2 2/6] lib/ring: add template to support different element sizes
Honnappa.Nagarahalli at arm.com
Tue Sep 10 00:33:18 CEST 2019
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson at intel.com>
> Sent: Monday, September 9, 2019 4:01 AM
> To: Stephen Hemminger <stephen at networkplumber.org>
> Cc: Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>;
> olivier.matz at 6wind.com; yipeng1.wang at intel.com;
> sameh.gobriel at intel.com; pablo.de.lara.guarch at intel.com; dev at dpdk.org;
> pbhagavatula at marvell.com; jerinj at marvell.com
> Subject: Re: [dpdk-dev] [PATCH v2 2/6] lib/ring: add template to support
> different element sizes
> On Sun, Sep 08, 2019 at 08:44:36PM +0100, Stephen Hemminger wrote:
> > On Fri, 6 Sep 2019 14:05:06 -0500
> > Honnappa Nagarahalli <honnappa.nagarahalli at arm.com> wrote:
> > > Add templates to support creating ring APIs with different ring
> > > element sizes.
> > >
> > > Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> > > Reviewed-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
> > > Reviewed-by: Gavin Hu <gavin.hu at arm.com>
> > > Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
> > Understand the desire for generic code, but macro's are much harder to
> > maintain and debug. Would it be possible to use inline code taking a
> > size argument and let compiler optimizations with constant folding do the
> same thing.
> > Sorry, I vote NO for large scale use of macro's.
> I would tend to agree. This use of macros makes the code very awkward to
> read and understand.
Stephen, Bruce, thank you for your feedback. Looks like we at least have an agreement on the problem definition, hopefully we can find a solution. I will try to rework this and get back with solutions/problems.
More information about the dev