[2/7] net/bnxt: use correct number of RSS contexts for thor

Message ID 20190719061906.42451-3-ajit.khaparde@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series bnxt patches |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Ajit Khaparde July 19, 2019, 6:19 a.m. UTC
  From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>

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: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit July 19, 2019, 9:38 p.m. UTC | #1
On 7/19/2019 7:19 AM, Ajit Khaparde wrote:
> From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
> 
> 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: Lance Richardson <lance.richardson@broadcom.com>
> Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>


Squashed into fix of same issue from previous patchset

[17/22] https://patches.dpdk.org/patch/56685/
  

Patch

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 67b5ff661..692c6c399 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1736,7 +1736,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;