From: Yong Wang <yongwang@vmware.com>
To: <david.marchand@6wind.com>
Cc: <dev@dpdk.org>, Yong Wang <yongwang@vmware.com>
Subject: [PATCH] eal: fix rte_intr_dp_is_en() check
Date: Thu, 14 Jul 2016 17:36:11 -0700 [thread overview]
Message-ID: <1468542971-48198-1-git-send-email-yongwang@vmware.com> (raw)
When binding a device to igb_uio with intr_conf.rxq set to 1, nb_efd
is 1 (for link event) but rte_intr_dp_is_en() will still return true.
rte_intr_dp_is_en() should also consider intr_handle type in addition
to nb_efd.
Signed-off-by: Yong Wang <yongwang@vmware.com>
---
lib/librte_eal/linuxapp/eal/eal_interrupts.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 47a3b20..71f63e9 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -1200,7 +1200,8 @@ rte_intr_efd_disable(struct rte_intr_handle *intr_handle)
int
rte_intr_dp_is_en(struct rte_intr_handle *intr_handle)
{
- return !(!intr_handle->nb_efd);
+ return (!(!intr_handle->nb_efd) &&
+ (intr_handle->type == RTE_INTR_HANDLE_VFIO_MSIX));
}
int
--
1.9.1
next reply other threads:[~2016-07-15 0:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-15 0:36 Yong Wang [this message]
2016-07-18 6:19 ` [PATCH] eal: fix rte_intr_dp_is_en() check Liang, Cunming
2016-07-18 9:21 ` Thomas Monjalon
2016-07-19 21:58 ` Yong Wang
2016-07-20 7:03 ` Liang, Cunming
2016-07-20 8:41 ` Thomas Monjalon
2016-07-20 8:56 ` Liang, Cunming
Reply instructions:
You may reply publicly 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=1468542971-48198-1-git-send-email-yongwang@vmware.com \
--to=yongwang@vmware.com \
--cc=david.marchand@6wind.com \
--cc=dev@dpdk.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.