From 19d4d7ef2a216b5418d8edb5b004d1a58bba3cc1 Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Thu, 22 Oct 2015 20:35:55 +0800 Subject: [PATCH] vhost-user: enable multiple queue By setting VHOST_USER_PROTOCOL_F_MQ protocol feature bit, and VIRTIO_NET_F_MQ feature bit. Signed-off-by: Yuanhan Liu Acked-by: Flavio Leitner Acked-by: Huawei Xie --- doc/guides/rel_notes/release_2_2.rst | 2 ++ lib/librte_vhost/vhost_user/virtio-net-user.h | 4 +++- lib/librte_vhost/virtio-net.c | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index ab1c25f1f0..de6916e794 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -9,6 +9,8 @@ New Features * Added support for Jumbo Frames. * Optimize forwarding performance for Chelsio T5 40GbE cards. +* **Added vhost-user multiple queue support.** + Resolved Issues --------------- diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.h b/lib/librte_vhost/vhost_user/virtio-net-user.h index d46057e03b..b82108dc52 100644 --- a/lib/librte_vhost/vhost_user/virtio-net-user.h +++ b/lib/librte_vhost/vhost_user/virtio-net-user.h @@ -37,7 +37,9 @@ #include "vhost-net.h" #include "vhost-net-user.h" -#define VHOST_USER_PROTOCOL_FEATURES 0ULL +#define VHOST_USER_PROTOCOL_F_MQ 0 + +#define VHOST_USER_PROTOCOL_FEATURES (1ULL << VHOST_USER_PROTOCOL_F_MQ) int user_set_mem_table(struct vhost_device_ctx, struct VhostUserMsg *); diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 48629d0449..97213c5415 100644 --- a/lib/librte_vhost/virtio-net.c +++ b/lib/librte_vhost/virtio-net.c @@ -74,6 +74,7 @@ static struct virtio_net_config_ll *ll_root; #define VHOST_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \ (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ (1ULL << VIRTIO_NET_F_CTRL_RX) | \ + (1ULL << VIRTIO_NET_F_MQ) | \ (1ULL << VHOST_F_LOG_ALL) | \ (1ULL << VHOST_USER_F_PROTOCOL_FEATURES)) static uint64_t VHOST_FEATURES = VHOST_SUPPORTED_FEATURES; -- 2.20.1