From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B85D5C8B4 for ; Wed, 29 Apr 2015 18:15:52 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 29 Apr 2015 09:15:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,671,1422950400"; d="scan'208";a="563752460" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by orsmga003.jf.intel.com with ESMTP; 29 Apr 2015 09:15:49 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.201]) by IRSMSX108.ger.corp.intel.com ([169.254.11.246]) with mapi id 14.03.0224.002; Wed, 29 Apr 2015 17:15:48 +0100 From: "Burakov, Anatoly" To: Stephen Hemminger , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] vfio: eventfd should be non-block and not inherited Thread-Index: AQHQgo96cB7aK8sEoEe7o+9XHa9bHp1kKg9w Date: Wed, 29 Apr 2015 16:15:48 +0000 Message-ID: References: <1430320545-16638-1-git-send-email-stephen@networkplumber.org> In-Reply-To: <1430320545-16638-1-git-send-email-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] vfio: eventfd should be non-block and not inherited 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, 29 Apr 2015 16:15:53 -0000 > Set internal event file descriptor to be non-block and not inherited acro= ss > exec. This prevents accidental hangs and passing in anothr thread. >=20 > Signed-off-by: Stephen Hemminger > --- > lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > index aea1fb1..426953a 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > @@ -294,7 +294,7 @@ pci_vfio_setup_interrupts(struct rte_pci_device > *dev, int vfio_dev_fd) > } >=20 > /* set up an eventfd for interrupts */ > - fd =3D eventfd(0, 0); > + fd =3D eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); > if (fd < 0) { > RTE_LOG(ERR, EAL, " cannot set up eventfd, " > "error %i (%s)\n", errno, > strerror(errno)); > -- > 2.1.4 Acked-by: Anatoly Burakov