vhost: Disallow duplicate path name for vhost interface
[vpp.git] / src / vnet / devices / virtio / vhost-user.h
index 6b928f0..56b6547 100644 (file)
@@ -210,12 +210,15 @@ typedef struct
   u32 callfd_idx;
   u32 kickfd_idx;
   u64 log_guest_addr;
+  u32 interrupt_thread_index;
 } vhost_user_vring_t;
 
 #define VHOST_USER_POLLING_MODE   0
 #define VHOST_USER_INTERRUPT_MODE 1
 #define VHOST_USER_ADAPTIVE_MODE  2
 
+#define VHOST_USER_EVENT_START_TIMER 1
+
 typedef struct
 {
   CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
@@ -225,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
@@ -298,10 +302,17 @@ typedef struct
   /* This is here so it doesn't end-up
    * using stack or registers. */
   vhost_trace_t *current_trace;
+
+  /* bitmap of pending rx interfaces */
+  uword *pending_input_bitmap;
+
+  /* The operation mode computed per cpu based on interface setting */
+  u8 operation_mode;
 } vhost_cpu_t;
 
 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;
@@ -320,6 +331,9 @@ typedef struct
 
   /** Pseudo random iterator */
   u32 random;
+
+  /* Node is in interrupt mode */
+  u8 interrupt_mode;
 } vhost_user_main_t;
 
 typedef struct