aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost-user.h
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2017-04-25 16:16:00 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-04-28 07:59:19 +0000
commit5445f5fd9b9d020b285d48e571c86528932ac071 (patch)
treecaf9dc716ad1b6456d53d13f8a55eba773a89c52 /src/vnet/devices/virtio/vhost-user.h
parentc903793662e16309a67161a58500f6a1a15d37f6 (diff)
vhost: Disallow duplicate path name for vhost interface
When creating or modifying a vhost interface, verify if the path name already existed and reject the command. Change-Id: I8b2d33b77c847f774492874f7d194fa72c488479 Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/vhost-user.h')
-rw-r--r--src/vnet/devices/virtio/vhost-user.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/vhost-user.h b/src/vnet/devices/virtio/vhost-user.h
index 80f58a20018..56b65477b19 100644
--- a/src/vnet/devices/virtio/vhost-user.h
+++ b/src/vnet/devices/virtio/vhost-user.h
@@ -228,6 +228,7 @@ typedef struct
u32 unix_file_index;
char sock_filename[256];
int sock_errno;
+ uword if_index;
u32 hw_if_index, sw_if_index;
//Feature negotiation
@@ -311,6 +312,7 @@ typedef struct
typedef struct
{
+ mhash_t if_index_by_sock_name;
u32 mtu_bytes;
vhost_user_intf_t *vhost_user_interfaces;
u32 *show_dev_instance_by_real_dev_instance;