From fc2d87b935bc4365799371404ae2793762c9d633 Mon Sep 17 00:00:00 2001 From: Lance Richardson Date: Thu, 18 Jul 2019 09:06:11 +0530 Subject: [PATCH] net/bnxt: fix RSS context numbers for thor 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") Signed-off-by: Lance Richardson Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 6f3a04514d..cda2c8d1d8 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1733,7 +1733,7 @@ bnxt_hwrm_vnic_rss_cfg_thor(struct bnxt *bp, struct bnxt_vnic_info *vnic) { int i; int rc = 0; - int nr_ctxs = bp->max_ring_grps; + int nr_ctxs = vnic->num_lb_ctxts; struct hwrm_vnic_rss_cfg_input req = {.req_type = 0 }; struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr; @@ -4116,9 +4116,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