[dpdk-dev,01/21] Revert "vhost: workaround MQ fails to startup"

Message ID 20170831095023.21037-2-maxime.coquelin@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Yuanhan Liu
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

Maxime Coquelin Aug. 31, 2017, 9:50 a.m. UTC
  This reverts commit 04d81227960b5c1cf2f11f492100979ead20c526.

As agreed when this workaround was introduced, it can be reverted
as Qemu v2.10 that fixes the issue is now out.

The reply-ack feature is required for vhost-user IOMMU support.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
  

Comments

Yuanhan Liu Sept. 7, 2017, 11:54 a.m. UTC | #1
On Thu, Aug 31, 2017 at 11:50:03AM +0200, Maxime Coquelin wrote:
> This reverts commit 04d81227960b5c1cf2f11f492100979ead20c526.
> 
> As agreed when this workaround was introduced, it can be reverted
> as Qemu v2.10 that fixes the issue is now out.

First of all, I'm very sorry for being so late on review!

I didn't quite remember we have come an agreement on that. I think my
old concern still counts: how do you handle the combo like DPDK v17.11
and QEMU v2.7-2.9 (assume we take this patch in DPDK v17.11) ?

Note that it's not a trivial bug, it's a fatal bug that freezes QEMU,
IIRC.

	--yliu

> The reply-ack feature is required for vhost-user IOMMU support.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
  
Maxime Coquelin Sept. 7, 2017, 12:59 p.m. UTC | #2
Hi Yuanhan,

On 09/07/2017 01:54 PM, Yuanhan Liu wrote:
> On Thu, Aug 31, 2017 at 11:50:03AM +0200, Maxime Coquelin wrote:
>> This reverts commit 04d81227960b5c1cf2f11f492100979ead20c526.
>>
>> As agreed when this workaround was introduced, it can be reverted
>> as Qemu v2.10 that fixes the issue is now out.
> 
> First of all, I'm very sorry for being so late on review!
> 
> I didn't quite remember we have come an agreement on that. 


> I think my
> old concern still counts: how do you handle the combo like DPDK v17.11
> and QEMU v2.7-2.9 (assume we take this patch in DPDK v17.11) ?
> 
> Note that it's not a trivial bug, it's a fatal bug that freezes QEMU,
> IIRC
IIRC, I also raised the concern initially but after having listed the
possible solutions, I thought we agreed there were no trivial way to
detect the bug in Qemu and so we would re-enable it once upstream Qemu
got fixed.

Note that we're talking about upstream here, which should not be used in
production. Distro's Qemu v2.7/v2.9 should be fixed, as RHEL-7.4 has been.

Any thougths?

Maxime

> 	--yliu
> 
>> The reply-ack feature is required for vhost-user IOMMU support.
>>
>> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
  
Maxime Coquelin Sept. 24, 2017, 10:41 a.m. UTC | #3
On 09/07/2017 02:59 PM, Maxime Coquelin wrote:
> Hi Yuanhan,
> 
> On 09/07/2017 01:54 PM, Yuanhan Liu wrote:
>> On Thu, Aug 31, 2017 at 11:50:03AM +0200, Maxime Coquelin wrote:
>>> This reverts commit 04d81227960b5c1cf2f11f492100979ead20c526.
>>>
>>> As agreed when this workaround was introduced, it can be reverted
>>> as Qemu v2.10 that fixes the issue is now out.
>>
>> First of all, I'm very sorry for being so late on review!
>>
>> I didn't quite remember we have come an agreement on that. 
> 
> 
>> I think my
>> old concern still counts: how do you handle the combo like DPDK v17.11
>> and QEMU v2.7-2.9 (assume we take this patch in DPDK v17.11) ?
>>
>> Note that it's not a trivial bug, it's a fatal bug that freezes QEMU,
>> IIRC
> IIRC, I also raised the concern initially but after having listed the
> possible solutions, I thought we agreed there were no trivial way to
> detect the bug in Qemu and so we would re-enable it once upstream Qemu
> got fixed.
> 
> Note that we're talking about upstream here, which should not be used in
> production. Distro's Qemu v2.7/v2.9 should be fixed, as RHEL-7.4 has been.
> 
> Any thougths?

Actually, stable v2.9.1 contains the fix, so only v2.7 and v2.8 are
impacted.

This is a good news, however it prevents to detect vulnerable Qemu
versions based on new features bit introduced in v2.10.

Maxime
> Maxime
> 
>>     --yliu
>>
>>> The reply-ack feature is required for vhost-user IOMMU support.
>>>
>>> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
  

Patch

diff --git a/lib/librte_vhost/vhost_user.h b/lib/librte_vhost/vhost_user.h
index 35ebd7190..2ba22dbb0 100644
--- a/lib/librte_vhost/vhost_user.h
+++ b/lib/librte_vhost/vhost_user.h
@@ -49,14 +49,10 @@ 
 #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) | \
-					 (0ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK) | \
+					 (1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK) | \
 					 (1ULL << VHOST_USER_PROTOCOL_F_NET_MTU))
 
 typedef enum VhostUserRequest {