From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B15A88D35 for ; Wed, 9 Sep 2015 07:45:01 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 08 Sep 2015 22:45:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,495,1437462000"; d="scan'208";a="801207869" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by fmsmga002.fm.intel.com with ESMTP; 08 Sep 2015 22:45:00 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 9 Sep 2015 13:44:53 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.171]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.210]) with mapi id 14.03.0224.002; Wed, 9 Sep 2015 13:44:52 +0800 From: "Xie, Huawei" To: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 4/4 v2] vhost: fix wrong usage of eventfd_t Thread-Index: AdDqwqWRePj4PzL9SVaMURgIJa4WqQ== Date: Wed, 9 Sep 2015 05:44:51 +0000 Message-ID: References: <1441776876-14595-1-git-send-email-yuanhan.liu@linux.intel.com> <1441776876-14595-4-git-send-email-yuanhan.liu@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 4/4 v2] vhost: fix wrong usage of eventfd_t X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2015 05:45:02 -0000 =0A= Acked-by: Huawei Xie =0A= =0A= Thanks for fixing this.=0A= =0A= On 9/9/2015 1:32 PM, Yuanhan Liu wrote:=0A= > According to eventfd man page:=0A= >=0A= > typedef uint64_t eventfd_t;=0A= >=0A= > int eventfd_read(int fd, eventfd_t *value);=0A= > int eventfd_write(int fd, eventfd_t value);=0A= >=0A= > eventfd_t is defined for the second arg(value), but not for fd.=0A= >=0A= > Here I redefine those fd fields to `int' type, which also removes=0A= > the redundant (int) cast. And as the man page stated, we should=0A= > cast 1 to eventfd_t type for eventfd_write().=0A= >=0A= > v2: cast 1 with `eventfd_t' type.=0A= >=0A= > Signed-off-by: Yuanhan Liu =0A= > ---=0A= > examples/vhost/main.c | 6 ++---=0A= > lib/librte_vhost/rte_virtio_net.h | 4 ++--=0A= > lib/librte_vhost/vhost_rxtx.c | 6 ++---=0A= > lib/librte_vhost/vhost_user/virtio-net-user.c | 16 +++++++-------=0A= > lib/librte_vhost/virtio-net.c | 32 +++++++++++++--------= ------=0A= > 5 files changed, 32 insertions(+), 32 deletions(-)=0A= >=0A=