net/bnxt: fix RSS hash configuration
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Tue, 22 May 2018 18:13:43 +0000 (11:13 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 22 May 2018 22:35:01 +0000 (00:35 +0200)
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>
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_vnic.c
drivers/net/bnxt/bnxt_vnic.h

index 28aa747..b285761 100644 (file)
@@ -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);
index 733a5a9..19d06af 100644 (file)
@@ -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;
index c60bb54..c521d7e 100644 (file)
@@ -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;