From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 4C622A0093;
	Tue, 19 May 2020 09:21:42 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 654901D5A9;
	Tue, 19 May 2020 09:21:41 +0200 (CEST)
Received: from mga17.intel.com (mga17.intel.com [192.55.52.151])
 by dpdk.org (Postfix) with ESMTP id C796E1D177;
 Tue, 19 May 2020 09:21:38 +0200 (CEST)
IronPort-SDR: u/mN2mZT7LbzQVaMVd6m/5/QlOMCznpH3kEUGmiDgA81sfcZYMWUfgd/m9LML8qmav1ShncE7Z
 XPeQAnjtuwwg==
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga003.jf.intel.com ([10.7.209.27])
 by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 19 May 2020 00:21:37 -0700
IronPort-SDR: BK3T96WkEIWti/iQIVao07DwkX6kCs7bdI3RFswRuozW9KXwgzYTz3JCllIyaKDfkY2demVBh2
 Pk2gOm9Qk65g==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.73,409,1583222400"; d="scan'208";a="264216715"
Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.116.183])
 by orsmga003.jf.intel.com with ESMTP; 19 May 2020 00:21:35 -0700
Date: Tue, 19 May 2020 15:13:04 +0800
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Xuan Ding <xuan.ding@intel.com>, Ferruh Yigit <ferruh.yigit@intel.com>
Cc: maxime.coquelin@redhat.com, zhihong.wang@intel.com, dev@dpdk.org,
 stable@dpdk.org
Message-ID: <20200519071304.GE38911@intel.com>
References: <20200512095155.98708-1-xuan.ding@intel.com>
 <20200513021410.98031-1-xuan.ding@intel.com>
 <20200519062825.GD38911@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20200519062825.GD38911@intel.com>
User-Agent: Mutt/1.9.4 (2018-02-28)
Subject: Re: [dpdk-dev] [PATCH v2] vhost: fix zero-copy cannot be enabled
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Hi, Maxime & Ferruh

This patch is used to fix the regression caused by commit 
715070ea10e6 ("vhost: prevent zero-copy with incompatible client mode") which
was introduced in RC2, I think we should get it in this release.

Thanks,
Xiaolong

On 05/19, Ye Xiaolong wrote:
>On 05/13, Xuan Ding wrote:
>>This patch fixes the situation where vhost-user cannot start as server with
>>dequeue_zero_copy enabled.
>>
>>Using flag instead of vsocket->is_server to determine whether vhost-user is
>>in client mode. Because vsocket->is_server is not ready at this time.
>>
>>Cc: stable@dpdk.org
>
>Fixes: 715070ea10e6 ("vhost: prevent zero-copy with incompatible client mode")
>
>And no need to cc stable since above commit is introduced in this release.
>
>>
>>Signed-off-by: Xuan Ding <xuan.ding@intel.com>
>>---
>>
>>v2:
>>* Added the description of problem solved in commit log.
>>---
>> lib/librte_vhost/socket.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
>>index bb8d0d780..0a66ef976 100644
>>--- a/lib/librte_vhost/socket.c
>>+++ b/lib/librte_vhost/socket.c
>>@@ -926,7 +926,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
>> 			ret = -1;
>> 			goto out_mutex;
>> 		}
>>-		if (!vsocket->is_server) {
>>+		if ((flags & RTE_VHOST_USER_CLIENT) != 0) {
>> 			VHOST_LOG_CONFIG(ERR,
>> 			"error: zero copy is incompatible with vhost client mode\n");
>> 			ret = -1;
>>-- 
>>2.17.1
>>
>
>Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>