diff mbox

[PATCHv8,06/12] linux-generic: move odp_ring from helper to linux-generic platfrom

Message ID 1439895698-18597-7-git-send-email-maxim.uvarov@linaro.org
State New
Headers show

Commit Message

Maxim Uvarov Aug. 18, 2015, 11:01 a.m. UTC
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 configure.ac                                                          | 1 -
 helper/Makefile.am                                                    | 4 +---
 platform/linux-generic/Makefile.am                                    | 1 +
 .../ring.h => platform/linux-generic/include/odp_ring_internal.h      | 0
 platform/linux-generic/m4/configure.m4                                | 1 +
 {helper => platform/linux-generic/pktio}/ring.c                       | 4 ++--
 platform/linux-generic/test/Makefile.am                               | 3 ++-
 {test/api_test => platform/linux-generic/test/ring}/.gitignore        | 1 -
 {test/api_test => platform/linux-generic/test/ring}/Makefile.am       | 3 ++-
 {test/api_test => platform/linux-generic/test/ring}/odp_common.c      | 0
 {test/api_test => platform/linux-generic/test/ring}/odp_common.h      | 0
 {test/api_test => platform/linux-generic/test/ring}/odp_ring_test.c   | 3 +--
 test/Makefile.am                                                      | 2 +-
 13 files changed, 11 insertions(+), 12 deletions(-)
 rename helper/include/odp/helper/ring.h => platform/linux-generic/include/odp_ring_internal.h (100%)
 rename {helper => platform/linux-generic/pktio}/ring.c (99%)
 rename {test/api_test => platform/linux-generic/test/ring}/.gitignore (52%)
 rename {test/api_test => platform/linux-generic/test/ring}/Makefile.am (66%)
 rename {test/api_test => platform/linux-generic/test/ring}/odp_common.c (100%)
 rename {test/api_test => platform/linux-generic/test/ring}/odp_common.h (100%)
 rename {test/api_test => platform/linux-generic/test/ring}/odp_ring_test.c (99%)
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 15dc6cf..d90b09b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -292,7 +292,6 @@  AC_CONFIG_FILES([Makefile
 		 pkgconfig/libodphelper.pc
 		 scripts/Makefile
 		 test/Makefile
-		 test/api_test/Makefile
 		 test/performance/Makefile
 		 test/validation/Makefile
 		 test/validation/buffer/Makefile
diff --git a/helper/Makefile.am b/helper/Makefile.am
index cde8af2..7ca4782 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -9,7 +9,6 @@  AM_CFLAGS += -I$(top_srcdir)/include
 
 helperincludedir = $(includedir)/odp/helper/
 helperinclude_HEADERS = \
-		  $(srcdir)/include/odp/helper/ring.h \
 		  $(srcdir)/include/odp/helper/linux.h \
 		  $(srcdir)/include/odp/helper/chksum.h\
 		  $(srcdir)/include/odp/helper/eth.h\
@@ -22,7 +21,6 @@  helperinclude_HEADERS = \
 noinst_HEADERS = $(srcdir)/odph_debug.h
 
 __LIB__libodphelper_la_SOURCES = \
-					linux.c \
-					ring.c
+					linux.c
 
 lib_LTLIBRARIES = $(LIB)/libodphelper.la
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index cfeeef9..e833a56 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -148,6 +148,7 @@  __LIB__libodp_la_SOURCES = \
 			   pktio/loop.c \
 			   pktio/socket.c \
 			   pktio/socket_mmap.c \
+			   pktio/ring.c \
 			   odp_pool.c \
 			   odp_queue.c \
 			   odp_rwlock.c \
diff --git a/helper/include/odp/helper/ring.h b/platform/linux-generic/include/odp_ring_internal.h
similarity index 100%
rename from helper/include/odp/helper/ring.h
rename to platform/linux-generic/include/odp_ring_internal.h
diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4
index 9658274..ff6ec7d 100644
--- a/platform/linux-generic/m4/configure.m4
+++ b/platform/linux-generic/m4/configure.m4
@@ -21,4 +21,5 @@  m4_include([platform/linux-generic/m4/odp_openssl.m4])
 
 AC_CONFIG_FILES([platform/linux-generic/Makefile
 		 platform/linux-generic/test/Makefile
+		 platform/linux-generic/test/ring/Makefile
 		 platform/linux-generic/test/pktio/Makefile])
diff --git a/helper/ring.c b/platform/linux-generic/pktio/ring.c
similarity index 99%
rename from helper/ring.c
rename to platform/linux-generic/pktio/ring.c
index fe01c5d..0ab5dd3 100644
--- a/helper/ring.c
+++ b/platform/linux-generic/pktio/ring.c
@@ -76,9 +76,9 @@ 
 #include <fcntl.h>
 #include <stdio.h>
 #include <string.h>
-#include "odph_debug.h"
 #include <odp/rwlock.h>
-#include <odp/helper/ring.h>
+#include <odp_ring_internal.h>
+#include <odph_debug.h>
 
 static TAILQ_HEAD(, odph_ring) odp_ring_list;
 
diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am
index 7d1ce1b..be134ef 100644
--- a/platform/linux-generic/test/Makefile.am
+++ b/platform/linux-generic/test/Makefile.am
@@ -1,10 +1,11 @@ 
 include $(top_srcdir)/test/Makefile.inc
 TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/validation
 
-ODP_MODULES = pktio
+ODP_MODULES = pktio ring
 
 if test_vald
 TESTS = pktio/pktio_run \
+	${top_builddir}/platform/linux-generic/test/ring/odp_ring$(EXEEXT) \
 	${top_builddir}/test/validation/buffer/buffer_main$(EXEEXT) \
 	${top_builddir}/test/validation/classification/classification_main$(EXEEXT) \
 	${top_builddir}/test/validation/cpumask/cpumask_main$(EXEEXT) \
diff --git a/test/api_test/.gitignore b/platform/linux-generic/test/ring/.gitignore
similarity index 52%
rename from test/api_test/.gitignore
rename to platform/linux-generic/test/ring/.gitignore
index 950f443..6cb99bc 100644
--- a/test/api_test/.gitignore
+++ b/platform/linux-generic/test/ring/.gitignore
@@ -1,2 +1 @@ 
 odp_ring
-odp_shm
diff --git a/test/api_test/Makefile.am b/platform/linux-generic/test/ring/Makefile.am
similarity index 66%
rename from test/api_test/Makefile.am
rename to platform/linux-generic/test/ring/Makefile.am
index fcdba48..73cd8ee 100644
--- a/test/api_test/Makefile.am
+++ b/platform/linux-generic/test/ring/Makefile.am
@@ -1,4 +1,5 @@ 
 include $(top_srcdir)/test/Makefile.inc
+TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/validation
 
 bin_PROGRAMS = odp_ring$(EXEEXT)
 
@@ -7,7 +8,7 @@  odp_ring_CFLAGS = $(AM_CFLAGS)
 odp_ring_LDFLAGS = $(AM_LDFLAGS) -static
 
 noinst_HEADERS = \
-		  $(top_srcdir)/test/api_test/odp_common.h \
+		  $(top_srcdir)/platform/linux-generic/test/ring/odp_common.h \
 		  $(top_srcdir)/test/test_debug.h
 
 dist_odp_ring_SOURCES = odp_ring_test.c odp_common.c
diff --git a/test/api_test/odp_common.c b/platform/linux-generic/test/ring/odp_common.c
similarity index 100%
rename from test/api_test/odp_common.c
rename to platform/linux-generic/test/ring/odp_common.c
diff --git a/test/api_test/odp_common.h b/platform/linux-generic/test/ring/odp_common.h
similarity index 100%
rename from test/api_test/odp_common.h
rename to platform/linux-generic/test/ring/odp_common.h
diff --git a/test/api_test/odp_ring_test.c b/platform/linux-generic/test/ring/odp_ring_test.c
similarity index 99%
rename from test/api_test/odp_ring_test.c
rename to platform/linux-generic/test/ring/odp_ring_test.c
index e8a962a..cec8221 100644
--- a/test/api_test/odp_ring_test.c
+++ b/platform/linux-generic/test/ring/odp_ring_test.c
@@ -49,7 +49,7 @@ 
 #include <string.h>
 #include <odp.h>
 #include <odp_common.h>
-#include <odp/helper/ring.h>
+#include <odp_ring_internal.h>
 #include <test_debug.h>
 
 #define RING_SIZE 4096
@@ -467,4 +467,3 @@  fail:
 
 	return 0;
 }
-
diff --git a/test/Makefile.am b/test/Makefile.am
index 2ba8008..4a75364 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,4 +1,4 @@ 
-SUBDIRS = api_test performance miscellaneous
+SUBDIRS = performance miscellaneous
 
 if cunit_support
     SUBDIRS += validation