diff mbox series

[2.0,v2,1/6] linux-gen: modular-framework: move modular framework headers to a public folder

Message ID 1510333217-26418-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [2.0,v2,1/6] linux-gen: modular-framework: move modular framework headers to a public folder | expand

Commit Message

Github ODP bot Nov. 10, 2017, 5 p.m. UTC
From: Bogdan Pricope <bogdan.pricope@linaro.org>


Move modular framework headers to a public folder.

Signed-off-by: Bogdan Pricope <bogdan.pricope@linaro.org>

---
/** Email created from pull request 261 (bogdanPricope:2_0_mf_include_pr)
 ** https://github.com/Linaro/odp/pull/261
 ** Patch: https://github.com/Linaro/odp/pull/261.patch
 ** Base sha: 65419c16086369f86dea068e54ce492526fa4f41
 ** Merge commit sha: 3034b865079536d2064a7ceb890b5bf6876949a6
 **/
 frameworks/modular/module.h                        | 19 ++++++++++++++++
 frameworks/modular/odp_module.c                    |  2 +-
 include/Makefile.am                                |  8 ++++++-
 .../frameworks/modular/spec}/list.h                |  0
 .../frameworks/modular/spec/module.h               |  0
 include/odp_mf.h                                   | 26 ++++++++++++++++++++++
 platform/linux-dpdk/Makefile.am                    |  7 +++---
 platform/linux-generic/Makefile.am                 |  4 +---
 platform/linux-generic/buffer/subsystem.c          |  1 -
 .../linux-generic/include/odp_buffer_subsystem.h   |  2 +-
 .../include/odp_pktio_ops_subsystem.h              |  2 +-
 .../linux-generic/include/odp_pool_subsystem.h     |  2 +-
 .../linux-generic/include/odp_queue_subsystem.h    |  2 +-
 .../linux-generic/include/odp_schedule_subsystem.h |  4 +---
 platform/linux-generic/pool/subsystem.c            |  1 -
 platform/linux-generic/queue/subsystem.c           |  1 -
 platform/linux-generic/schedule/subsystem.c        |  1 -
 17 files changed, 62 insertions(+), 20 deletions(-)
 create mode 100644 frameworks/modular/module.h
 rename {frameworks/modular => include/frameworks/modular/spec}/list.h (100%)
 rename frameworks/modular/odp_module.h => include/frameworks/modular/spec/module.h (100%)
 create mode 100644 include/odp_mf.h
diff mbox series

Patch

diff --git a/frameworks/modular/module.h b/frameworks/modular/module.h
new file mode 100644
index 000000000..866a89b7d
--- /dev/null
+++ b/frameworks/modular/module.h
@@ -0,0 +1,19 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+#ifndef ODP_CORE_MODULE_H_
+#define ODP_CORE_MODULE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <frameworks/modular/spec/module.h>
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ODP_CORE_MODULE_H_ */
diff --git a/frameworks/modular/odp_module.c b/frameworks/modular/odp_module.c
index 475bcd5e2..596befd55 100644
--- a/frameworks/modular/odp_module.c
+++ b/frameworks/modular/odp_module.c
@@ -10,7 +10,7 @@ 
 
 #include <stdio.h>
 #include <errno.h>
-#include "odp_module.h"
+#include "module.h"
 
 #define MODULE_FRAMEWORK_VERSION 0x00010000UL
 ODP_SUBSYSTEM_DEFINE(module, "module framework", MODULE_FRAMEWORK_VERSION);
diff --git a/include/Makefile.am b/include/Makefile.am
index 376916723..1aeec1c72 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,7 +1,8 @@ 
 include_HEADERS = \
 		  odp.h \
 		  odp_api.h \
-		  odp_drv.h
+		  odp_drv.h \
+		  odp_mf.h
 
 odpapispecincludedir= $(includedir)/odp/api/spec
 odpapispecinclude_HEADERS = \
@@ -68,6 +69,11 @@  odpdrvspecinclude_HEADERS = \
 		  odp/drv/spec/std_types.h \
 		  odp/drv/spec/sync.h
 
+frameworksmodularspecincludedir= $(includedir)/frameworks/modular/spec
+frameworksmodularspecinclude_HEADERS = \
+		  frameworks/modular/spec/module.h \
+		  frameworks/modular/spec/list.h
+
 odpapiabidefaultincludedir= $(includedir)/odp/arch/default/api/abi
 odpapiabidefaultinclude_HEADERS = \
 	odp/arch/default/api/abi/buffer.h \
diff --git a/frameworks/modular/list.h b/include/frameworks/modular/spec/list.h
similarity index 100%
rename from frameworks/modular/list.h
rename to include/frameworks/modular/spec/list.h
diff --git a/frameworks/modular/odp_module.h b/include/frameworks/modular/spec/module.h
similarity index 100%
rename from frameworks/modular/odp_module.h
rename to include/frameworks/modular/spec/module.h
diff --git a/include/odp_mf.h b/include/odp_mf.h
new file mode 100644
index 000000000..f29ae6cee
--- /dev/null
+++ b/include/odp_mf.h
@@ -0,0 +1,26 @@ 
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * The OpenDataPlane modular framework programming interface
+ *
+ */
+
+#ifndef ODP_MF_H_
+#define ODP_MF_H_
+
+#ifdef __cplusplus
+extern C {
+#endif
+
+#include <frameworks/modular/spec/module.h>
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ODP_MF_H_ */
diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
index f27d2b50c..aa7990873 100644
--- a/platform/linux-dpdk/Makefile.am
+++ b/platform/linux-dpdk/Makefile.am
@@ -22,7 +22,6 @@  AM_CPPFLAGS +=  -I$(top_srcdir)/platform/linux-dpdk/include
 AM_CPPFLAGS +=  -I$(top_srcdir)/platform/linux-generic/include
 AM_CPPFLAGS +=  -I$(srcdir)/include
 AM_CPPFLAGS +=  -I$(top_srcdir)/include
-AM_CPPFLAGS +=  -I$(top_srcdir)/frameworks/modular
 AM_CPPFLAGS +=  -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
 AM_CPPFLAGS +=  -I$(top_builddir)/include
 AM_CPPFLAGS +=  -Iinclude
@@ -38,7 +37,8 @@  AM_CPPFLAGS +=  $(LIBCONFIG_CFLAGS)
 include_HEADERS = \
 		  $(top_srcdir)/include/odp.h \
 		  $(top_srcdir)/include/odp_api.h \
-		  $(top_srcdir)/include/odp_drv.h
+		  $(top_srcdir)/include/odp_drv.h \
+		  $(top_srcdir)/include/odp_mf.h
 
 odpincludedir= $(includedir)/odp
 odpinclude_HEADERS = \
@@ -355,8 +355,7 @@  endif
 
 # Build modular framework into odp-linux library
 modularframeworkdir = $(top_srcdir)/frameworks/modular
-noinst_HEADERS += $(modularframeworkdir)/list.h \
-		  $(modularframeworkdir)/odp_module.h
+noinst_HEADERS += $(modularframeworkdir)/module.h
 
 __LIB__libodp_dpdk_la_SOURCES += ../../frameworks/modular/odp_module.c
 
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 3c5054958..afbb0edba 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -10,7 +10,6 @@  lib_LTLIBRARIES = $(LIB)/libodp-linux.la
 
 AM_CPPFLAGS =  -I$(srcdir)/include
 AM_CPPFLAGS +=  -I$(top_srcdir)/include
-AM_CPPFLAGS +=  -I$(top_srcdir)/frameworks/modular
 AM_CPPFLAGS +=  -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
 AM_CPPFLAGS +=  -I$(top_builddir)/include
 AM_CPPFLAGS +=  -Iinclude
@@ -377,8 +376,7 @@  endif
 
 # Build modular framework into odp-linux library
 modularframeworkdir = $(top_srcdir)/frameworks/modular
-noinst_HEADERS += $(modularframeworkdir)/list.h \
-		  $(modularframeworkdir)/odp_module.h
+noinst_HEADERS += $(modularframeworkdir)/module.h
 
 __LIB__libodp_linux_la_SOURCES += ../../frameworks/modular/odp_module.c
 
diff --git a/platform/linux-generic/buffer/subsystem.c b/platform/linux-generic/buffer/subsystem.c
index d47525cf9..767113975 100644
--- a/platform/linux-generic/buffer/subsystem.c
+++ b/platform/linux-generic/buffer/subsystem.c
@@ -8,7 +8,6 @@ 
 #include <odp/api/buffer.h>
 #include <odp_buffer_subsystem.h>
 #include <odp_debug_internal.h>
-#include <odp_module.h>
 
 ODP_SUBSYSTEM_DEFINE(buffer, "memory buffer public APIs",
 		     BUFFER_SUBSYSTEM_VERSION);
diff --git a/platform/linux-generic/include/odp_buffer_subsystem.h b/platform/linux-generic/include/odp_buffer_subsystem.h
index 3c791d207..35b2a06e1 100644
--- a/platform/linux-generic/include/odp_buffer_subsystem.h
+++ b/platform/linux-generic/include/odp_buffer_subsystem.h
@@ -14,7 +14,7 @@ 
 extern "C" {
 #endif
 
-#include <odp_module.h>
+#include <frameworks/modular/spec/module.h>
 #include <odp/api/buffer.h>
 
 #define BUFFER_SUBSYSTEM_VERSION 0x00010000UL
diff --git a/platform/linux-generic/include/odp_pktio_ops_subsystem.h b/platform/linux-generic/include/odp_pktio_ops_subsystem.h
index cb107fed2..58622ff12 100644
--- a/platform/linux-generic/include/odp_pktio_ops_subsystem.h
+++ b/platform/linux-generic/include/odp_pktio_ops_subsystem.h
@@ -14,7 +14,7 @@ 
 extern "C" {
 #endif
 
-#include <odp_module.h>
+#include <frameworks/modular/spec/module.h>
 #include <odp/api/packet_io.h>
 
 /* ODP packet IO operations subsystem declaration */
diff --git a/platform/linux-generic/include/odp_pool_subsystem.h b/platform/linux-generic/include/odp_pool_subsystem.h
index 0f34ad143..0181b74e9 100644
--- a/platform/linux-generic/include/odp_pool_subsystem.h
+++ b/platform/linux-generic/include/odp_pool_subsystem.h
@@ -14,7 +14,7 @@ 
 extern "C" {
 #endif
 
-#include <odp_module.h>
+#include <frameworks/modular/spec/module.h>
 #include <odp/api/pool.h>
 
 /* ODP pool public APIs subsystem */
diff --git a/platform/linux-generic/include/odp_queue_subsystem.h b/platform/linux-generic/include/odp_queue_subsystem.h
index 57fa68fdb..72aeebd80 100644
--- a/platform/linux-generic/include/odp_queue_subsystem.h
+++ b/platform/linux-generic/include/odp_queue_subsystem.h
@@ -14,7 +14,7 @@ 
 extern "C" {
 #endif
 
-#include <odp_module.h>
+#include <frameworks/modular/spec/module.h>
 #include <odp/api/queue.h>
 
 #define QUEUE_SUBSYSTEM_VERSION 0x00010000UL
diff --git a/platform/linux-generic/include/odp_schedule_subsystem.h b/platform/linux-generic/include/odp_schedule_subsystem.h
index 7d9247788..74bff97f0 100644
--- a/platform/linux-generic/include/odp_schedule_subsystem.h
+++ b/platform/linux-generic/include/odp_schedule_subsystem.h
@@ -17,9 +17,7 @@  extern "C" {
 /* API header files */
 #include <odp/api/align.h>
 #include <odp/api/schedule.h>
-
-/* Internal header files */
-#include <odp_module.h>
+#include <frameworks/modular/spec/module.h>
 
 #define SCHEDULE_SUBSYSTEM_VERSION 0x00010000UL
 
diff --git a/platform/linux-generic/pool/subsystem.c b/platform/linux-generic/pool/subsystem.c
index c5f644912..073a9fa98 100644
--- a/platform/linux-generic/pool/subsystem.c
+++ b/platform/linux-generic/pool/subsystem.c
@@ -9,7 +9,6 @@ 
 #include <odp_internal.h>
 #include <odp_pool_subsystem.h>
 #include <odp_debug_internal.h>
-#include <odp_module.h>
 
 #define SUBSYSTEM_VERSION 0x00010000UL
 ODP_SUBSYSTEM_DEFINE(pool, "memory pool public APIs", SUBSYSTEM_VERSION);
diff --git a/platform/linux-generic/queue/subsystem.c b/platform/linux-generic/queue/subsystem.c
index 5a88b2df9..05e8edb8e 100644
--- a/platform/linux-generic/queue/subsystem.c
+++ b/platform/linux-generic/queue/subsystem.c
@@ -12,7 +12,6 @@ 
 #include <odp_internal.h>
 #include <odp_debug_internal.h>
 #include <odp_queue_subsystem.h>
-#include <odp_module.h>
 
 ODP_SUBSYSTEM_DEFINE(queue, "queue public APIs", QUEUE_SUBSYSTEM_VERSION);
 
diff --git a/platform/linux-generic/schedule/subsystem.c b/platform/linux-generic/schedule/subsystem.c
index ba9a095f4..99c6141c2 100644
--- a/platform/linux-generic/schedule/subsystem.c
+++ b/platform/linux-generic/schedule/subsystem.c
@@ -14,7 +14,6 @@ 
 /* Internal header files */
 #include <odp_debug_internal.h>
 #include <odp_internal.h>
-#include <odp_module.h>
 #include <odp_schedule_subsystem.h>
 
 ODP_SUBSYSTEM_DEFINE(schedule, "schedule public APIs",