summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhiyong Yang <zhiyong.yang@intel.com>2017-04-27 17:41:23 +0800
committerYuanhan Liu <yuanhan.liu@linux.intel.com>2017-04-28 06:28:37 +0200
commit04d81227960b5c1cf2f11f492100979ead20c526 (patch)
tree83b51100e00b9684ea1b50c1c41f45c518e1b151
parentf353fbc5961e77858795ba7daeaa3fefb7aedbe6 (diff)
downloaddpdk-stable-04d81227960b5c1cf2f11f492100979ead20c526.zip
dpdk-stable-04d81227960b5c1cf2f11f492100979ead20c526.tar.gz
dpdk-stable-04d81227960b5c1cf2f11f492100979ead20c526.tar.xz
vhost: workaround MQ fails to startup
vhost since dpdk17.02 + qemu2.7 and above will cause failures of new connection when negotiating to set MQ. (one queue pair works well). Because there exist some bugs in qemu code when introducing VHOST_USER_PROTOCOL_F_REPLY_ACK to qemu. when dealing with the vhost message VHOST_USER_SET_MEM_TABLE for the second time, qemu indeed doesn't send the messge (The message needs to be sent only once)but still will be waiting for dpdk's reply ack, then, qemu is always freezing. DPDK code indeed works in the right way. The feature VHOST_USER_PROTOCOL_F_REPLY_ACK has to be disabled by default at the dpdk side in order to avoid the feature support of DPDK + qemu at the same time. if doing like that, MQ can works well. Cc: stable@dpdk.org Reported-by: Ciara Loftus <ciara.loftus@intel.com> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Tested-by: Ciara Loftus <ciara.loftus@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
-rw-r--r--lib/librte_vhost/vhost_user.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/librte_vhost/vhost_user.h b/lib/librte_vhost/vhost_user.h
index 2ba22db..35ebd71 100644
--- a/lib/librte_vhost/vhost_user.h
+++ b/lib/librte_vhost/vhost_user.h
@@ -49,10 +49,14 @@
#define VHOST_USER_PROTOCOL_F_REPLY_ACK 3
#define VHOST_USER_PROTOCOL_F_NET_MTU 4
+/*
+ * disable REPLY_ACK feature to workaround the buggy QEMU implementation.
+ * Proved buggy QEMU includes v2.7 - v2.9.
+ */
#define VHOST_USER_PROTOCOL_FEATURES ((1ULL << VHOST_USER_PROTOCOL_F_MQ) | \
(1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD) |\
(1ULL << VHOST_USER_PROTOCOL_F_RARP) | \
- (1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK) | \
+ (0ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK) | \
(1ULL << VHOST_USER_PROTOCOL_F_NET_MTU))
typedef enum VhostUserRequest {