summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul Gupta <rahul.gupta@broadcom.com>2019-11-15 15:10:09 +0530
committerAjit Khaparde <ajit.khaparde@broadcom.com>2019-11-19 10:55:47 -0800
commitb4d0980d828874e38fe4d1d79360afd5e476efaf (patch)
treea86469ac9e334c9e4a59b2d4b7621824fbe3fa9d
parentc5be81ef7c54cdc1e619ea5b1e75e7f400d5d7fe (diff)
downloaddpdk-next-net-brcm-b4d0980d828874e38fe4d1d79360afd5e476efaf.zip
dpdk-next-net-brcm-b4d0980d828874e38fe4d1d79360afd5e476efaf.tar.gz
dpdk-next-net-brcm-b4d0980d828874e38fe4d1d79360afd5e476efaf.tar.xz
net/bnxt: fix jumbo frame configuration in firmware
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>
-rw-r--r--drivers/net/bnxt/bnxt_ethdev.c4
-rw-r--r--drivers/net/bnxt/bnxt_hwrm.c3
2 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 06033e3..b1e831b 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 1d3732e..4173008 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -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);