Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FFE5C433DF for ; Tue, 9 Jun 2020 01:46:59 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 5D55E20775 for ; Tue, 9 Jun 2020 01:46:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D55E20775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 635562BA3; Tue, 9 Jun 2020 03:46:52 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 916FA2B86 for ; Tue, 9 Jun 2020 03:46:50 +0200 (CEST) IronPort-SDR: Tmyd0SQWs+j71obuiIxtCR7SlwkWsRnWlcQpI3iLa4/ux0fud0b5phoKxAyk6PDtR2YXDcu0Xr 7pp5eOBuEC3w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2020 18:46:49 -0700 IronPort-SDR: EO9BCS6/eypuyxJigJiqt6zV7SkbaXfWXShN40nQAcK9LQk5hbstBND7ZQiYRuiMTCjcUGplIj FvdE8z0OiDQw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,490,1583222400"; d="scan'208";a="288664166" Received: from jm-optiplex-5060.sh.intel.com ([10.240.182.61]) by orsmga002.jf.intel.com with ESMTP; 08 Jun 2020 18:46:48 -0700 From: Jiang Mao To: xiaolong.ye@intel.com Cc: dev@dpdk.org, Jiang Mao Date: Tue, 9 Jun 2020 09:37:12 +0800 Message-Id: <20200609013712.27026-2-maox.jiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200609013712.27026-1-maox.jiang@intel.com> References: <20200609013712.27026-1-maox.jiang@intel.com> Subject: [dpdk-dev] [PATCH 2/2] net/i40e: fix fdir allocating msix resource error 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fdir allocating msix resource is not strictly necessary, if no resource left, print a warning message. Signed-off-by: Jiang Mao Fixes: 4861cde461 (i40e: new poll mode driver) --- drivers/net/i40e/i40e_ethdev.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 33ed556c8..acc43077d 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -5744,6 +5744,17 @@ i40e_vsi_setup(struct i40e_pf *pf, vsi->nb_msix = RTE_MIN(vsi->nb_qps, RTE_MAX_RXTX_INTR_VEC_ID); } + } else if (type == I40E_VSI_FDIR) { + ret = i40e_res_pool_alloc(&pf->msix_pool, 1); + if (ret < 0) { + PMD_DRV_LOG(WARNING, "MSIX vectors used up, FDIR can`t bind interrupt"); + vsi->msix_intr = 0; + vsi->nb_msix = 0; + } else { + vsi->msix_intr = ret; + vsi->nb_msix = 1; + } + } else if (type != I40E_VSI_SRIOV) { ret = i40e_res_pool_alloc(&pf->msix_pool, 1); if (ret < 0) { -- 2.17.1