aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost_user.h
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2020-11-17 13:30:44 -0800
committerBeno�t Ganne <bganne@cisco.com>2021-01-08 13:10:58 +0000
commit27ba5008a16eddccc0b285272de7f89fd0aa3a24 (patch)
tree3065040b62ee15ac45b1c1d77dd7421dcb558a5d /src/vnet/devices/virtio/vhost_user.h
parented4b38e868c7cabb8e88cc0f1254c95a8f1c5939 (diff)
vhost: Add event index for interrupt notification to driver
VPP only supports a poor man's approach for interrupt notification to the driver. It uses a simple binary flag for "interrupt needed" or "interrupt not needed". Most drivers support more sophisticated event index already. This feature is to add the long due missing feature and make it configurable, off by default. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I68dab7dd07045cafb49af97b7f70db9b8131ae03
Diffstat (limited to 'src/vnet/devices/virtio/vhost_user.h')
-rw-r--r--src/vnet/devices/virtio/vhost_user.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/vnet/devices/virtio/vhost_user.h b/src/vnet/devices/virtio/vhost_user.h
index eecfd2d60e5..604e5571141 100644
--- a/src/vnet/devices/virtio/vhost_user.h
+++ b/src/vnet/devices/virtio/vhost_user.h
@@ -97,16 +97,27 @@ typedef enum
(FEATURE_VIRTIO_NET_F_HOST_TSO_FEATURE_BITS | \
FEATURE_VIRTIO_NET_F_GUEST_TSO_FEATURE_BITS)
+
+typedef struct
+{
+ char *sock_filename;
+ u64 feature_mask;
+ u32 custom_dev_instance;
+ u8 hwaddr[6];
+ u8 renumber;
+ u8 is_server;
+ u8 enable_gso;
+ u8 enable_packed;
+ u8 enable_event_idx;
+
+ /* return */
+ u32 sw_if_index;
+} vhost_user_create_if_args_t;
+
int vhost_user_create_if (vnet_main_t * vnm, vlib_main_t * vm,
- const char *sock_filename, u8 is_server,
- u32 * sw_if_index, u64 feature_mask,
- u8 renumber, u32 custom_dev_instance, u8 * hwaddr,
- u8 enable_gso, u8 enable_packed);
+ vhost_user_create_if_args_t * args);
int vhost_user_modify_if (vnet_main_t * vnm, vlib_main_t * vm,
- const char *sock_filename, u8 is_server,
- u32 sw_if_index, u64 feature_mask,
- u8 renumber, u32 custom_dev_instance,
- u8 enable_gso, u8 enable_packed);
+ vhost_user_create_if_args_t * args);
int vhost_user_delete_if (vnet_main_t * vnm, vlib_main_t * vm,
u32 sw_if_index);
@@ -216,6 +227,9 @@ typedef struct
u16 used_wrap_counter;
u16 avail_wrap_counter;
+
+ u16 last_kick;
+ u8 first_kick;
} vhost_user_vring_t;
#define VHOST_USER_EVENT_START_TIMER 1
@@ -272,6 +286,7 @@ typedef struct
/* Packed ring configured */
u8 enable_packed;
+ u8 enable_event_idx;
} vhost_user_intf_t;
typedef struct