From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <tiwei.bie@intel.com>
Received: from mga12.intel.com (mga12.intel.com [192.55.52.136])
 by dpdk.org (Postfix) with ESMTP id 00FFB1B064
 for <dev@dpdk.org>; Tue, 10 Jul 2018 07:48:41 +0200 (CEST)
X-Amp-Result: UNKNOWN
X-Amp-Original-Verdict: FILE UNKNOWN
X-Amp-File-Uploaded: False
Received: from orsmga008.jf.intel.com ([10.7.209.65])
 by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 09 Jul 2018 22:48:40 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.51,333,1526367600"; d="scan'208";a="55688169"
Received: from debian.sh.intel.com (HELO debian) ([10.67.104.228])
 by orsmga008.jf.intel.com with ESMTP; 09 Jul 2018 22:48:35 -0700
Date: Tue, 10 Jul 2018 13:48:22 +0800
From: Tiwei Bie <tiwei.bie@intel.com>
To: Nikolay Nikolaev <nicknickolaev@gmail.com>
Cc: maxime.coquelin@redhat.com, zhihong.wang@intel.com, dev@dpdk.org
Message-ID: <20180710054821.GA10600@debian>
References: <153002988259.22089.8523468795459281187.stgit@T460>
 <153002997115.22089.11268165694203279446.stgit@T460>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <153002997115.22089.11268165694203279446.stgit@T460>
User-Agent: Mutt/1.10.0 (2018-05-17)
Subject: Re: [dpdk-dev] [PATCH v1 4/5] vhost: unify message handling
	function signature
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: Tue, 10 Jul 2018 05:48:42 -0000

On Tue, Jun 26, 2018 at 07:19:31PM +0300, Nikolay Nikolaev wrote:
> Each vhost-user message handlign function will return an int result

s/handlign/handling

> which is described in the new enum vh_result: error, OK and reply.
> All functions will now have two arguments, virtio_net double pointer
> and VhostUserMsg pointer.
> 
> Signed-off-by: Nikolay Nikolaev <nicknickolaev@gmail.com>
> ---
>  lib/librte_vhost/vhost_user.c |  217 ++++++++++++++++++++++++-----------------
>  1 file changed, 129 insertions(+), 88 deletions(-)
> 
> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
> index d999c80ed..dd47d84c7 100644
> --- a/lib/librte_vhost/vhost_user.c
> +++ b/lib/librte_vhost/vhost_user.c
> @@ -71,6 +71,16 @@ static const char *vhost_message_str[VHOST_USER_MAX] = {
>  	[VHOST_USER_CRYPTO_CLOSE_SESS] = "VHOST_USER_CRYPTO_CLOSE_SESS",
>  };
>  
> +/* The possible results of a message handling function */
> +enum vh_result {
> +	/* Message handlig failed */

s/handlig/handling/

> +	VH_RESULT_ERR   = -1,
> +	/* Message handlig successful */
> +	VH_RESULT_OK    =  0,
> +	/* Message handlig successful and reply prepared */
> +	VH_RESULT_REPLY =  1

Please add a comma after "1", i.e.:

s/VH_RESULT_REPLY =  1/VH_RESULT_REPLY =  1,/

Thanks

> +};
> +
[...]