From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <tiwei.bie@intel.com>
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id E94B41BE34
 for <dev@dpdk.org>; Wed,  4 Jul 2018 07:37:35 +0200 (CEST)
X-Amp-Result: UNKNOWN
X-Amp-Original-Verdict: FILE UNKNOWN
X-Amp-File-Uploaded: False
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 03 Jul 2018 22:37:33 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.51,306,1526367600"; d="scan'208";a="72094504"
Received: from debian.sh.intel.com (HELO debian) ([10.67.104.228])
 by orsmga002.jf.intel.com with ESMTP; 03 Jul 2018 22:37:32 -0700
Date: Wed, 4 Jul 2018 13:37:33 +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: <20180704053733.GA28826@debian>
References: <20180702081629.29258-1-maxime.coquelin@redhat.com>
 <20180702081629.29258-2-maxime.coquelin@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20180702081629.29258-2-maxime.coquelin@redhat.com>
User-Agent: Mutt/1.9.5 (2018-04-13)
Subject: Re: [dpdk-dev] [PATCH v6 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: Wed, 04 Jul 2018 05:37:36 -0000

On Mon, Jul 02, 2018 at 10:16:15AM +0200, Maxime Coquelin wrote:
> From: Jens Freimann <jfreimann@redhat.com>
> 
> Signed-off-by: Jens Freimann <jfreimann@redhat.com>
> ---
>  lib/librte_vhost/vhost.h         |  3 +++
>  lib/librte_vhost/virtio-packed.h | 22 ++++++++++++++++++++++
>  2 files changed, 25 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..cecd5c1ee 100644
> --- a/lib/librte_vhost/vhost.h
> +++ b/lib/librte_vhost/vhost.h
> @@ -191,6 +191,9 @@ 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
>  
>  /* 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)

Please use space or tab consistently.

> +
> +struct vring_desc_packed {
> +	uint64_t addr;
> +	uint32_t len;
> +	uint16_t index;
> +	uint16_t flags;
> +};
> +
> +#endif /* __VIRTIO_PACKED_H */
> -- 
> 2.14.4
>