diff mbox series

[v10,26/30] linux-gen: split odp_packet/odp_packet_flags

Message ID 20171027125014.27313-27-dmitry.ereminsolenikov@linaro.org
State Accepted
Commit d35f27a2c613e5fa66a6d854b662b435f0e4f402
Headers show
Series restructure headers for ABI-compat/platform-optimized modes | expand

Commit Message

Dmitry Eremin-Solenikov Oct. 27, 2017, 12:50 p.m. UTC
Split away inclusion of API implementation to the files selected by
Automake.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
 platform/linux-generic/Makefile.am            |  2 ++
 platform/linux-generic/odp_packet.c           |  5 -----
 platform/linux-generic/odp_packet_api.c       | 28 +++++++++++++++++++++++++++
 platform/linux-generic/odp_packet_flags.c     |  5 -----
 platform/linux-generic/odp_packet_flags_api.c | 15 ++++++++++++++
 5 files changed, 45 insertions(+), 10 deletions(-)
 create mode 100644 platform/linux-generic/odp_packet_api.c
 create mode 100644 platform/linux-generic/odp_packet_flags_api.c

-- 
2.14.2
diff mbox series

Patch

diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 078d154f8f15..3c1551aab7a6 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -233,6 +233,8 @@  if ODP_ABI_COMPAT
 __LIB__libodp_linux_la_SOURCES += \
 			   odp_atomic_api.c \
 			   odp_byteorder.c \
+			   odp_packet_api.c \
+			   odp_packet_flags_api.c \
 			   odp_std_clib.c \
 			   odp_sync.c \
 			   odp_ticketlock.c
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index ada02faec018..ebfaeea29e93 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -2311,8 +2311,3 @@  int odp_packet_has_ref(odp_packet_t pkt)
 
 	return 0;
 }
-
-/* Include non-inlined versions of API functions */
-#if ODP_ABI_COMPAT == 1
-#include <odp/api/plat/packet_inlines_api.h>
-#endif
diff --git a/platform/linux-generic/odp_packet_api.c b/platform/linux-generic/odp_packet_api.c
new file mode 100644
index 000000000000..dd038e81c3ff
--- /dev/null
+++ b/platform/linux-generic/odp_packet_api.c
@@ -0,0 +1,28 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+#include "config.h"
+
+#include <odp/api/packet.h>
+#include <odp/api/plat/packet_inlines.h>
+#include <odp_packet_internal.h>
+#include <odp_debug_internal.h>
+#include <odp/api/hints.h>
+#include <odp/api/byteorder.h>
+
+#include <protocols/eth.h>
+#include <protocols/ip.h>
+#include <protocols/tcp.h>
+#include <protocols/udp.h>
+
+#include <errno.h>
+#include <string.h>
+#include <stdio.h>
+#include <inttypes.h>
+
+/* Include non-inlined versions of API functions */
+#define _ODP_INLINE
+#include <odp/api/plat/packet_inlines_api.h>
diff --git a/platform/linux-generic/odp_packet_flags.c b/platform/linux-generic/odp_packet_flags.c
index 2e26ad601735..96507c6644d3 100644
--- a/platform/linux-generic/odp_packet_flags.c
+++ b/platform/linux-generic/odp_packet_flags.c
@@ -299,8 +299,3 @@  void odp_packet_has_ts_clr(odp_packet_t pkt)
 
 	pkt_hdr->p.input_flags.timestamp = 0;
 }
-
-/* Include non-inlined versions of API functions */
-#if ODP_ABI_COMPAT == 1
-#include <odp/api/plat/packet_flag_inlines_api.h>
-#endif
diff --git a/platform/linux-generic/odp_packet_flags_api.c b/platform/linux-generic/odp_packet_flags_api.c
new file mode 100644
index 000000000000..6b373843a3ce
--- /dev/null
+++ b/platform/linux-generic/odp_packet_flags_api.c
@@ -0,0 +1,15 @@ 
+/* Copyright (c) 2014, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+#include "config.h"
+
+#include <odp/api/plat/packet_flag_inlines.h>
+#include <odp/api/packet_flags.h>
+#include <odp_packet_internal.h>
+
+/* Include non-inlined versions of API functions */
+#define _ODP_INLINE
+#include <odp/api/plat/packet_flag_inlines_api.h>