From: "Xie, Huawei" <huawei.xie@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 4/4 v2] vhost: fix wrong usage of eventfd_t
Date: Wed, 9 Sep 2015 05:44:51 +0000 [thread overview]
Message-ID: <C37D651A908B024F974696C65296B57B2BDC21D4@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1441776876-14595-4-git-send-email-yuanhan.liu@linux.intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
Thanks for fixing this.
On 9/9/2015 1:32 PM, Yuanhan Liu wrote:
> According to eventfd man page:
>
> typedef uint64_t eventfd_t;
>
> int eventfd_read(int fd, eventfd_t *value);
> int eventfd_write(int fd, eventfd_t value);
>
> eventfd_t is defined for the second arg(value), but not for fd.
>
> Here I redefine those fd fields to `int' type, which also removes
> the redundant (int) cast. And as the man page stated, we should
> cast 1 to eventfd_t type for eventfd_write().
>
> v2: cast 1 with `eventfd_t' type.
>
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> ---
> examples/vhost/main.c | 6 ++---
> lib/librte_vhost/rte_virtio_net.h | 4 ++--
> lib/librte_vhost/vhost_rxtx.c | 6 ++---
> lib/librte_vhost/vhost_user/virtio-net-user.c | 16 +++++++-------
> lib/librte_vhost/virtio-net.c | 32 +++++++++++++--------------
> 5 files changed, 32 insertions(+), 32 deletions(-)
>
next prev parent reply other threads:[~2015-09-09 5:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 5:34 [dpdk-dev] [PATCH 1/4] vhost: remove redundant ; Yuanhan Liu
2015-09-09 5:34 ` [dpdk-dev] [PATCH 2/4] vhost: fix typo Yuanhan Liu
2015-09-09 5:34 ` [dpdk-dev] [PATCH 3/4] vhost: get rid of duplicate code Yuanhan Liu
2015-09-09 5:34 ` [dpdk-dev] [PATCH 4/4 v2] vhost: fix wrong usage of eventfd_t Yuanhan Liu
2015-09-09 5:44 ` Xie, Huawei [this message]
2015-09-24 14:01 ` Yuanhan Liu
2015-09-25 12:44 ` Thomas Monjalon
2015-09-25 12:59 ` Thomas Monjalon
2015-09-27 0:17 ` Yuanhan Liu
2015-09-27 19:35 ` Thomas Monjalon
2015-10-08 6:29 ` Yuanhan Liu
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=C37D651A908B024F974696C65296B57B2BDC21D4@SHSMSX101.ccr.corp.intel.com \
--to=huawei.xie@intel.com \
--cc=dev@dpdk.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).