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
Subject: Re: [PATCH v1 4/5] vhost: unify message handling function signature
Date: Tue, 10 Jul 2018 13:48:22 +0800 [thread overview]
Message-ID: <20180710054821.GA10600@debian> (raw)
In-Reply-To: <153002997115.22089.11268165694203279446.stgit@T460>
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
> +};
> +
[...]
next prev parent reply other threads:[~2018-07-10 5:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-26 16:19 [PATCH v1 0/5] vhost_user.c code cleanup Nikolay Nikolaev
2018-06-26 16:19 ` [PATCH v1 1/5] vhost: unify VhostUserMsg usage Nikolay Nikolaev
2018-06-26 16:19 ` [PATCH v1 2/5] vhost: make message handling functions prepare the reply Nikolay Nikolaev
2018-06-26 16:19 ` [PATCH v1 3/5] vhost: handle unsupported message types in functions Nikolay Nikolaev
2018-06-26 16:19 ` [PATCH v1 4/5] vhost: unify message handling function signature Nikolay Nikolaev
2018-07-10 5:48 ` Tiwei Bie [this message]
2018-06-26 16:19 ` [PATCH v1 5/5] vhost: message handling implemented as a callback array Nikolay Nikolaev
2018-07-10 5:56 ` Tiwei Bie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180710054821.GA10600@debian \
--to=tiwei.bie@intel.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=nicknickolaev@gmail.com \
--cc=zhihong.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.