From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tiwei Bie Subject: Re: [PATCH v8 01/15] vhost: add virtio packed virtqueue defines Date: Fri, 6 Jul 2018 10:52:50 +0800 Message-ID: <20180706025249.GA13855@debian> References: <20180705210741.17974-1-maxime.coquelin@redhat.com> <20180705210741.17974-2-maxime.coquelin@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: zhihong.wang@intel.com, jfreimann@redhat.com, dev@dpdk.org, mst@redhat.com, jasowang@redhat.com, wexu@redhat.com To: Maxime Coquelin Return-path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 5DC4E1BECC for ; Fri, 6 Jul 2018 04:53:08 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20180705210741.17974-2-maxime.coquelin@redhat.com> 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, Jul 05, 2018 at 11:07:27PM +0200, Maxime Coquelin wrote: > From: Jens Freimann > > Signed-off-by: Jens Freimann > --- > lib/librte_vhost/vhost.h | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h > index 79e3117d2..4fc804bd8 100644 > --- a/lib/librte_vhost/vhost.h > +++ b/lib/librte_vhost/vhost.h > @@ -192,6 +192,26 @@ struct vhost_msg { > #define VIRTIO_F_VERSION_1 32 > #endif > > +/* Declare packed ring related bits for older kernels */ > +#ifndef VIRTIO_F_RING_PACKED > + > +#define VIRTIO_F_RING_PACKED 34 > + > +#define VRING_DESC_F_NEXT 1 > +#define VRING_DESC_F_WRITE 2 > +#define VRING_DESC_F_INDIRECT 4 > + > +#define VRING_DESC_F_AVAIL (1ULL << 7) > +#define VRING_DESC_F_USED (1ULL << 15) > + > +struct vring_desc_packed { Maybe vring_packed_desc will be more consistent with vring_packed_desc_event and vring_packed. Jason also planned to change the name to vring_packed_desc [1]. [1] https://lkml.org/lkml/2018/7/4/36 Best regards, Tiwei Bie > + uint64_t addr; > + uint32_t len; > + uint16_t id; > + uint16_t flags; > +}; > +#endif > + > /* > * Available and used descs are in same order > */ > -- > 2.14.4 >