From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 22B4B1B35D; Sun, 11 Feb 2018 05:09:48 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2018 20:09:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,493,1511856000"; d="scan'208";a="30491018" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 10 Feb 2018 20:09:46 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 10 Feb 2018 20:09:46 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 10 Feb 2018 20:09:46 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.125]) with mapi id 14.03.0319.002; Sun, 11 Feb 2018 12:09:44 +0800 From: "Tan, Jianfeng" To: "Kulasek, TomaszX" , "yliu@fridaylinux.org" CC: "dev@dpdk.org" , "Xie, Huawei" , "stable@dpdk.org" , "Wodkowski, PawelX" Thread-Topic: [dpdk-dev] [PATCH] vhost: fix return avail ring position in get vring base Thread-Index: AQHTocvHe4ZQX0sGMEWHEZA9TEHNtKOemHGg Date: Sun, 11 Feb 2018 04:09:44 +0000 Message-ID: References: <20180209172821.9240-1-tomaszx.kulasek@intel.com> In-Reply-To: <20180209172821.9240-1-tomaszx.kulasek@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] vhost: fix return avail ring position in get vring base 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: , X-List-Received-Date: Sun, 11 Feb 2018 04:09:49 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tomasz Kulasek > Sent: Saturday, February 10, 2018 1:28 AM > To: yliu@fridaylinux.org > Cc: dev@dpdk.org; Xie, Huawei; stable@dpdk.org; Wodkowski, PawelX > Subject: [dpdk-dev] [PATCH] vhost: fix return avail ring position in get = vring > base >=20 > According to the "Vhost-user Protocol" document, > VHOST_USER_GET_VRING_BASE should get the available vring base offset. >=20 > Fixes: 8f972312b8f4 ("vhost: support vhost-user") > Cc: huawei.xie@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Pawel Wodkowski > Signed-off-by: Tomasz Kulasek Reviewed-by: Jianfeng Tan Nice catch! > --- > lib/librte_vhost/vhost_user.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.= c > index 65ee33919..04eee3a3a 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -881,8 +881,8 @@ vhost_user_get_vring_base(struct virtio_net *dev, >=20 > dev->flags &=3D ~VIRTIO_DEV_READY; >=20 > - /* Here we are safe to get the last used index */ > - msg->payload.state.num =3D vq->last_used_idx; > + /* Here we are safe to get the last avail index */ > + msg->payload.state.num =3D vq->last_avail_idx; >=20 > RTE_LOG(INFO, VHOST_CONFIG, > "vring base idx:%d file:%d\n", msg->payload.state.index, > -- > 2.14.1