diff options
author | Damjan Marion <damarion@cisco.com> | 2017-12-04 20:03:37 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-12-08 19:33:49 +0000 |
commit | 2df39094d20ae60d2e04316f4ec058f81778cf64 (patch) | |
tree | 94db0b2286ac490bf412e6de117faa7e0eda2d00 /src/vnet/devices/virtio | |
parent | 20ec7165007bd38359ea516fe5389e9e828a9d62 (diff) |
tapv2: multiple improvements
- change interface naming scheme
- rework netlink code
- add option to set link address, namespace
Change-Id: Icf667babb3077a07617b0b87c45c957e345cb4d1
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio')
-rw-r--r-- | src/vnet/devices/virtio/device.c | 2 | ||||
-rw-r--r-- | src/vnet/devices/virtio/virtio.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/devices/virtio/device.c b/src/vnet/devices/virtio/device.c index 275a3c74990..d4ef6d836c5 100644 --- a/src/vnet/devices/virtio/device.c +++ b/src/vnet/devices/virtio/device.c @@ -55,7 +55,7 @@ format_virtio_device_name (u8 * s, va_list * args) if (vif->type == VIRTIO_IF_TYPE_TAP) { - s = format (s, "tap-%s", vif->name); + s = format (s, "tap%u", vif->id); } else s = format (s, "virtio%lu", vif->dev_instance); diff --git a/src/vnet/devices/virtio/virtio.h b/src/vnet/devices/virtio/virtio.h index 7dcd90ac353..cb97df87121 100644 --- a/src/vnet/devices/virtio/virtio.h +++ b/src/vnet/devices/virtio/virtio.h @@ -91,6 +91,7 @@ typedef struct typedef struct { u32 flags; + u32 id; u32 dev_instance; u32 hw_if_index; u32 sw_if_index; @@ -102,7 +103,7 @@ typedef struct u64 features, remote_features; virtio_if_type_t type; - u8 *name; + u8 *host_if_name; u8 *net_ns; int ifindex; } virtio_if_t; |