[PATCH v4 01/26] eal/common: add token concatenation macro
Anatoly Burakov
anatoly.burakov at intel.com
Fri May 22 17:14:10 CEST 2026
Add `RTE_CONCAT()` macro to enable token concatenation with proper macro
expansion.
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
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
More information about the dev
mailing list