eal/linux: fix handling of error events from epoll
authorYunjian Wang <wangyunjian@huawei.com>
Wed, 15 Jul 2020 02:40:10 +0000 (10:40 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 11 Jan 2021 14:34:21 +0000 (15:34 +0100)
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>
lib/librte_eal/linux/eal_interrupts.c

index 2f03a61..1dd994b 100644 (file)
@@ -1241,7 +1241,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,