[dpdk-dev] [PATCH 4/4 v2] vhost: fix wrong usage of eventfd_t

Yuanhan Liu yuanhan.liu at linux.intel.com
Thu Sep 24 16:01:00 CEST 2015


Hi Thomas,

Would you consider to apply these 4 patches please? The 4th patch
affects quite many lines of code, and the sooner we apply it, the
fewer chance it will introduce conflicts for later patches.

Thanks.

	--yliu

On Wed, Sep 09, 2015 at 05:44:51AM +0000, Xie, Huawei wrote:
> 
> 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