From 41a9d881cb86162e8b4e5795f4fcc86281ebaa05 Mon Sep 17 00:00:00 2001 From: Rahul Gupta Date: Fri, 15 Nov 2019 15:10:09 +0530 Subject: [PATCH] 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 Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 4 ---- drivers/net/bnxt/bnxt_hwrm.c | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 06033e3b8f..b1e831b874 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 1d3732eee7..41730089b1 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); -- 2.20.1