DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: "Ouyang, Changchun" <changchun.ouyang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 4/4] vhost: define callfd and kickfd as int type
Date: Wed, 9 Sep 2015 10:52:46 +0800	[thread overview]
Message-ID: <20150909025246.GE2925@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <F52918179C57134FAEC9EA62FA2F962511D06C21@shsmsx102.ccr.corp.intel.com>

On Wed, Sep 09, 2015 at 02:41:37AM +0000, Ouyang, Changchun wrote:
> 
> 
> > -----Original Message-----
> > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
> > Sent: Monday, August 24, 2015 11:55 AM
> > To: dev@dpdk.org
> > Cc: Xie, Huawei; Ouyang, Changchun; Yuanhan Liu
> > Subject: [PATCH 4/4] vhost: define callfd and kickfd as int type
> > 
> > So that we can remove the redundant (int) cast.
> > 
> > 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(-)
> > 
> > diff --git a/examples/vhost/main.c b/examples/vhost/main.c index
> > 1b137b9..b090b25 100644
> > --- a/examples/vhost/main.c
> > +++ b/examples/vhost/main.c
> > @@ -1433,7 +1433,7 @@ put_desc_to_used_list_zcp(struct vhost_virtqueue
> > *vq, uint16_t desc_idx)
> > 
> >  	/* Kick the guest if necessary. */
> >  	if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT))
> > -		eventfd_write((int)vq->callfd, 1);
> > +		eventfd_write(vq->callfd, 1);
> 
> Don't we need type conversion for '1' to eventfd_t here?

Nope. See eventfd_write man page:

   int eventfd_read(int fd, eventfd_t *value);
   int eventfd_write(int fd, eventfd_t value);

	--yliu

  reply	other threads:[~2015-09-09  2:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24  3:54 [dpdk-dev] [PATCH 1/4] vhost: remove redundant ; Yuanhan Liu
2015-08-24  3:54 ` [dpdk-dev] [PATCH 2/4] vhost: fix typo Yuanhan Liu
2015-09-09  1:24   ` Ouyang, Changchun
2015-09-09  5:19   ` Xie, Huawei
2015-08-24  3:54 ` [dpdk-dev] [PATCH 3/4] vhost: get rid of duplicate code Yuanhan Liu
2015-09-09  1:28   ` Ouyang, Changchun
2015-09-09  5:19   ` Xie, Huawei
2015-08-24  3:54 ` [dpdk-dev] [PATCH 4/4] vhost: define callfd and kickfd as int type Yuanhan Liu
2015-09-09  1:43   ` Ouyang, Changchun
2015-09-09  1:54     ` Yuanhan Liu
2015-09-09  2:37       ` Ouyang, Changchun
2015-09-09  2:41   ` Ouyang, Changchun
2015-09-09  2:52     ` Yuanhan Liu [this message]
2015-09-09  1:49 ` [dpdk-dev] [PATCH 1/4] vhost: remove redundant ; Ouyang, Changchun
2015-09-09  5:20 ` Xie, Huawei

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=20150909025246.GE2925@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=changchun.ouyang@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).