From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <tiwei.bie@intel.com>
Received: from mga18.intel.com (mga18.intel.com [134.134.136.126])
 by dpdk.org (Postfix) with ESMTP id 5DC4E1BECC
 for <dev@dpdk.org>; Fri,  6 Jul 2018 04:53:08 +0200 (CEST)
X-Amp-Result: UNSCANNABLE
X-Amp-File-Uploaded: False
Received: from orsmga005.jf.intel.com ([10.7.209.41])
 by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 05 Jul 2018 19:53:06 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.51,314,1526367600"; d="scan'208";a="238213149"
Received: from debian.sh.intel.com (HELO debian) ([10.67.104.228])
 by orsmga005.jf.intel.com with ESMTP; 05 Jul 2018 19:53:02 -0700
Date: Fri, 6 Jul 2018 10:52:50 +0800
From: Tiwei Bie <tiwei.bie@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: zhihong.wang@intel.com, jfreimann@redhat.com, dev@dpdk.org,
 mst@redhat.com, jasowang@redhat.com, wexu@redhat.com
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
Content-Disposition: inline
In-Reply-To: <20180705210741.17974-2-maxime.coquelin@redhat.com>
User-Agent: Mutt/1.10.0 (2018-05-17)
Subject: Re: [dpdk-dev] [PATCH v8 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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Jul 2018 02:53:08 -0000

On Thu, Jul 05, 2018 at 11:07:27PM +0200, Maxime Coquelin wrote:
> From: Jens Freimann <jfreimann@redhat.com>
> 
> Signed-off-by: Jens Freimann <jfreimann@redhat.com>
> ---
>  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
>