[dpdk-dev] [PATCH 4/4 v2] vhost: fix wrong usage of eventfd_t
Xie, Huawei
huawei.xie at intel.com
Wed Sep 9 07:44:51 CEST 2015
Acked-by: Huawei Xie <huawei.xie at 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 at 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(-)
>
More information about the dev
mailing list