DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vfio: eventfd should be non-block and not inherited
@ 2015-04-29 15:15 Stephen Hemminger
  2015-04-29 16:15 ` Burakov, Anatoly
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2015-04-29 15:15 UTC (permalink / raw)
  To: dev

Set internal event file descriptor to be non-block and not
inherited across exec.  This prevents accidental hangs and
passing in anothr thread.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
 		}
 
 		/* set up an eventfd for interrupts */
-		fd = eventfd(0, 0);
+		fd = 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-11 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-29 15:15 [dpdk-dev] [PATCH] vfio: eventfd should be non-block and not inherited Stephen Hemminger
2015-04-29 16:15 ` Burakov, Anatoly
2015-05-11 15:16   ` Thomas Monjalon

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