From: Ajit Khaparde Date: Tue, 22 May 2018 18:13:43 +0000 (-0700) Subject: net/bnxt: fix RSS hash configuration X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=44cbeffe77651239cb4d425c61b9ee1cfde27152;p=dpdk.git 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 --- diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 28aa7476d5..b285761ebb 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 733a5a92c6..19d06af55b 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 c60bb543ca..c521d7e5af 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;