[dpdk-dev] [PATCH v7 1/6] eal: add internal ABI tag definition

Haiyue Wang haiyue.wang at intel.com
Sat Apr 25 12:56:15 CEST 2020


Introduce the __rte_internal tag to mark internal ABI function which is
used only by the drivers or other libraries.

Signed-off-by: Haiyue Wang <haiyue.wang at intel.com>
---
 lib/librte_eal/include/rte_compat.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h
index 3eb33784b..4cd8f68d6 100644
--- a/lib/librte_eal/include/rte_compat.h
+++ b/lib/librte_eal/include/rte_compat.h
@@ -19,4 +19,17 @@ __attribute__((section(".text.experimental")))
 
 #endif
 
+#ifndef ALLOW_INTERNAL_API
+
+#define __rte_internal \
+__attribute__((error("Symbol is not public ABI"), \
+section(".text.internal")))
+
+#else
+
+#define __rte_internal \
+__attribute__((section(".text.internal")))
+
+#endif
+
 #endif /* _RTE_COMPAT_H_ */
-- 
2.26.2



More information about the dev mailing list