[dpdk-dev] [PATCH v2] eal/interrupts: add function to allow interruptible epoll

Stephen Hemminger stephen at networkplumber.org
Mon Sep 14 18:39:36 CEST 2020


On Mon, 14 Sep 2020 10:56:33 +0200
David Marchand <david.marchand at redhat.com> wrote:

> On Fri, Sep 4, 2020 at 1:28 AM Stephen Hemminger
> <stephen at networkplumber.org> wrote:
> >
> > The existing definition of rte_epoll_wait retries if interrupted
> > by a signal. This behavior makes it hard to use rte_epoll_wait
> > for applications that want to use signals do do things like
> > exit polling loop and shutdown.
> >
> > Since changing existing semantic might break applications, add
> > a new rte_epoll_wait_interruptible() function that does the
> > same thing as rte_epoll_wait but will return -1 and errno of EINTR
> > if it receives a signal.
> >
> > Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> > Reviewed-by: Harman Kalra <hkalra at marvell.com>  
> 
> You will certainly argue that the existing function had no unit test
> but we want to fix this at some point.
> Can a unit test be added?

The whole interrupt system really has no test, if it did then epoll
would be part of that.


More information about the dev mailing list