aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost_user.h
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2021-04-21 09:54:34 -0700
committerBeno�t Ganne <bganne@cisco.com>2021-08-18 12:25:34 +0000
commit38071b1331b44746679997f6e66081c4936d087c (patch)
tree2c25d05051510603a21528a7d7fcd15754a0ae09 /src/vnet/devices/virtio/vhost_user.h
parent91144fbf54764feb005a33419d0129febd2365d4 (diff)
vhost: interrupt mode support with mq
vhost interrupt mode support with mq does not work when coalesce frame is not configured to 0. When packed-ring is configured, we were also setting the wrong flag for want-interrupt. No need to trigger an interrupt to RX infra if there is at least one queue in the same thread that is doing polling. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I8e64250f2aa6bf611a777a53e4d2c1076d83305f
Diffstat (limited to 'src/vnet/devices/virtio/vhost_user.h')
-rw-r--r--src/vnet/devices/virtio/vhost_user.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/vhost_user.h b/src/vnet/devices/virtio/vhost_user.h
index 63a0bc0da48..8ecf4a3aca7 100644
--- a/src/vnet/devices/virtio/vhost_user.h
+++ b/src/vnet/devices/virtio/vhost_user.h
@@ -231,6 +231,7 @@ typedef struct
u16 last_kick;
u8 first_kick;
u32 queue_index;
+ u32 thread_index;
} vhost_user_vring_t;
#define VHOST_USER_EVENT_START_TIMER 1
@@ -290,6 +291,12 @@ typedef struct
u8 enable_event_idx;
} vhost_user_intf_t;
+#define FOR_ALL_VHOST_TXQ(qid, vui) for (qid = 1; qid < vui->num_qid; qid += 2)
+
+#define FOR_ALL_VHOST_RXQ(qid, vui) for (qid = 0; qid < vui->num_qid; qid += 2)
+
+#define FOR_ALL_VHOST_RX_TXQ(qid, vui) for (qid = 0; qid < vui->num_qid; qid++)
+
typedef struct
{
uword dst;
@@ -323,6 +330,7 @@ typedef struct
u32 *to_next_list;
vlib_buffer_t **rx_buffers_pdesc;
+ u32 polling_q_count;
} vhost_cpu_t;
typedef struct
@@ -365,6 +373,8 @@ typedef struct
int vhost_user_dump_ifs (vnet_main_t * vnm, vlib_main_t * vm,
vhost_user_intf_details_t ** out_vuids);
+void vhost_user_set_operation_mode (vhost_user_intf_t *vui,
+ vhost_user_vring_t *txvq);
extern vlib_node_registration_t vhost_user_send_interrupt_node;
extern vnet_device_class_t vhost_user_device_class;