[18/22] net/bnxt: pass correct RSS table address for thor

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

Checks

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

Commit Message

Ajit Khaparde July 18, 2019, 3:36 a.m. UTC
  From: Lance Richardson <lance.richardson@broadcom.com>

The current implementation erroneously passes the address of the
beginning of RSS table for each 64-entry context instead of the
address of the appropriate subtable for the context. This results
in only the first 64 receive queues being used. Fix by passing the
correct address for each context.

Fixes: 38412304b50a ("net/bnxt: enable RSS for thor-based controllers")
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 301649d3b..3266c1bec 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4138,7 +4138,9 @@  bnxt_vnic_rss_configure_thor(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 		req.hash_mode_flags = vnic->hash_mode;
 
 		req.ring_grp_tbl_addr =
-		    rte_cpu_to_le_64(vnic->rss_table_dma_addr);
+		    rte_cpu_to_le_64(vnic->rss_table_dma_addr +
+				     i * BNXT_RSS_ENTRIES_PER_CTX_THOR *
+				     2 * sizeof(*ring_tbl));
 		req.hash_key_tbl_addr =
 		    rte_cpu_to_le_64(vnic->rss_hash_key_dma_addr);