From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 765D9A00BE; Wed, 29 Apr 2020 10:33:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C87771D975; Wed, 29 Apr 2020 10:33:35 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 8A7651D96F for ; Wed, 29 Apr 2020 10:33:33 +0200 (CEST) IronPort-SDR: vmdlGVDLvXLRVNvqP/AOQEpfdUSZVN+IfygmESXCyU13lwHXmRQwRsL8in4VcbIVk7MAL797Ba Gi25+ejUxSWg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 01:33:32 -0700 IronPort-SDR: UQH2VhAhyyoRxmZB+TxDg8+taHnhHbmyp2jnyFGLnGQAVGR3jxKD64qIf/E4BS+uPgSaKLInhP YZ50lXxsu+Dg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,330,1583222400"; d="scan'208";a="261366490" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 29 Apr 2020 01:33:32 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Apr 2020 01:33:32 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 29 Apr 2020 16:33:29 +0800 Received: from shsmsx603.ccr.corp.intel.com ([10.109.6.143]) by SHSMSX603.ccr.corp.intel.com ([10.109.6.143]) with mapi id 15.01.1713.004; Wed, 29 Apr 2020 16:33:29 +0800 From: "Wang, Yinan" To: "Ding, Xuan" , "maxime.coquelin@redhat.com" , "Wang, Zhihong" , "Ye, Xiaolong" CC: "dev@dpdk.org" , "Ding, Xuan" Thread-Topic: [dpdk-dev] [PATCH] vhost: zero_copy incompatible with client mode Thread-Index: AQHWHdLezmLTl2HaaEmqVwY3OIcz/aiPxgig Date: Wed, 29 Apr 2020 08:33:29 +0000 Message-ID: References: <20200429025946.48096-1-xuan.ding@intel.com> In-Reply-To: <20200429025946.48096-1-xuan.ding@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] vhost: zero_copy incompatible with client mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Tested-by: Yinan Wang > -----Original Message----- > From: dev On Behalf Of Xuan Ding > Sent: 2020=1B$BG/=1B(B4=1B$B7n=1B(B29=1B$BF|=1B(B 11:00 > To: maxime.coquelin@redhat.com; Wang, Zhihong ; > Ye, Xiaolong > Cc: dev@dpdk.org; Ding, Xuan > Subject: [dpdk-dev] [PATCH] vhost: zero_copy incompatible with client mod= e >=20 > In server mode, virtio-user inits under the assumption that vhost-user su= pports a > list of features. However, this could be problematic when in_order featur= e is > negotiated but not supported by vhost-user when enables dequeue_zero_copy > later. >=20 > Add handling when vhost-user enables dequeue_zero_copy as client. >=20 > Signed-off-by: Xuan Ding > --- > lib/librte_vhost/socket.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index > 7c8012179..bb8d0d780 100644 > --- a/lib/librte_vhost/socket.c > +++ b/lib/librte_vhost/socket.c > @@ -926,6 +926,12 @@ rte_vhost_driver_register(const char *path, uint64_t > flags) > ret =3D -1; > goto out_mutex; > } > + if (!vsocket->is_server) { > + VHOST_LOG_CONFIG(ERR, > + "error: zero copy is incompatible with vhost client > mode\n"); > + ret =3D -1; > + goto out_mutex; > + } > vsocket->supported_features &=3D ~(1ULL << > VIRTIO_F_IN_ORDER); > vsocket->features &=3D ~(1ULL << VIRTIO_F_IN_ORDER); >=20 > -- > 2.17.1