[1/1] eal/linux: fix event set error for rte_epoll_event

Message ID 2dc88362a7dc347547eb24e5d0570db11a59598e.1594780487.git.wangyunjian@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [1/1] eal/linux: fix event set error for rte_epoll_event |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS

Commit Message

Yunjian Wang July 15, 2020, 2:40 a.m. UTC
  From: Yunjian Wang <wangyunjian@huawei.com>

The "rev->epdata.event" assigned to "events.epdata.event" directly, which
was wrong in case of epoll events. It should be set to the "evs.events".

Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 lib/librte_eal/linux/eal_interrupts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Yunjian Wang Aug. 26, 2020, 10:55 a.m. UTC | #1
Ping for review, please.

> -----Original Message-----
> From: wangyunjian
> Sent: Wednesday, July 15, 2020 10:40 AM
> To: dev@dpdk.org; hkalra@marvell.com
> Cc: Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> <xudingke@huawei.com>; wangyunjian <wangyunjian@huawei.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error for rte_epoll_event
> 
> From: Yunjian Wang <wangyunjian@huawei.com>
> 
> The "rev->epdata.event" assigned to "events.epdata.event" directly, which
> was wrong in case of epoll events. It should be set to the "evs.events".
> 
> Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
>  lib/librte_eal/linux/eal_interrupts.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/linux/eal_interrupts.c
> b/lib/librte_eal/linux/eal_interrupts.c
> index 13db5c4e8..8a3c95cec 100644
> --- a/lib/librte_eal/linux/eal_interrupts.c
> +++ b/lib/librte_eal/linux/eal_interrupts.c
> @@ -1237,7 +1237,7 @@ eal_epoll_process_event(struct epoll_event *evs,
> unsigned int n,
>  		events[count].status        = RTE_EPOLL_VALID;
>  		events[count].fd            = rev->fd;
>  		events[count].epfd          = rev->epfd;
> -		events[count].epdata.event  = rev->epdata.event;
> +		events[count].epdata.event  = evs[i].events;
>  		events[count].epdata.data   = rev->epdata.data;
>  		if (rev->epdata.cb_fun)
>  			rev->epdata.cb_fun(rev->fd,
> --
> 2.23.0
>
  
Yunjian Wang Sept. 19, 2020, 10:42 a.m. UTC | #2
Friendly ping.

> -----Original Message-----
> From: wangyunjian
> Sent: Wednesday, August 26, 2020 6:56 PM
> To: dev@dpdk.org; hkalra@marvell.com; david.marchand@redhat.com
> Cc: 'ferruh.yigit@intel.com' <ferruh.yigit@intel.com>; 'Thomas Monjalon'
> <thomas@monjalon.net>; Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> <xudingke@huawei.com>; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error for
> rte_epoll_event
> 
> Ping for review, please.
> 
> > -----Original Message-----
> > From: wangyunjian
> > Sent: Wednesday, July 15, 2020 10:40 AM
> > To: dev@dpdk.org; hkalra@marvell.com
> > Cc: Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> > <xudingke@huawei.com>; wangyunjian <wangyunjian@huawei.com>;
> > stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error for
> > rte_epoll_event
> >
> > From: Yunjian Wang <wangyunjian@huawei.com>
> >
> > The "rev->epdata.event" assigned to "events.epdata.event" directly,
> > which was wrong in case of epoll events. It should be set to the "evs.events".
> >
> > Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> > ---
> >  lib/librte_eal/linux/eal_interrupts.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/librte_eal/linux/eal_interrupts.c
> > b/lib/librte_eal/linux/eal_interrupts.c
> > index 13db5c4e8..8a3c95cec 100644
> > --- a/lib/librte_eal/linux/eal_interrupts.c
> > +++ b/lib/librte_eal/linux/eal_interrupts.c
> > @@ -1237,7 +1237,7 @@ eal_epoll_process_event(struct epoll_event *evs,
> > unsigned int n,
> >  		events[count].status        = RTE_EPOLL_VALID;
> >  		events[count].fd            = rev->fd;
> >  		events[count].epfd          = rev->epfd;
> > -		events[count].epdata.event  = rev->epdata.event;
> > +		events[count].epdata.event  = evs[i].events;
> >  		events[count].epdata.data   = rev->epdata.data;
> >  		if (rev->epdata.cb_fun)
> >  			rev->epdata.cb_fun(rev->fd,
> > --
> > 2.23.0
> >
  
David Marchand Sept. 21, 2020, 8:04 a.m. UTC | #3
On Sat, Sep 19, 2020 at 12:42 PM wangyunjian <wangyunjian@huawei.com> wrote:
>
> Friendly ping.

It is fair to ask for reviews but please do contribute by reviewing
other patches on the mailing list.
Thanks.
  
Yunjian Wang Sept. 21, 2020, 1:17 p.m. UTC | #4
> -----Original Message-----
> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Monday, September 21, 2020 4:05 PM
> To: wangyunjian <wangyunjian@huawei.com>
> Cc: dev@dpdk.org; hkalra@marvell.com; ferruh.yigit@intel.com; Thomas
> Monjalon <thomas@monjalon.net>; Lilijun (Jerry) <jerry.lilijun@huawei.com>;
> xudingke <xudingke@huawei.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error for
> rte_epoll_event
> 
> On Sat, Sep 19, 2020 at 12:42 PM wangyunjian <wangyunjian@huawei.com>
> wrote:
> >
> > Friendly ping.
> 
> It is fair to ask for reviews but please do contribute by reviewing other patches
> on the mailing list.
> Thanks.

Do you mean I need to review other patches on the mailing list?
If so, I'm glad to do it. I will review patches in my field of expertise.

Thanks,
Yunjian

> 
> 
> --
> David Marchand
  
Harman Kalra Sept. 22, 2020, 10:31 a.m. UTC | #5
On Sat, Sep 19, 2020 at 10:42:30AM +0000, wangyunjian wrote:
> External Email
> 
> ----------------------------------------------------------------------
> Friendly ping.

Hi Wang,

   I am sorry for the delay in review, I will surely complete the review
   by end of this week.
   Can you please elaborate on the specific case/scenario which caused
   failure i.e. which lead you to this change.

Thanks
Harman

> 
> > -----Original Message-----
> > From: wangyunjian
> > Sent: Wednesday, August 26, 2020 6:56 PM
> > To: dev@dpdk.org; hkalra@marvell.com; david.marchand@redhat.com
> > Cc: 'ferruh.yigit@intel.com' <ferruh.yigit@intel.com>; 'Thomas Monjalon'
> > <thomas@monjalon.net>; Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> > <xudingke@huawei.com>; stable@dpdk.org
> > Subject: RE: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error for
> > rte_epoll_event
> > 
> > Ping for review, please.
> > 
> > > -----Original Message-----
> > > From: wangyunjian
> > > Sent: Wednesday, July 15, 2020 10:40 AM
> > > To: dev@dpdk.org; hkalra@marvell.com
> > > Cc: Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> > > <xudingke@huawei.com>; wangyunjian <wangyunjian@huawei.com>;
> > > stable@dpdk.org
> > > Subject: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error for
> > > rte_epoll_event
> > >
> > > From: Yunjian Wang <wangyunjian@huawei.com>
> > >
> > > The "rev->epdata.event" assigned to "events.epdata.event" directly,
> > > which was wrong in case of epoll events. It should be set to the "evs.events".
> > >
> > > Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> > > ---
> > >  lib/librte_eal/linux/eal_interrupts.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/lib/librte_eal/linux/eal_interrupts.c
> > > b/lib/librte_eal/linux/eal_interrupts.c
> > > index 13db5c4e8..8a3c95cec 100644
> > > --- a/lib/librte_eal/linux/eal_interrupts.c
> > > +++ b/lib/librte_eal/linux/eal_interrupts.c
> > > @@ -1237,7 +1237,7 @@ eal_epoll_process_event(struct epoll_event *evs,
> > > unsigned int n,
> > >  		events[count].status        = RTE_EPOLL_VALID;
> > >  		events[count].fd            = rev->fd;
> > >  		events[count].epfd          = rev->epfd;
> > > -		events[count].epdata.event  = rev->epdata.event;
> > > +		events[count].epdata.event  = evs[i].events;
> > >  		events[count].epdata.data   = rev->epdata.data;
> > >  		if (rev->epdata.cb_fun)
> > >  			rev->epdata.cb_fun(rev->fd,
> > > --
> > > 2.23.0
> > >
>
  
Yunjian Wang Sept. 22, 2020, 12:05 p.m. UTC | #6
> -----Original Message-----
> From: Harman Kalra [mailto:hkalra@marvell.com]
> Sent: Tuesday, September 22, 2020 6:32 PM
> To: wangyunjian <wangyunjian@huawei.com>
> Cc: dev@dpdk.org; david.marchand@redhat.com; ferruh.yigit@intel.com;
> Thomas Monjalon <thomas@monjalon.net>; Lilijun (Jerry)
> <jerry.lilijun@huawei.com>; xudingke <xudingke@huawei.com>;
> stable@dpdk.org
> Subject: Re: [EXT] RE: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error for
> rte_epoll_event
> 
> On Sat, Sep 19, 2020 at 10:42:30AM +0000, wangyunjian wrote:
> > External Email
> >
> > ----------------------------------------------------------------------
> > Friendly ping.
> 
> Hi Wang,
> 
>    I am sorry for the delay in review, I will surely complete the review
>    by end of this week.
>    Can you please elaborate on the specific case/scenario which caused
>    failure i.e. which lead you to this change.

EPOLLERR event will be triggered when an exception occurs. This event will be set
in 'evs.events', we should use 'evs.events' instead of 'rev->epdata.event' to assign
to 'events.epdata.event'. Otherwise, the EPOLLERR event will lost.

Thanks,
Yunjian

> 
> Thanks
> Harman
> 
> >
> > > -----Original Message-----
> > > From: wangyunjian
> > > Sent: Wednesday, August 26, 2020 6:56 PM
> > > To: dev@dpdk.org; hkalra@marvell.com; david.marchand@redhat.com
> > > Cc: 'ferruh.yigit@intel.com' <ferruh.yigit@intel.com>; 'Thomas Monjalon'
> > > <thomas@monjalon.net>; Lilijun (Jerry) <jerry.lilijun@huawei.com>;
> > > xudingke <xudingke@huawei.com>; stable@dpdk.org
> > > Subject: RE: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error
> > > for rte_epoll_event
> > >
> > > Ping for review, please.
> > >
> > > > -----Original Message-----
> > > > From: wangyunjian
> > > > Sent: Wednesday, July 15, 2020 10:40 AM
> > > > To: dev@dpdk.org; hkalra@marvell.com
> > > > Cc: Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> > > > <xudingke@huawei.com>; wangyunjian <wangyunjian@huawei.com>;
> > > > stable@dpdk.org
> > > > Subject: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error for
> > > > rte_epoll_event
> > > >
> > > > From: Yunjian Wang <wangyunjian@huawei.com>
> > > >
> > > > The "rev->epdata.event" assigned to "events.epdata.event"
> > > > directly, which was wrong in case of epoll events. It should be set to the
> "evs.events".
> > > >
> > > > Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")
> > > > Cc: stable@dpdk.org
> > > >
> > > > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> > > > ---
> > > >  lib/librte_eal/linux/eal_interrupts.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/lib/librte_eal/linux/eal_interrupts.c
> > > > b/lib/librte_eal/linux/eal_interrupts.c
> > > > index 13db5c4e8..8a3c95cec 100644
> > > > --- a/lib/librte_eal/linux/eal_interrupts.c
> > > > +++ b/lib/librte_eal/linux/eal_interrupts.c
> > > > @@ -1237,7 +1237,7 @@ eal_epoll_process_event(struct epoll_event
> > > > *evs, unsigned int n,
> > > >  		events[count].status        = RTE_EPOLL_VALID;
> > > >  		events[count].fd            = rev->fd;
> > > >  		events[count].epfd          = rev->epfd;
> > > > -		events[count].epdata.event  = rev->epdata.event;
> > > > +		events[count].epdata.event  = evs[i].events;
> > > >  		events[count].epdata.data   = rev->epdata.data;
> > > >  		if (rev->epdata.cb_fun)
> > > >  			rev->epdata.cb_fun(rev->fd,
> > > > --
> > > > 2.23.0
> > > >
> >
  
Yunjian Wang Nov. 2, 2020, 2:15 a.m. UTC | #7
> -----Original Message-----
> From: wangyunjian
> Sent: Tuesday, September 22, 2020 8:06 PM
> To: 'Harman Kalra' <hkalra@marvell.com>
> Cc: dev@dpdk.org; david.marchand@redhat.com; ferruh.yigit@intel.com;
> Thomas Monjalon <thomas@monjalon.net>; Lilijun (Jerry)
> <jerry.lilijun@huawei.com>; xudingke <xudingke@huawei.com>;
> stable@dpdk.org
> Subject: RE: [EXT] RE: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error for
> rte_epoll_event
> 
> > -----Original Message-----
> > From: Harman Kalra [mailto:hkalra@marvell.com]
> > Sent: Tuesday, September 22, 2020 6:32 PM
> > To: wangyunjian <wangyunjian@huawei.com>
> > Cc: dev@dpdk.org; david.marchand@redhat.com; ferruh.yigit@intel.com;
> > Thomas Monjalon <thomas@monjalon.net>; Lilijun (Jerry)
> > <jerry.lilijun@huawei.com>; xudingke <xudingke@huawei.com>;
> > stable@dpdk.org
> > Subject: Re: [EXT] RE: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set
> > error for rte_epoll_event
> >
> > On Sat, Sep 19, 2020 at 10:42:30AM +0000, wangyunjian wrote:
> > > External Email
> > >
> > > --------------------------------------------------------------------
> > > --
> > > Friendly ping.
> >
> > Hi Wang,
> >
> >    I am sorry for the delay in review, I will surely complete the review
> >    by end of this week.
> >    Can you please elaborate on the specific case/scenario which caused
> >    failure i.e. which lead you to this change.
> 
> EPOLLERR event will be triggered when an exception occurs. This event will be
> set in 'evs.events', we should use 'evs.events' instead of 'rev->epdata.event' to
> assign to 'events.epdata.event'. Otherwise, the EPOLLERR event will lost.
> 
> Thanks,
> Yunjian

Hi Harman,

Is there any ideas on this issue?

> 
> >
> > Thanks
> > Harman
> >
> > >
> > > > -----Original Message-----
> > > > From: wangyunjian
> > > > Sent: Wednesday, August 26, 2020 6:56 PM
> > > > To: dev@dpdk.org; hkalra@marvell.com; david.marchand@redhat.com
> > > > Cc: 'ferruh.yigit@intel.com' <ferruh.yigit@intel.com>; 'Thomas Monjalon'
> > > > <thomas@monjalon.net>; Lilijun (Jerry) <jerry.lilijun@huawei.com>;
> > > > xudingke <xudingke@huawei.com>; stable@dpdk.org
> > > > Subject: RE: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error
> > > > for rte_epoll_event
> > > >
> > > > Ping for review, please.
> > > >
> > > > > -----Original Message-----
> > > > > From: wangyunjian
> > > > > Sent: Wednesday, July 15, 2020 10:40 AM
> > > > > To: dev@dpdk.org; hkalra@marvell.com
> > > > > Cc: Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> > > > > <xudingke@huawei.com>; wangyunjian <wangyunjian@huawei.com>;
> > > > > stable@dpdk.org
> > > > > Subject: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error
> > > > > for rte_epoll_event
> > > > >
> > > > > From: Yunjian Wang <wangyunjian@huawei.com>
> > > > >
> > > > > The "rev->epdata.event" assigned to "events.epdata.event"
> > > > > directly, which was wrong in case of epoll events. It should be
> > > > > set to the
> > "evs.events".
> > > > >
> > > > > Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")
> > > > > Cc: stable@dpdk.org
> > > > >
> > > > > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> > > > > ---
> > > > >  lib/librte_eal/linux/eal_interrupts.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/lib/librte_eal/linux/eal_interrupts.c
> > > > > b/lib/librte_eal/linux/eal_interrupts.c
> > > > > index 13db5c4e8..8a3c95cec 100644
> > > > > --- a/lib/librte_eal/linux/eal_interrupts.c
> > > > > +++ b/lib/librte_eal/linux/eal_interrupts.c
> > > > > @@ -1237,7 +1237,7 @@ eal_epoll_process_event(struct epoll_event
> > > > > *evs, unsigned int n,
> > > > >  		events[count].status        = RTE_EPOLL_VALID;
> > > > >  		events[count].fd            = rev->fd;
> > > > >  		events[count].epfd          = rev->epfd;
> > > > > -		events[count].epdata.event  = rev->epdata.event;
> > > > > +		events[count].epdata.event  = evs[i].events;
> > > > >  		events[count].epdata.data   = rev->epdata.data;
> > > > >  		if (rev->epdata.cb_fun)
> > > > >  			rev->epdata.cb_fun(rev->fd,
> > > > > --
> > > > > 2.23.0
> > > > >
> > >
  
Harman Kalra Dec. 21, 2020, 2:38 p.m. UTC | #8
On Mon, Nov 02, 2020 at 02:15:01AM +0000, wangyunjian wrote:
> > -----Original Message-----
> > From: wangyunjian
> > Sent: Tuesday, September 22, 2020 8:06 PM
> > To: 'Harman Kalra' <hkalra@marvell.com>
> > Cc: dev@dpdk.org; david.marchand@redhat.com; ferruh.yigit@intel.com;
> > Thomas Monjalon <thomas@monjalon.net>; Lilijun (Jerry)
> > <jerry.lilijun@huawei.com>; xudingke <xudingke@huawei.com>;
> > stable@dpdk.org
> > Subject: RE: [EXT] RE: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error for
> > rte_epoll_event
> > 
> > > -----Original Message-----
> > > From: Harman Kalra [mailto:hkalra@marvell.com]
> > > Sent: Tuesday, September 22, 2020 6:32 PM
> > > To: wangyunjian <wangyunjian@huawei.com>
> > > Cc: dev@dpdk.org; david.marchand@redhat.com; ferruh.yigit@intel.com;
> > > Thomas Monjalon <thomas@monjalon.net>; Lilijun (Jerry)
> > > <jerry.lilijun@huawei.com>; xudingke <xudingke@huawei.com>;
> > > stable@dpdk.org
> > > Subject: Re: [EXT] RE: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set
> > > error for rte_epoll_event
> > >
> > > On Sat, Sep 19, 2020 at 10:42:30AM +0000, wangyunjian wrote:
> > > > External Email
> > > >
> > > > --------------------------------------------------------------------
> > > > --
> > > > Friendly ping.
> > >
> > > Hi Wang,
> > >
> > >    I am sorry for the delay in review, I will surely complete the review
> > >    by end of this week.
> > >    Can you please elaborate on the specific case/scenario which caused
> > >    failure i.e. which lead you to this change.
> > 
> > EPOLLERR event will be triggered when an exception occurs. This event will be
> > set in 'evs.events', we should use 'evs.events' instead of 'rev->epdata.event' to
> > assign to 'events.epdata.event'. Otherwise, the EPOLLERR event will lost.
> > 
> > Thanks,
> > Yunjian
> 
> Hi Harman,
> 
> Is there any ideas on this issue?

Hi Yunjian

Fix looks good, apologies for the delay in review.

Acked-by: Harman Kalra <hkalra@marvell.com>

> 
> > 
> > >
> > > Thanks
> > > Harman
> > >
> > > >
> > > > > -----Original Message-----
> > > > > From: wangyunjian
> > > > > Sent: Wednesday, August 26, 2020 6:56 PM
> > > > > To: dev@dpdk.org; hkalra@marvell.com; david.marchand@redhat.com
> > > > > Cc: 'ferruh.yigit@intel.com' <ferruh.yigit@intel.com>; 'Thomas Monjalon'
> > > > > <thomas@monjalon.net>; Lilijun (Jerry) <jerry.lilijun@huawei.com>;
> > > > > xudingke <xudingke@huawei.com>; stable@dpdk.org
> > > > > Subject: RE: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error
> > > > > for rte_epoll_event
> > > > >
> > > > > Ping for review, please.
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: wangyunjian
> > > > > > Sent: Wednesday, July 15, 2020 10:40 AM
> > > > > > To: dev@dpdk.org; hkalra@marvell.com
> > > > > > Cc: Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> > > > > > <xudingke@huawei.com>; wangyunjian <wangyunjian@huawei.com>;
> > > > > > stable@dpdk.org
> > > > > > Subject: [dpdk-dev] [PATCH 1/1] eal/linux: fix event set error
> > > > > > for rte_epoll_event
> > > > > >
> > > > > > From: Yunjian Wang <wangyunjian@huawei.com>
> > > > > >
> > > > > > The "rev->epdata.event" assigned to "events.epdata.event"
> > > > > > directly, which was wrong in case of epoll events. It should be
> > > > > > set to the
> > > "evs.events".
> > > > > >
> > > > > > Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")
> > > > > > Cc: stable@dpdk.org
> > > > > >
> > > > > > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> > > > > > ---
> > > > > >  lib/librte_eal/linux/eal_interrupts.c | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/lib/librte_eal/linux/eal_interrupts.c
> > > > > > b/lib/librte_eal/linux/eal_interrupts.c
> > > > > > index 13db5c4e8..8a3c95cec 100644
> > > > > > --- a/lib/librte_eal/linux/eal_interrupts.c
> > > > > > +++ b/lib/librte_eal/linux/eal_interrupts.c
> > > > > > @@ -1237,7 +1237,7 @@ eal_epoll_process_event(struct epoll_event
> > > > > > *evs, unsigned int n,
> > > > > >  		events[count].status        = RTE_EPOLL_VALID;
> > > > > >  		events[count].fd            = rev->fd;
> > > > > >  		events[count].epfd          = rev->epfd;
> > > > > > -		events[count].epdata.event  = rev->epdata.event;
> > > > > > +		events[count].epdata.event  = evs[i].events;
> > > > > >  		events[count].epdata.data   = rev->epdata.data;
> > > > > >  		if (rev->epdata.cb_fun)
> > > > > >  			rev->epdata.cb_fun(rev->fd,
> > > > > > --
> > > > > > 2.23.0
> > > > > >
> > > >
  
David Marchand Jan. 11, 2021, 2:40 p.m. UTC | #9
On Wed, Jul 15, 2020 at 4:48 AM wangyunjian <wangyunjian@huawei.com> wrote:
>
> From: Yunjian Wang <wangyunjian@huawei.com>
>
> The "rev->epdata.event" assigned to "events.epdata.event" directly, which
> was wrong in case of epoll events. It should be set to the "evs.events".
>
> Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")
> Cc: stable@dpdk.org
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Harman Kalra <hkalra@marvell.com>

Applied, thanks.
  

Patch

diff --git a/lib/librte_eal/linux/eal_interrupts.c b/lib/librte_eal/linux/eal_interrupts.c
index 13db5c4e8..8a3c95cec 100644
--- a/lib/librte_eal/linux/eal_interrupts.c
+++ b/lib/librte_eal/linux/eal_interrupts.c
@@ -1237,7 +1237,7 @@  eal_epoll_process_event(struct epoll_event *evs, unsigned int n,
 		events[count].status        = RTE_EPOLL_VALID;
 		events[count].fd            = rev->fd;
 		events[count].epfd          = rev->epfd;
-		events[count].epdata.event  = rev->epdata.event;
+		events[count].epdata.event  = evs[i].events;
 		events[count].epdata.data   = rev->epdata.data;
 		if (rev->epdata.cb_fun)
 			rev->epdata.cb_fun(rev->fd,