From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <maxime.coquelin@redhat.com>
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
 by dpdk.org (Postfix) with ESMTP id 19BCA1E34
 for <dev@dpdk.org>; Wed, 26 Sep 2018 15:51:34 +0200 (CEST)
Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com
 [10.5.11.26])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id 655613001244;
 Wed, 26 Sep 2018 13:51:33 +0000 (UTC)
Received: from [10.36.112.32] (ovpn-112-32.ams2.redhat.com [10.36.112.32])
 by smtp.corp.redhat.com (Postfix) with ESMTPS id 78B433091384;
 Wed, 26 Sep 2018 13:51:31 +0000 (UTC)
To: Nikolay Nikolaev <nicknickolaev@gmail.com>, anatoly.burakov@intel.com,
 tiwei.bie@intel.com, zhihong.wang@intel.com
Cc: dev@dpdk.org
References: <153782013094.27450.17651924330876922486.stgit@T460>
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Message-ID: <81f90cf6-40c9-b89a-b610-e46045dbe37e@redhat.com>
Date: Wed, 26 Sep 2018 15:51:29 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <153782013094.27450.17651924330876922486.stgit@T460>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.45]); Wed, 26 Sep 2018 13:51:33 +0000 (UTC)
Subject: Re: [dpdk-dev] [PATCH v6 0/5] vhost: vhost_user.c code cleanup
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, 26 Sep 2018 13:51:34 -0000

Hi Nikolay,

On 09/24/2018 10:16 PM, Nikolay Nikolaev wrote:
> vhost: vhost_user.c code cleanup
> 
> This patchesries introduce a set of code redesigns in vhost_user.c.
> 
> The goal is to unify and simplify vhost-user message handling. The
> patches do not intend to introduce any functional changes.
> 
> v6 changes:
>   - Even more fixes to the usage of struct VhostUserMsg in
>     the patches (Anatoly Burakov)
> 
> v5 changes:
>   - fixed the usage of struct VhostUserMsg in all patches (Anatoly Burakov)
> 
> v4 changes:
>   - use struct VhostUserMsg as the coding style guide suggests (Anatoly Burakov)
>   - VH_RESULT_FATAL is removed as not needed anymore (Maxime Coquelin)
> 
> v3 changes:
>   - rebased on top of git://dpdk.org/next/dpdk-next-virtio dead0602
>   - introduce VH_RESULT_FATAL (Maxime Coquelin)
>   - vhost_user_set_features return VH_RESULT_FATAL on failure.
>     This allows keeping the propagate error logic (Ilya Maximets)
>   - fixed vhost_user_set_vring_kick and vhost_user_set_protocol_features
>     return VH_RESULT_ERR upon failure
>   - fixed missing break in case VH_RESULT_ERR (Ilya Maximets)
>   - fixed a type on the description of 2/5 patch (Maxime Coquelin)
> 
> v2 changes:
>   - Fix the comments by Tiwei Bie
>   - Keep the old behavior
>     - Fall through when the callback returns VH_RESULT_ERR
>     - Fall through if the request is out of range
> 
> ---
> 
> Nikolay Nikolaev (5):
>        vhost: unify struct VhostUserMsg usage
>        vhost: make message handling functions prepare the reply
>        vhost: handle unsupported message types in functions
>        vhost: unify message handling function signature
>        vhost: message handling implemented as a callback array
> 
> 
>   lib/librte_vhost/vhost_user.c |  394 ++++++++++++++++++++++-------------------
>   1 file changed, 209 insertions(+), 185 deletions(-)
> 
> --
> Signature
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Series applied to dpdk-next-virtio with small change I suggested in
patch 5.

Thanks for your contribution!
Maxime