linux-dpdk: clean inline files and make build success

Message ID 1477906623-24638-1-git-send-email-balakrishna.garapati@linaro.org
State New
Headers show

Commit Message

Balakrishna Garapati Oct. 31, 2016, 9:37 a.m.
Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>
---

 This patch cleans left over ODP_INLINE flags and runs completely
 on ODP_ABI_COMPAT flag.

 configure.ac                                       |  7 -----
 .../include/odp/api/plat/packet_inlines.h          |  4 +--
 platform/linux-dpdk/odp_packet.c                   |  2 +-
 platform/linux-dpdk/odp_packet_flags.c             |  2 +-
 platform/linux-dpdk/odp_std_clib.c                 |  4 +--
 platform/linux-generic/Makefile.am                 |  1 -
 .../include/odp/api/plat/inlines.h.in              | 33 ----------------------
 test/linux-dpdk/Makefile.inc                       |  9 +++---
 8 files changed, 11 insertions(+), 51 deletions(-)
 delete mode 100644 platform/linux-generic/include/odp/api/plat/inlines.h.in

--
1.9.1

Patch hide | download patch | download mbox

diff --git a/configure.ac b/configure.ac
index 0e49b47..d7a8e3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,13 +182,6 @@  AM_CONDITIONAL([test_example], [test x$test_example = xyes ])
 AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"])
 AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ])
 AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
-if test x$enable_shared != xyes;
-then
-    _ODP_INLINES="_ODP_INLINES"
-else
-    _ODP_INLINES="_ODP_NO_INLINES"
-fi
-AC_SUBST(_ODP_INLINES)

 ##########################################################################
 # Setup doxygen documentation
diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h
index cd403bf..45ef1a2 100644
--- a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h
+++ b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h
@@ -17,7 +17,7 @@ 
 extern "C" {
 #endif

-#ifdef _ODP_INLINES
+#if ODP_ABI_COMPAT == 0

 extern const unsigned int buf_addr_offset;
 extern const unsigned int data_off_offset;
@@ -29,7 +29,7 @@  extern const unsigned int rss_offset;
 extern const unsigned int ol_flags_offset;
 extern const uint64_t rss_flag;

-#endif /* _ODP_INLINES */
+#endif /* ODP_ABI_COMPAT */
 /*
  * NOTE: These functions are inlined because they are on a performance hot path.
  * As we can't force the application to directly include DPDK headers we have to
diff --git a/platform/linux-dpdk/odp_packet.c b/platform/linux-dpdk/odp_packet.c
index 8bd7379..fe00c26 100644
--- a/platform/linux-dpdk/odp_packet.c
+++ b/platform/linux-dpdk/odp_packet.c
@@ -61,7 +61,7 @@  ODP_STATIC_ASSERT(sizeof(dummy.hash.rss) == sizeof(uint32_t),
 ODP_STATIC_ASSERT(sizeof(dummy.ol_flags) == sizeof(uint64_t),
 		  "ol_flags should be uint64_t");

-#ifndef _ODP_INLINES
+#if ODP_ABI_COMPAT == 0
 #include <odp/api/plat/packet_inlines.h>
 #endif

diff --git a/platform/linux-dpdk/odp_packet_flags.c b/platform/linux-dpdk/odp_packet_flags.c
index 10d4097..57357c7 100644
--- a/platform/linux-dpdk/odp_packet_flags.c
+++ b/platform/linux-dpdk/odp_packet_flags.c
@@ -7,7 +7,7 @@ 
 #include <odp/api/packet_flags.h>
 #include <odp_packet_internal.h>

-#ifndef _ODP_INLINES
+#if ODP_ABI_COMPAT == 0
 #include <odp/api/plat/packet_flags_inlines.h>
 #endif

diff --git a/platform/linux-dpdk/odp_std_clib.c b/platform/linux-dpdk/odp_std_clib.c
index 6e36abc..2a00cfe 100644
--- a/platform/linux-dpdk/odp_std_clib.c
+++ b/platform/linux-dpdk/odp_std_clib.c
@@ -12,7 +12,7 @@  extern "C" {

 #include <odp/api/std_clib.h>

-#ifdef _ODP_INLINES
+#if ODP_ABI_COMPAT == 0
 #include <odp/api/visibility_begin.h>
 #endif

@@ -27,7 +27,7 @@  void* (*const dpdk_memcpy)(void*, const void*, size_t) = &_rte_memcpy;
 void* (*const dpdk_memcpy)(void*, const void*, size_t) = &rte_memcpy;
 #endif

-#ifdef _ODP_INLINES
+#if ODP_ABI_COMPAT == 0
 #include <odp/api/visibility_end.h>
 #else
 #include <odp/api/plat/std_clib_inlines.h>
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 6aac140..0ec13d4 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -73,7 +73,6 @@  odpapiplatinclude_HEADERS = \
 		  $(srcdir)/include/odp/api/plat/crypto_types.h \
 		  $(srcdir)/include/odp/api/plat/event_types.h \
 		  $(srcdir)/include/odp/api/plat/init_types.h \
-		  $(srcdir)/include/odp/api/plat/inlines.h \
 		  $(srcdir)/include/odp/api/plat/packet_types.h \
 		  $(srcdir)/include/odp/api/plat/packet_io_types.h \
 		  $(srcdir)/include/odp/api/plat/pool_types.h \
diff --git a/platform/linux-generic/include/odp/api/plat/inlines.h.in b/platform/linux-generic/include/odp/api/plat/inlines.h.in
deleted file mode 100644
index 5d8c0dc..0000000
--- a/platform/linux-generic/include/odp/api/plat/inlines.h.in
+++ /dev/null
@@ -1,33 +0,0 @@ 
-/* Copyright (c) 2016, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-/**
- * @file
- *
- * ODP platform inline functions
- */
-
-#ifndef ODP_PLAT_INLINES_H_
-#define ODP_PLAT_INLINES_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define @_ODP_INLINES@
-
-#ifdef _ODP_INLINES
-#define _STATIC static inline
-#else
-#define _STATIC
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* ODP_PLAT_INLINES_H_ */
diff --git a/test/linux-dpdk/Makefile.inc b/test/linux-dpdk/Makefile.inc
index 9e2b6a9..8f63d01 100644
--- a/test/linux-dpdk/Makefile.inc
+++ b/test/linux-dpdk/Makefile.inc
@@ -9,8 +9,9 @@  LIB   = $(top_builddir)/lib
 LIBODP = $(LIB)/libodphelper-linux.la $(LIB)/libodp-dpdk.la

 INCCUNIT_COMMON = -I$(top_srcdir)/test/common_plat/common
-INCODP = -I$(top_srcdir)/test \
-	 -I$(top_srcdir)/platform/@with_platform@/include \
-	 -I$(top_srcdir)/platform/@with_platform@/arch/$(ARCH_DIR) \
+INCODP = -I$(top_builddir)/platform/@with_platform@/include \
+	 -I$(top_srcdir)/helper/include \
 	 -I$(top_srcdir)/include \
-	 -I$(top_srcdir)/helper/include
+	 -I$(top_srcdir)/platform/@with_platform@/arch/$(ARCH_DIR) \
+	 -I$(top_srcdir)/platform/@with_platform@/include \
+	 -I$(top_srcdir)/test