From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 2476F1B4C9 for ; Fri, 29 Jun 2018 17:47:32 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2018 08:47:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,285,1526367600"; d="scan'208";a="61137151" Received: from debian.sh.intel.com (HELO debian) ([10.67.104.228]) by FMSMGA003.fm.intel.com with ESMTP; 29 Jun 2018 08:47:30 -0700 Date: Fri, 29 Jun 2018 23:47: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 Message-ID: <20180629154732.GA31010@debian> References: <20180622134327.18973-1-maxime.coquelin@redhat.com> <20180622134327.18973-2-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180622134327.18973-2-maxime.coquelin@redhat.com> User-Agent: Mutt/1.9.5 (2018-04-13) Subject: Re: [dpdk-dev] [PATCH v5 01/15] vhost: add virtio packed virtqueue defines 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: Fri, 29 Jun 2018 15:47:33 -0000 On Fri, Jun 22, 2018 at 03:43:13PM +0200, Maxime Coquelin wrote: > From: Jens Freimann > > Signed-off-by: Jens Freimann > --- > lib/librte_vhost/vhost.h | 4 ++++ > lib/librte_vhost/virtio-packed.h | 22 ++++++++++++++++++++++ > 2 files changed, 26 insertions(+) > create mode 100644 lib/librte_vhost/virtio-packed.h > > diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h > index 3f8fa3a78..bf2059198 100644 > --- a/lib/librte_vhost/vhost.h > +++ b/lib/librte_vhost/vhost.h > @@ -191,6 +191,10 @@ struct vhost_msg { > #ifndef VIRTIO_F_VERSION_1 > #define VIRTIO_F_VERSION_1 32 > #endif > +#ifndef VIRTIO_F_RING_PACKED > + #define VIRTIO_F_RING_PACKED 34 > +#endif > +#define VHOST_USER_F_PROTOCOL_FEATURES 30 VHOST_USER_F_PROTOCOL_FEATURES has already been defined in rte_vhost.h which has been included in this file. > > /* Features supported by this builtin vhost-user net driver. */ > #define VIRTIO_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \ > diff --git a/lib/librte_vhost/virtio-packed.h b/lib/librte_vhost/virtio-packed.h > new file mode 100644 > index 000000000..744b3991b > --- /dev/null > +++ b/lib/librte_vhost/virtio-packed.h > @@ -0,0 +1,22 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) Red Hat Inc. > + */ > + > +#ifndef __VIRTIO_PACKED_H > +#define __VIRTIO_PACKED_H > + > +#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 { > + uint64_t addr; > + uint32_t len; > + uint16_t index; > + uint16_t flags; > +}; > + > +#endif /* __VIRTIO_PACKED_H */ > -- > 2.14.4 >