From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CBFA37EDC for ; Mon, 9 Jul 2018 04:09:50 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jul 2018 19:09:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,328,1526367600"; d="scan'208";a="71073784" Received: from debian.sh.intel.com (HELO debian) ([10.67.104.228]) by orsmga001.jf.intel.com with ESMTP; 08 Jul 2018 19:09:45 -0700 Date: Mon, 9 Jul 2018 10:09:32 +0800 From: Tiwei Bie To: Maxime Coquelin Cc: zhihong.wang@intel.com, jfreimann@redhat.com, dev@dpdk.org, mst@redhat.com, jasowang@redhat.com, wexu@redhat.com, Yuanhan Liu , Jens Freimann Message-ID: <20180709020932.GA16302@debian> References: <20180706070722.2043-1-maxime.coquelin@redhat.com> <20180706070722.2043-4-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180706070722.2043-4-maxime.coquelin@redhat.com> User-Agent: Mutt/1.10.0 (2018-05-17) Subject: Re: [dpdk-dev] [PATCH v9 03/15] vhost: vring address setup for packed queues 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: Mon, 09 Jul 2018 02:09:52 -0000 On Fri, Jul 06, 2018 at 09:07:10AM +0200, Maxime Coquelin wrote: [...] > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c > index bea6a0428..dca43ff00 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -467,6 +467,27 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index) > struct vhost_vring_addr *addr = &vq->ring_addrs; > uint64_t len; > > + if (vq_is_packed(dev)) { > + len = sizeof(struct vring_packed_desc) * vq->size; > + vq->desc_packed = (struct vring_packed_desc *) ring_addr_to_vva FYI, above code will cause below build error on 32bit platform: /tmp/dpdk-build/lib/librte_vhost/vhost_user.c: In function ‘translate_ring_addresses’: /tmp/dpdk-build/lib/librte_vhost/vhost_user.c:472:21: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] vq->desc_packed = (struct vring_packed_desc *) ring_addr_to_vva ^ I'll fix it while applying.