net/bnxt: fix jumbo frame configuration in firmware
authorRahul Gupta <rahul.gupta@broadcom.com>
Fri, 15 Nov 2019 09:40:09 +0000 (15:10 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:06 +0000 (17:36 +0100)
In order to prevent reconfiguration of firmware resources for every
MTU change, configure FW with max MTU value using hwrm_func_cfg
to support all frame sizes. There is no need to overwrite the driver
level MTU variable data->mtu with the FW MTU.

Fixes: 905cd45ce30e ("net/bnxt: use configured MTU during load")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_hwrm.c

index 06033e3..b1e831b 100644 (file)
@@ -4582,10 +4582,6 @@ static int bnxt_init_fw(struct bnxt *bp)
        if (rc)
                bp->flags &= ~BNXT_FLAG_FW_CAP_ERROR_RECOVERY;
 
-       if (mtu >= RTE_ETHER_MIN_MTU && mtu <= BNXT_MAX_MTU &&
-           mtu != bp->eth_dev->data->mtu)
-               bp->eth_dev->data->mtu = mtu;
-
        bnxt_hwrm_port_led_qcaps(bp);
 
        return 0;
index 1d3732e..4173008 100644 (file)
@@ -2978,8 +2978,7 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp, int tx_rings)
        }
 
        req.flags = rte_cpu_to_le_32(bp->pf.func_cfg_flags);
-       req.mtu = rte_cpu_to_le_16(RTE_MIN(bp->eth_dev->data->mtu,
-                                          BNXT_MAX_MTU)); //FW adds hdr sizes
+       req.mtu = rte_cpu_to_le_16(BNXT_MAX_MTU);
        req.mru = rte_cpu_to_le_16(BNXT_VNIC_MRU(bp->eth_dev->data->mtu));
        req.num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx);
        req.num_stat_ctxs = rte_cpu_to_le_16(bp->max_stat_ctx);