patches for DPDK stable branches
 help / color / Atom feed
From: Harman Kalra <hkalra@marvell.com>
To: <stephen@networkplumber.org>, <jgrajcia@cisco.com>,
	<david.marchand@redhat.com>
Cc: <dev@dpdk.org>, Harman Kalra <hkalra@marvell.com>, <stable@dpdk.org>
Subject: [dpdk-stable] [PATCH v2] eal: fix epoll fd list rebuild
Date: Fri, 19 Jun 2020 19:29:28 +0530
Message-ID: <1592575168-16881-1-git-send-email-hkalra@marvell.com> (raw)
In-Reply-To: <2674031.7s9Q9pJsto@thomas>

An issue has been observed where epoll file descriptor
list rebuilds every time an interrupt/alarm event is
received.

eal_intr_process_interrupts() should notify pipe fd only
if any source is removed from the source list i.e (rv > 0)

Fixes: 0c7ce182a760 ("eal: add pending interrupt callback unregister")
Cc: stable@dpdk.org

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
*V2: missing closing bracket in Fixes tag in V1

 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 16e7a7d51..84eeaa1bc 100644
--- a/lib/librte_eal/linux/eal_interrupts.c
+++ b/lib/librte_eal/linux/eal_interrupts.c
@@ -1010,7 +1010,7 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
 		}
 
 		/* notify the pipe fd waited by epoll_wait to rebuild the wait list */
-		if (rv >= 0 && write(intr_pipe.writefd, "1", 1) < 0) {
+		if (rv > 0 && write(intr_pipe.writefd, "1", 1) < 0) {
 			rte_spinlock_unlock(&intr_lock);
 			return -EPIPE;
 		}
-- 
2.18.0


  parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 13:43 [dpdk-stable] [PATCH] " Harman Kalra
2020-05-24 15:30 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2020-05-25  9:49   ` [dpdk-stable] [EXT] " Harman Kalra
2020-05-27 12:32     ` [dpdk-stable] [dpdk-dev] [EXT] " Harman Kalra
2020-05-27 12:44       ` Harman Kalra
2020-05-27 13:04         ` Thomas Monjalon
2020-05-27 17:19           ` Harman Kalra
2020-06-19 13:59   ` Harman Kalra [this message]
2020-06-24  8:01     ` [dpdk-stable] [dpdk-dev] [PATCH v2] " Thomas Monjalon

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1592575168-16881-1-git-send-email-hkalra@marvell.com \
    --to=hkalra@marvell.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jgrajcia@cisco.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox