From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 603BB1B16D for ; Wed, 24 Jan 2018 02:36:46 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2018 17:36:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,404,1511856000"; d="scan'208";a="25841577" Received: from dpdk26.sh.intel.com ([10.67.110.152]) by orsmga001.jf.intel.com with ESMTP; 23 Jan 2018 17:36:44 -0800 From: Wenzhuo Lu To: dev@dpdk.org Cc: Wenzhuo Lu Date: Wed, 24 Jan 2018 09:38:45 +0800 Message-Id: <1516757925-3746-5-git-send-email-wenzhuo.lu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1516757925-3746-1-git-send-email-wenzhuo.lu@intel.com> References: <1516757925-3746-1-git-send-email-wenzhuo.lu@intel.com> Subject: [dpdk-dev] [PATCH 4/4] net/avf: fix VF RX queue interrupt enabling X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 01:36:46 -0000 As UIO doesn't support multiple interrupt, and the interrupt is occupied by the control plane. PMD should not try to enable RX queue interrupt. Then APP can know the RX queue interrupt is not enabled and only choose the polling mode. Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt") Signed-off-by: Wenzhuo Lu --- drivers/net/avf/avf_ethdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c index b36d317..16e5fc9 100644 --- a/drivers/net/avf/avf_ethdev.c +++ b/drivers/net/avf/avf_ethdev.c @@ -292,7 +292,8 @@ static int avf_config_rx_queues_irqs(struct rte_eth_dev *dev, uint16_t interval, i; int vec; - if (dev->data->dev_conf.intr_conf.rxq != 0) { + if (rte_intr_cap_multiple(intr_handle) && + dev->data->dev_conf.intr_conf.rxq) { if (rte_intr_efd_enable(intr_handle, dev->data->nb_rx_queues)) return -1; } @@ -344,7 +345,9 @@ static int avf_config_rx_queues_irqs(struct rte_eth_dev *dev, vf->msix_base = AVF_MISC_VEC_ID; for (i = 0; i < dev->data->nb_rx_queues; i++) { vf->rxq_map[0] |= 1 << i; - intr_handle->intr_vec[i] = AVF_MISC_VEC_ID; + if (rte_intr_dp_is_en(intr_handle)) + intr_handle->intr_vec[i] = + AVF_MISC_VEC_ID; } PMD_DRV_LOG(DEBUG, "vector 0 are mapping to all Rx queues"); @@ -358,7 +361,8 @@ static int avf_config_rx_queues_irqs(struct rte_eth_dev *dev, vec = AVF_RX_VEC_START; for (i = 0; i < dev->data->nb_rx_queues; i++) { vf->rxq_map[vec] |= 1 << i; - intr_handle->intr_vec[i] = vec++; + if (rte_intr_dp_is_en(intr_handle)) + intr_handle->intr_vec[i] = vec++; if (vec >= vf->nb_msix) vec = AVF_RX_VEC_START; } -- 1.9.3