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 28006A0613 for ; Thu, 26 Sep 2019 16:43:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 89AEF1BE8F; Thu, 26 Sep 2019 16:43:24 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 70CC21BE84 for ; Thu, 26 Sep 2019 16:43:19 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2019 07:43:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,552,1559545200"; d="scan'208";a="190024186" Received: from dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.73]) by fmsmga007.fm.intel.com with ESMTP; 26 Sep 2019 07:43:16 -0700 Date: Thu, 26 Sep 2019 22:40:29 +0800 From: Tiwei Bie To: "Yu, Jin" Cc: "dev@dpdk.org" , "Liu, Changpeng" , "maxime.coquelin@redhat.com" , "Wang, Zhihong" Message-ID: <20190926144029.GA23868@___> References: <20190917145234.16951> <20190920120102.29828-1-jin.yu@intel.com> <20190920120102.29828-11-jin.yu@intel.com> <20190925144538.GA25789@___> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v7 10/10] vhost: add vhost-user-blk example which support inflight 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" On Thu, Sep 26, 2019 at 10:29:19PM +0800, Yu, Jin wrote: > > -----Original Message----- > > From: Bie, Tiwei > > Sent: Wednesday, September 25, 2019 10:46 PM > > To: Yu, Jin > > Cc: dev@dpdk.org; Liu, Changpeng ; > > maxime.coquelin@redhat.com; Wang, Zhihong > > Subject: Re: [PATCH v7 10/10] vhost: add vhost-user-blk example which support > > inflight > > > > On Fri, Sep 20, 2019 at 08:01:02PM +0800, Jin Yu wrote: > > > A vhost-user-blk example that support inflight feature. It uses the > > > new APIs that introduced in the first patch, so It can show how there > > > > s/It/it/ > > s/there/these/ > > Got it. Thanks. > > > > > APIs work to support inflight feature. > > > > > > Signed-off-by: Jin Yu > > > --- > > > V1 - add the case. > > > V2 - add the rte_vhost prefix. > > > V3 - add packed ring support > > > --- > > > examples/vhost_blk/Makefile | 67 ++ > > > examples/vhost_blk/blk.c | 125 +++ > > > examples/vhost_blk/blk_spec.h | 95 ++ > > > examples/vhost_blk/meson.build | 20 + > > > examples/vhost_blk/vhost_blk.c | 1313 +++++++++++++++++++++++++ > > > examples/vhost_blk/vhost_blk.h | 116 +++ > > > examples/vhost_blk/vhost_blk_compat.c | 195 ++++ > > > 7 files changed, 1931 insertions(+) > > > > I met some build issues when trying this example. > > > > examples/vhost_blk/vhost_blk.c: In function ‘descriptor_get_next_packed’: > > examples/vhost_blk/vhost_blk.c:71:21: error: invalid use of undefined type > > ‘struct vring_packed_desc’ > > if (vq->desc_packed[*idx % vq->size].flags & VIRTQ_DESC_F_NEXT) { > > ^ > > examples/vhost_blk/vhost_blk.c:71:21: error: dereferencing pointer to > > incomplete type ‘struct vring_packed_desc’ > > examples/vhost_blk/vhost_blk.c:73:26: error: invalid use of undefined type > > ‘struct vring_packed_desc’ > > return &vq->desc_packed[*idx % vq->size]; > > The new version of virtio_ring.h have defined the vring_packed_desc. > For the compatibility, I will add the definition in the rte_vhost.h. No. They should be added in this example instead of the vhost API. > Thanks. > > > ^ > > examples/vhost_blk/vhost_blk.c: In function > > ‘inflight_submit_completion_packed’: > > examples/vhost_blk/vhost_blk.c:165:2: warning: > > ‘rte_vhost_set_last_inflight_io_packed’ is deprecated: Symbol is not yet part of > > stable ABI [-Wdeprecated-declarations] > > Should I ignore this warning? I'm not sure about this. > The reason is the _rte_experiment keyword? You need something like this: https://github.com/DPDK/dpdk/blob/bd253daa7717835f88bbc58b09a94d0060380396/examples/vhost/Makefile#L29 https://github.com/DPDK/dpdk/blob/bd253daa7717835f88bbc58b09a94d0060380396/examples/vhost/meson.build#L13 > Thanks. > > ret = rte_vhost_set_last_inflight_io_packed(ctrlr->bdev->vid, q_idx, > > ^~~ > > In file included from examples/vhost_blk/vhost_blk.c:17:0: > > x86_64-native-linuxapp-gcc/include/rte_vhost.h:810:1: note: declared here > > rte_vhost_set_last_inflight_io_packed(int vid, > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ^ > > ...