DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] vhost: enable reply-ack systematically
@ 2020-05-28  9:03 Maxime Coquelin
  2020-06-17  7:33 ` Xia, Chenbo
  2020-06-18 16:29 ` Maxime Coquelin
  0 siblings, 2 replies; 3+ messages in thread
From: Maxime Coquelin @ 2020-05-28  9:03 UTC (permalink / raw)
  To: dev, xiaolong.ye, amorenoz, david.marchand, thomas; +Cc: Maxime Coquelin

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 resonnably consider we no more
support them.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---

v2:
 - Fix commit message
 - Remove mention to the workaround in the doc

 doc/guides/prog_guide/vhost_lib.rst | 5 -----
 lib/librte_vhost/vhost_user.c       | 9 ---------
 2 files changed, 14 deletions(-)

diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
index 07e40e3c5e..db921f922b 100644
--- a/doc/guides/prog_guide/vhost_lib.rst
+++ b/doc/guides/prog_guide/vhost_lib.rst
@@ -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.
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 84bebad792..ea9cd107b9 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -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;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH v2] vhost: enable reply-ack systematically
  2020-05-28  9:03 [dpdk-dev] [PATCH v2] vhost: enable reply-ack systematically Maxime Coquelin
@ 2020-06-17  7:33 ` Xia, Chenbo
  2020-06-18 16:29 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Xia, Chenbo @ 2020-06-17  7:33 UTC (permalink / raw)
  To: Maxime Coquelin, dev, Ye, Xiaolong, amorenoz, david.marchand, thomas


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Maxime Coquelin
> Sent: Thursday, May 28, 2020 5:04 PM
> To: dev@dpdk.org; Ye, Xiaolong <xiaolong.ye@intel.com>;
> amorenoz@redhat.com; david.marchand@redhat.com; thomas@monjalon.net
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Subject: [dpdk-dev] [PATCH v2] vhost: enable reply-ack systematically
> 
> 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 resonnably consider we no more support them.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
> 
> v2:
>  - Fix commit message
>  - Remove mention to the workaround in the doc
> 
>  doc/guides/prog_guide/vhost_lib.rst | 5 -----
>  lib/librte_vhost/vhost_user.c       | 9 ---------
>  2 files changed, 14 deletions(-)
> 
> diff --git a/doc/guides/prog_guide/vhost_lib.rst
> b/doc/guides/prog_guide/vhost_lib.rst
> index 07e40e3c5e..db921f922b 100644
> --- a/doc/guides/prog_guide/vhost_lib.rst
> +++ b/doc/guides/prog_guide/vhost_lib.rst
> @@ -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.
> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index
> 84bebad792..ea9cd107b9 100644
> --- a/lib/librte_vhost/vhost_user.c
> +++ b/lib/librte_vhost/vhost_user.c
> @@ -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;
> --
> 2.26.2

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH v2] vhost: enable reply-ack systematically
  2020-05-28  9:03 [dpdk-dev] [PATCH v2] vhost: enable reply-ack systematically Maxime Coquelin
  2020-06-17  7:33 ` Xia, Chenbo
@ 2020-06-18 16:29 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2020-06-18 16:29 UTC (permalink / raw)
  To: dev, xiaolong.ye, amorenoz, david.marchand, thomas



On 5/28/20 11:03 AM, Maxime Coquelin wrote:
> 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 resonnably consider we no more
> support them.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---

Applied to dpdk-next-virtio/master

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-18 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28  9:03 [dpdk-dev] [PATCH v2] vhost: enable reply-ack systematically Maxime Coquelin
2020-06-17  7:33 ` Xia, Chenbo
2020-06-18 16:29 ` Maxime Coquelin

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git