From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 34B321B056 for ; Tue, 19 Jun 2018 23:31:12 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 1E8ED30C07F; Tue, 19 Jun 2018 14:31:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 1E8ED30C07F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1529443871; bh=AKPlHYB4nDzf44sWe4Iw48BZzRXGzomcn5ZC9ycRIz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H91NFUHx/WBT5H91o0svg1n7xrzbqZWrs878AAsKSkU0G+rRLRu/rrn+g2E6FSj7+ 8KOt0fYH+2PKxySmAJ2rxRbkN5DU6zuk7SgDjp3Y82VfugsH39IqpODcnLIqnBP4pb /3mn+d2l4rj0UAzQju8z7IYrCY9143VApsWAUm9A= Received: from C02VPB22HTD6.dhcp.broadcom.net (c02vpb22htd6.dhcp.broadcom.net [10.136.50.120]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 03479AC06AD; Tue, 19 Jun 2018 14:31:10 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Tue, 19 Jun 2018 14:30:57 -0700 Message-Id: <20180619213058.12273-31-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.15.1 (Apple Git-101) In-Reply-To: <20180619213058.12273-1-ajit.khaparde@broadcom.com> References: <20180619213058.12273-1-ajit.khaparde@broadcom.com> Subject: [dpdk-dev] [PATCH 30/31] net/bnxt: allocate RSS context only if RSS mode is enabled. 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: Tue, 19 Jun 2018 21:31:12 -0000 allocate RSS context only if RSS mode is enabled. Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 1145bc195..dfae6e2d2 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -248,6 +248,7 @@ static int bnxt_init_chip(struct bnxt *bp) /* VNIC configuration */ for (i = 0; i < bp->nr_vnics; i++) { + struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; struct bnxt_vnic_info *vnic = &bp->vnic_info[i]; rc = bnxt_hwrm_vnic_alloc(bp, vnic); @@ -257,12 +258,15 @@ static int bnxt_init_chip(struct bnxt *bp) goto err_out; } - rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic); - if (rc) { - PMD_DRV_LOG(ERR, - "HWRM vnic %d ctx alloc failure rc: %x\n", - i, rc); - goto err_out; + /* Alloc RSS context only if RSS mode is enabled */ + if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS) { + rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic); + if (rc) { + PMD_DRV_LOG(ERR, + "HWRM vnic %d ctx alloc failure rc: %x\n", + i, rc); + goto err_out; + } } rc = bnxt_hwrm_vnic_cfg(bp, vnic); -- 2.15.1 (Apple Git-101)