diff mbox series

[2.0,v2,3/6] linux-gen: pktio: tap: build TAP pktio based on configuration option

Message ID 1508857207-23099-4-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 TAP 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   | 3 +++
 platform/linux-generic/pktio/subsystem.c | 4 ++++
 platform/linux-generic/pktio/tap.c       | 4 ++++
 3 files changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4
index 9c35a9962..2cc16a045 100644
--- a/platform/linux-generic/m4/configure.m4
+++ b/platform/linux-generic/m4/configure.m4
@@ -94,3 +94,6 @@  AC_CONFIG_FILES([platform/linux-generic/Makefile
 ##########################################################################
 AC_DEFINE([ODP_PKTIO_IPC], [1],
 	      [Define to 1 to enable IPC packet I/O support])
+
+AC_DEFINE([ODP_PKTIO_TAP], [1],
+	      [Define to 1 to enable TAP packet I/O support])
diff --git a/platform/linux-generic/pktio/subsystem.c b/platform/linux-generic/pktio/subsystem.c
index 2ad856247..76b8a9283 100644
--- a/platform/linux-generic/pktio/subsystem.c
+++ b/platform/linux-generic/pktio/subsystem.c
@@ -35,7 +35,9 @@  extern int enable_link_pcap_pktio_ops;
 #endif
 extern int enable_link_socket_pktio_ops;
 extern int enable_link_socket_mmap_pktio_ops;
+#ifdef ODP_PKTIO_TAP
 extern int enable_link_tap_pktio_ops;
+#endif
 
 ODP_SUBSYSTEM_CONSTRUCTOR(pktio_ops)
 {
@@ -58,5 +60,7 @@  ODP_SUBSYSTEM_CONSTRUCTOR(pktio_ops)
 #endif
 	enable_link_socket_pktio_ops = 1;
 	enable_link_socket_mmap_pktio_ops = 1;
+#ifdef ODP_PKTIO_TAP
 	enable_link_tap_pktio_ops = 1;
+#endif
 }
diff --git a/platform/linux-generic/pktio/tap.c b/platform/linux-generic/pktio/tap.c
index e256eec3e..fffc4c82f 100644
--- a/platform/linux-generic/pktio/tap.c
+++ b/platform/linux-generic/pktio/tap.c
@@ -6,6 +6,8 @@ 
 
 #include "config.h"
 
+#ifdef ODP_PKTIO_TAP
+
 /**
  * @file
  *
@@ -423,3 +425,5 @@  ODP_MODULE_CONSTRUCTOR(tap_pktio_ops)
  * will remove in Makefile scheme changes.
  */
 int enable_link_tap_pktio_ops = 0;
+
+#endif /* ODP_PKTIO_TAP */