From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E32BA9E7 for ; Mon, 18 Jul 2016 08:19:08 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 17 Jul 2016 23:19:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,382,1464678000"; d="scan'208";a="1023723849" Received: from shwdeisgchi017.ccr.corp.intel.com (HELO [10.239.66.156]) ([10.239.66.156]) by fmsmga002.fm.intel.com with ESMTP; 17 Jul 2016 23:19:07 -0700 From: "Liang, Cunming" To: Yong Wang Cc: dev@dpdk.org, david.marchand@6wind.com References: <1468542971-48198-1-git-send-email-yongwang@vmware.com> Message-ID: <578C74D9.1030907@intel.com> Date: Mon, 18 Jul 2016 14:19:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <1468542971-48198-1-git-send-email-yongwang@vmware.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [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: Mon, 18 Jul 2016 06:19:09 -0000 Hi Yong, rte_intr_dp_is_en() returns true when rte_intr_efd_enable() (the way to enable data-path interrupt) sets a number of event fds. In this case, "intr_conf.rxq=1" configuration causes "nb_efd=1". The value comes from RTE_MIN($nb_efd, 1) from data-path, but not from link event. Per link event, you shouldn't use rte_intr_dp_is_en() as the indication. As igb_uio only has a single vector, when the conflict(both intr_rxq and intr_lsc turn on) happens, the intr_rxq has high priority than intr_lsc as default PMD behavior. Reference as PG 3.1.9 note in http://dpdk.org/doc/guides/prog_guide/env_abstraction_layer.html Regards, Cunming On 7/15/2016 8:36 AM, Yong Wang wrote: > 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