[v6,1/6] eal: add internal ABI tag definition

Message ID 20200425060441.36874-2-haiyue.wang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series dpdk: introduce __rte_internal tag |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/iol-mellanox-Performance fail Performance Testing issues
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-testing fail Testing issues
ci/Intel-compilation fail Compilation issues

Commit Message

Wang, Haiyue April 25, 2020, 6:04 a.m. UTC
  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@intel.com>
---
 lib/librte_eal/include/rte_compat.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
  

Patch

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_ */