[dpdk-dev] [PATCH v1 4/5] vhost: unify message handling function signature
Tiwei Bie
tiwei.bie at intel.com
Tue Jul 10 07:48:22 CEST 2018
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 at 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
> +};
> +
[...]
More information about the dev
mailing list