diff mbox series

[2.0,v2,2/6] linux-gen: pktio: ipc: build ipc pktio based on configuration option

Message ID 1508857207-23099-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [2.0,v2,1/6] linux-dpdk: pktio: dpdk: build dpdk pktio based on configuration option | expand

Commit Message

Github ODP bot Oct. 24, 2017, 3 p.m. UTC
From: Bogdan Pricope <bogdan.pricope@linaro.org>


Build ipc pktio based on configuration option

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

---
/** Email created from pull request 255 (bogdanPricope:2_0_pktio_sub_unif_pr)
 ** https://github.com/Linaro/odp/pull/255
 ** Patch: https://github.com/Linaro/odp/pull/255.patch
 ** Base sha: d37aa7f1c0480273fb0ccfded44a13e3e5a8e42f
 ** Merge commit sha: 7ba6d7f0e026041bb48d6d90f02d9b556020c337
 **/
 platform/linux-generic/m4/configure.m4   | 6 ++++++
 platform/linux-generic/pktio/ipc.c       | 4 ++++
 platform/linux-generic/pktio/subsystem.c | 4 ++++
 3 files changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4
index 85d35f253..9c35a9962 100644
--- a/platform/linux-generic/m4/configure.m4
+++ b/platform/linux-generic/m4/configure.m4
@@ -88,3 +88,9 @@  m4_include([platform/linux-generic/m4/odp_schedule.m4])
 
 AC_CONFIG_FILES([platform/linux-generic/Makefile
                  platform/linux-generic/include/odp/api/plat/static_inline.h])
+
+##########################################################################
+# Enable default pktios build
+##########################################################################
+AC_DEFINE([ODP_PKTIO_IPC], [1],
+	      [Define to 1 to enable IPC packet I/O support])
diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/pktio/ipc.c
index 6505d7878..5ab957403 100644
--- a/platform/linux-generic/pktio/ipc.c
+++ b/platform/linux-generic/pktio/ipc.c
@@ -6,6 +6,8 @@ 
 
 #include "config.h"
 
+#ifdef ODP_PKTIO_IPC
+
 #include <odp_debug_internal.h>
 #include <odp_packet_io_internal.h>
 #include <odp/api/system_info.h>
@@ -826,3 +828,5 @@  ODP_MODULE_CONSTRUCTOR(ipc_pktio_ops)
  * will remove in Makefile scheme changes.
  */
 int enable_link_ipc_pktio_ops = 0;
+
+#endif /* ODP_PKTIO_IPC */
diff --git a/platform/linux-generic/pktio/subsystem.c b/platform/linux-generic/pktio/subsystem.c
index fbcf22d77..2ad856247 100644
--- a/platform/linux-generic/pktio/subsystem.c
+++ b/platform/linux-generic/pktio/subsystem.c
@@ -23,7 +23,9 @@  ODP_SUBSYSTEM_FOREACH_TEMPLATE(pktio_ops, term_global, ODP_ABORT)
 #ifdef ODP_PKTIO_DPDK
 extern int enable_link_dpdk_pktio_ops;
 #endif
+#ifdef ODP_PKTIO_IPC
 extern int enable_link_ipc_pktio_ops;
+#endif
 extern int enable_link_loopback_pktio_ops;
 #ifdef ODP_NETMAP
 extern int enable_link_netmap_pktio_ops;
@@ -44,7 +46,9 @@  ODP_SUBSYSTEM_CONSTRUCTOR(pktio_ops)
 #ifdef ODP_PKTIO_DPDK
 	enable_link_dpdk_pktio_ops = 1;
 #endif
+#ifdef ODP_PKTIO_IPC
 	enable_link_ipc_pktio_ops = 1;
+#endif
 	enable_link_loopback_pktio_ops = 1;
 #ifdef ODP_NETMAP
 	enable_link_netmap_pktio_ops = 1;