summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul Gupta <rahul.gupta@broadcom.com>2019-11-15 15:10:09 +0530
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-20 17:36:06 +0100
commit41a9d881cb86162e8b4e5795f4fcc86281ebaa05 (patch)
treedf8e8681c7cef79d32296dc80f8cc9f390b79383
parent89a0deb866dc42ead92b79e6e7159622e1ab8490 (diff)
downloaddpdk-next-net-intel-41a9d881cb86162e8b4e5795f4fcc86281ebaa05.zip
dpdk-next-net-intel-41a9d881cb86162e8b4e5795f4fcc86281ebaa05.tar.gz
dpdk-next-net-intel-41a9d881cb86162e8b4e5795f4fcc86281ebaa05.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);