[dpdk-dev] [PATCH v2 2/6] lib/ring: add template to support different element sizes

Stephen Hemminger stephen at networkplumber.org
Sun Sep 8 21:44:36 CEST 2019

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.

More information about the dev mailing list