aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-12-04 15:25:58 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-12-04 17:08:28 +0000
commitc99b4cd1c3aae9ca3bda0595a5cce4ea5e6ba84f (patch)
tree7364a65a5790a43a63f2fe3f231fd0094a962e11
parentffffb15fb5d6dcd5f0afd69652aa33a4e9894152 (diff)
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>
-rw-r--r--src/vnet.am36
-rw-r--r--src/vnet/devices/tap/cli.c (renamed from src/vnet/devices/virtio/cli.c)2
-rw-r--r--src/vnet/devices/tap/tap.c (renamed from src/vnet/devices/virtio/tap.c)2
-rw-r--r--src/vnet/devices/tap/tap.h (renamed from src/vnet/devices/virtio/tap.h)0
-rw-r--r--src/vnet/devices/tap/tapv2.api (renamed from src/vnet/devices/virtio/tapv2.api)0
-rw-r--r--src/vnet/devices/tap/tapv2_api.c (renamed from src/vnet/devices/virtio/tapv2_api.c)2
-rw-r--r--src/vnet/vnet_all_api_h.h2
7 files changed, 27 insertions, 17 deletions
diff --git a/src/vnet.am b/src/vnet.am
index 5d9fa8885c1..a4817f2fc11 100644
--- a/src/vnet.am
+++ b/src/vnet.am
@@ -869,27 +869,37 @@ API_FILES += vnet/pg/pg.api
# 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
index efd14355627..f7fc1e63be7 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
index 0eaaf2771cc..b4004f70189 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
index 0e0f8cb4056..0e0f8cb4056 100644
--- a/src/vnet/devices/virtio/tap.h
+++ b/src/vnet/devices/tap/tap.h
diff --git a/src/vnet/devices/virtio/tapv2.api b/src/vnet/devices/tap/tapv2.api
index 03788607fe5..03788607fe5 100644
--- a/src/vnet/devices/virtio/tapv2.api
+++ b/src/vnet/devices/tap/tapv2.api
diff --git a/src/vnet/devices/virtio/tapv2_api.c b/src/vnet/devices/tap/tapv2_api.c
index 7a6adca083f..2d4d241a3dc 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 2e7419b77ce..ccd464f6db1 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>