On Mon, May 25, 2026 at 03:06:21PM +0100, Anatoly Burakov wrote: > Add `RTE_CONCAT()` macro to enable token concatenation with proper macro > expansion. > > Signed-off-by: Anatoly Burakov <[email protected]> > --- Acked-by: Bruce Richardson <[email protected]>
> lib/eal/include/rte_common.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h > index 0a356abae2..05e72e500e 100644 > --- a/lib/eal/include/rte_common.h > +++ b/lib/eal/include/rte_common.h > @@ -918,6 +918,10 @@ __extension__ typedef uint64_t RTE_MARKER64[0]; > /** Take a macro value and get a string version of it */ > #define RTE_STR(x) _RTE_STR(x) > > +/** Concatenate two tokens after expanding macros in both. */ > +#define _RTE_CONCAT2(a, b) a ## b > +#define RTE_CONCAT(a, b) _RTE_CONCAT2(a, b) > + > /** > * ISO C helpers to modify format strings using variadic macros. > * This is a replacement for the ", ## __VA_ARGS__" GNU extension. > -- > 2.47.3 >

