vhost: fix wrong usage of eventfd_t
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 9 Sep 2015 05:34:36 +0000 (13:34 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 25 Sep 2015 12:58:30 +0000 (14:58 +0200)
commit9702b2b53f250aa50973e6d86abce45b4a919eda
treeac1fce796e8a577bb662f799c58225d499443c49
parentdbd897d0a165a4a60879d21720fb6f312f285719
vhost: fix wrong usage of eventfd_t

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().

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
examples/vhost/main.c
lib/librte_vhost/rte_virtio_net.h
lib/librte_vhost/vhost_rxtx.c
lib/librte_vhost/vhost_user/virtio-net-user.c
lib/librte_vhost/virtio-net.c