tap_v2: move code to vnet/devices/tap
virtio backend stays in vnet/devices/virtio
Change-Id: Idbf04f1c645a809ed408670ba330662859fe9309
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vnet.am b/src/vnet.am
index 5d9fa88..a4817f2 100644
--- a/src/vnet.am
+++ b/src/vnet.am
@@ -869,27 +869,37 @@
# virtio
########################################
-libvnet_la_SOURCES += \
- vnet/devices/virtio/cli.c \
- vnet/devices/virtio/device.c \
- vnet/devices/virtio/node.c \
- vnet/devices/virtio/tap.c \
- vnet/devices/virtio/tapv2_api.c \
- vnet/devices/virtio/vhost-user.c \
- vnet/devices/virtio/vhost_user_api.c \
+libvnet_la_SOURCES += \
+ vnet/devices/virtio/device.c \
+ vnet/devices/virtio/node.c \
+ vnet/devices/virtio/vhost-user.c \
+ vnet/devices/virtio/vhost_user_api.c \
vnet/devices/virtio/virtio.c
-nobase_include_HEADERS += \
- vnet/devices/virtio/virtio.h \
- vnet/devices/virtio/tapv2.api.h \
- vnet/devices/virtio/vhost-user.h \
+nobase_include_HEADERS += \
+ vnet/devices/virtio/virtio.h \
+ vnet/devices/virtio/vhost-user.h \
vnet/devices/virtio/vhost_user.api.h
-API_FILES += vnet/devices/virtio/tapv2.api
API_FILES += vnet/devices/virtio/vhost_user.api
########################################
+# tap interface (with virtio backend)
+########################################
+
+libvnet_la_SOURCES += \
+ vnet/devices/tap/cli.c \
+ vnet/devices/tap/tap.c \
+ vnet/devices/tap/tapv2_api.c
+
+nobase_include_HEADERS += \
+ vnet/devices/tap/tap.h \
+ vnet/devices/tap/tapv2.api.h
+
+API_FILES += vnet/devices/tap/tapv2.api
+
+########################################
# ssvm ethernet
########################################
libvnet_la_SOURCES += \
diff --git a/src/vnet/devices/virtio/cli.c b/src/vnet/devices/tap/cli.c
similarity index 99%
rename from src/vnet/devices/virtio/cli.c
rename to src/vnet/devices/tap/cli.c
index efd1435..f7fc1e6 100644
--- a/src/vnet/devices/virtio/cli.c
+++ b/src/vnet/devices/tap/cli.c
@@ -28,7 +28,7 @@
#include <linux/virtio_net.h>
#include <linux/vhost.h>
#include <vnet/devices/virtio/virtio.h>
-#include <vnet/devices/virtio/tap.h>
+#include <vnet/devices/tap/tap.h>
static clib_error_t *
tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
diff --git a/src/vnet/devices/virtio/tap.c b/src/vnet/devices/tap/tap.c
similarity index 99%
rename from src/vnet/devices/virtio/tap.c
rename to src/vnet/devices/tap/tap.c
index 0eaaf27..b4004f7 100644
--- a/src/vnet/devices/virtio/tap.c
+++ b/src/vnet/devices/tap/tap.c
@@ -35,7 +35,7 @@
#include <vnet/ip/ip6_packet.h>
#include <vnet/devices/netlink.h>
#include <vnet/devices/virtio/virtio.h>
-#include <vnet/devices/virtio/tap.h>
+#include <vnet/devices/tap/tap.h>
#define _IOCTL(fd,a,...) \
if (ioctl (fd, a, __VA_ARGS__) < 0) \
diff --git a/src/vnet/devices/virtio/tap.h b/src/vnet/devices/tap/tap.h
similarity index 100%
rename from src/vnet/devices/virtio/tap.h
rename to src/vnet/devices/tap/tap.h
diff --git a/src/vnet/devices/virtio/tapv2.api b/src/vnet/devices/tap/tapv2.api
similarity index 100%
rename from src/vnet/devices/virtio/tapv2.api
rename to src/vnet/devices/tap/tapv2.api
diff --git a/src/vnet/devices/virtio/tapv2_api.c b/src/vnet/devices/tap/tapv2_api.c
similarity index 99%
rename from src/vnet/devices/virtio/tapv2_api.c
rename to src/vnet/devices/tap/tapv2_api.c
index 7a6adca..2d4d241 100644
--- a/src/vnet/devices/virtio/tapv2_api.c
+++ b/src/vnet/devices/tap/tapv2_api.c
@@ -42,7 +42,7 @@
#undef vl_printfun
#include <vlibapi/api_helper_macros.h>
-#include <vnet/devices/virtio/tap.h>
+#include <vnet/devices/tap/tap.h>
#define foreach_tapv2_api_msg \
_(TAP_CREATE_V2, tap_create_v2) \
diff --git a/src/vnet/vnet_all_api_h.h b/src/vnet/vnet_all_api_h.h
index 2e7419b..ccd464f 100644
--- a/src/vnet/vnet_all_api_h.h
+++ b/src/vnet/vnet_all_api_h.h
@@ -32,7 +32,7 @@
#include <vnet/devices/af_packet/af_packet.api.h>
#include <vnet/devices/netmap/netmap.api.h>
#include <vnet/devices/virtio/vhost_user.api.h>
-#include <vnet/devices/virtio/tapv2.api.h>
+#include <vnet/devices/tap/tapv2.api.h>
#include <vnet/gre/gre.api.h>
#include <vnet/interface.api.h>
#include <vnet/map/map.api.h>