From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5125CA0471 for ; Thu, 18 Jul 2019 05:38:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 252F11BDE0; Thu, 18 Jul 2019 05:37:23 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id B07761BDEC for ; Thu, 18 Jul 2019 05:37:01 +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 5222B30C3A1; Wed, 17 Jul 2019 20:36:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 5222B30C3A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1563421019; bh=xEoPaQPNq3WEzQgiHLhVrczp0ZecbJhViqGSTUiwcwY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VoSAS5xgrCR8Az5o+0vLwNnhYbUkE6wUuNv4eLu58i2vhOGkf7SlJiV0pPipsSW/a aGgGXMbJIvoVMWwqvFXi8nBDkiDalD7T0jaM4sBmMO0rHXj/4vM4dMNRJySORjxRcB 3AWcSICfU9UCT9rwhFuTslwgJNMii8hs5Oi7ii0E= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.122.43.105]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 0763DAC0761; Wed, 17 Jul 2019 20:36:58 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Lance Richardson Date: Thu, 18 Jul 2019 09:06:11 +0530 Message-Id: <20190718033616.37605-18-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190718033616.37605-1-ajit.khaparde@broadcom.com> References: <20190718033616.37605-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 17/22] net/bnxt: use correct number of RSS contexts for thor 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" From: Lance Richardson BCM57500-based adapters use a variable number of RSS contexts depending upon the number of receive rings in use. The current implementation is erroneously using the maximum possible number of RSS contexts instead of the actual number allocated when setting up RSS tables in the adapter. Fix by using the actual number of allocated contexts. Fixes: 38412304b50a ("net/bnxt: enable RSS for thor-based controllers") Reviewed-by: Ajit Khaparde Signed-off-by: Lance Richardson --- drivers/net/bnxt/bnxt_hwrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index a1fa37f16..301649d3b 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -4120,9 +4120,9 @@ bnxt_vnic_rss_configure_thor(struct bnxt *bp, struct bnxt_vnic_info *vnic) struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr; uint8_t *rx_queue_state = bp->eth_dev->data->rx_queue_state; struct hwrm_vnic_rss_cfg_input req = {.req_type = 0 }; - int nr_ctxs = bp->max_ring_grps; struct bnxt_rx_queue **rxqs = bp->rx_queues; uint16_t *ring_tbl = vnic->rss_table; + int nr_ctxs = vnic->num_lb_ctxts; int max_rings = bp->rx_nr_rings; int i, j, k, cnt; int rc = 0; -- 2.20.1 (Apple Git-117)