vhost: enable reply-ack systematically
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 28 May 2020 09:03:47 +0000 (11:03 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 30 Jun 2020 12:52:29 +0000 (14:52 +0200)
As announced during v20.05 release cycle, this
patch makes reply-ack protocol feature to be enabled
unconditionally.

This protocol feature makes the communication between the
master and the slave more robust, avoiding for example
possible undefined behaviour with VHOST_USER_SET_MEM_TABLE.

Also, reply-ack support will be required for upcoming
VHOST_USER_SET_STATUS request.

Note that this protocol feature was disabled by default
because Qemu version 2.7.0 to 2.9.0 had a bug causing a
deadlock when reply-ack was negotiated and multiqueue
enabled. These Qemu version are now very old and no more
maintained, so we can reasonably consider we no more
support them.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
doc/guides/prog_guide/vhost_lib.rst
lib/librte_vhost/vhost_user.c

index 07e40e3..db921f9 100644 (file)
@@ -104,11 +104,6 @@ The following is an overview of some key Vhost API functions:
     from accessing memory the virtio device isn't allowed to, when the feature
     is negotiated and an IOMMU device is declared.
 
-    However, this feature enables vhost-user's reply-ack protocol feature,
-    which implementation is buggy in Qemu v2.7.0-v2.9.0 when doing multiqueue.
-    Enabling this flag with these Qemu version results in Qemu being blocked
-    when multiple queue pairs are declared.
-
   - ``RTE_VHOST_USER_POSTCOPY_SUPPORT``
 
     Postcopy live-migration support will be enabled when this flag is set.
index 84bebad..ea9cd10 100644 (file)
@@ -2012,15 +2012,6 @@ vhost_user_get_protocol_features(struct virtio_net **pdev,
        rte_vhost_driver_get_features(dev->ifname, &features);
        rte_vhost_driver_get_protocol_features(dev->ifname, &protocol_features);
 
-       /*
-        * REPLY_ACK protocol feature is only mandatory for now
-        * for IOMMU feature. If IOMMU is explicitly disabled by the
-        * application, disable also REPLY_ACK feature for older buggy
-        * Qemu versions (from v2.7.0 to v2.9.0).
-        */
-       if (!(features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)))
-               protocol_features &= ~(1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK);
-
        msg->payload.u64 = protocol_features;
        msg->size = sizeof(msg->payload.u64);
        msg->fd_num = 0;