summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@broadcom.com>2018-05-22 11:13:43 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-05-23 00:35:01 +0200
commit44cbeffe77651239cb4d425c61b9ee1cfde27152 (patch)
treeeef1a1d22bbe6b62ca4c2105b8cc0dbee2bdb76e
parent08aa0ebaca2ca9f39df89bccf87cd55baaa5b769 (diff)
downloaddpdk-44cbeffe77651239cb4d425c61b9ee1cfde27152.zip
dpdk-44cbeffe77651239cb4d425c61b9ee1cfde27152.tar.gz
dpdk-44cbeffe77651239cb4d425c61b9ee1cfde27152.tar.xz
net/bnxt: fix RSS hash configuration
While configuring RSS, the FW needs to know the rss_hash_mode that needs to be initialized. Set hash mode to HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT to allow the FW to use the global mode already configured in the device. Fixes: bcd4bcc4426f ("net/bnxt: configure RSS") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
-rw-r--r--drivers/net/bnxt/bnxt_hwrm.c1
-rw-r--r--drivers/net/bnxt/bnxt_vnic.c2
-rw-r--r--drivers/net/bnxt/bnxt_vnic.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 28aa747..b285761 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1462,6 +1462,7 @@ int bnxt_hwrm_vnic_rss_cfg(struct bnxt *bp,
HWRM_PREP(req, VNIC_RSS_CFG);
req.hash_type = rte_cpu_to_le_32(vnic->hash_type);
+ req.hash_mode_flags = vnic->hash_mode;
req.ring_grp_tbl_addr =
rte_cpu_to_le_64(vnic->rss_table_dma_addr);
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 733a5a9..19d06af 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -49,6 +49,8 @@ void bnxt_init_vnics(struct bnxt *bp)
vnic->rss_rule = (uint16_t)HWRM_NA_SIGNATURE;
vnic->cos_rule = (uint16_t)HWRM_NA_SIGNATURE;
vnic->lb_rule = (uint16_t)HWRM_NA_SIGNATURE;
+ vnic->hash_mode =
+ HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT;
for (j = 0; j < MAX_QUEUES_PER_VNIC; j++)
vnic->fw_grp_ids[j] = (uint16_t)HWRM_NA_SIGNATURE;
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index c60bb54..c521d7e 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -25,6 +25,7 @@ struct bnxt_vnic_info {
uint16_t dflt_ring_grp;
uint16_t mru;
uint16_t hash_type;
+ uint8_t hash_mode;
rte_iova_t rss_table_dma_addr;
uint16_t *rss_table;
rte_iova_t rss_hash_key_dma_addr;