* [PATCH] vfio: eventfd should be non-block and not inherited @ 2015-04-29 15:15 Stephen Hemminger [not found] ` <1430320545-16638-1-git-send-email-stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Stephen Hemminger @ 2015-04-29 15:15 UTC (permalink / raw) To: dev-VfR2kkLFssw 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-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.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 related [flat|nested] 3+ messages in thread
[parent not found: <1430320545-16638-1-git-send-email-stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>]
* Re: [PATCH] vfio: eventfd should be non-block and not inherited [not found] ` <1430320545-16638-1-git-send-email-stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org> @ 2015-04-29 16:15 ` Burakov, Anatoly 2015-05-11 15:16 ` Thomas Monjalon 0 siblings, 1 reply; 3+ messages in thread From: Burakov, Anatoly @ 2015-04-29 16:15 UTC (permalink / raw) To: Stephen Hemminger, dev-VfR2kkLFssw@public.gmane.org > 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-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.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 Acked-by: Anatoly Burakov <anatoly.burakov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vfio: eventfd should be non-block and not inherited 2015-04-29 16:15 ` Burakov, Anatoly @ 2015-05-11 15:16 ` Thomas Monjalon 0 siblings, 0 replies; 3+ messages in thread From: Thomas Monjalon @ 2015-05-11 15:16 UTC (permalink / raw) To: Stephen Hemminger; +Cc: 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> > > Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> Applied, thanks ^ 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 [PATCH] vfio: eventfd should be non-block and not inherited Stephen Hemminger [not found] ` <1430320545-16638-1-git-send-email-stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org> 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).