From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EX13-EDG-OU-001.vmware.com (ex13-edg-ou-001.vmware.com [208.91.0.189]) by dpdk.org (Postfix) with ESMTP id D3EBA3990 for ; Fri, 15 Jul 2016 02:52:51 +0200 (CEST) Received: from sc9-mailhost1.vmware.com (10.113.161.71) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Thu, 14 Jul 2016 17:52:23 -0700 Received: from prmh-edge-ivybridge-01.eng.vmware.com (unknown [10.24.235.72]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id E88DB18540; Thu, 14 Jul 2016 17:52:49 -0700 (PDT) From: Yong Wang To: CC: , Yong Wang Date: Thu, 14 Jul 2016 17:36:11 -0700 Message-ID: <1468542971-48198-1-git-send-email-yongwang@vmware.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: None (EX13-EDG-OU-001.vmware.com: yongwang@vmware.com does not designate permitted sender hosts) Subject: [dpdk-dev] [PATCH] eal: fix rte_intr_dp_is_en() check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 00:52:52 -0000 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 --- 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