From 8d7bdc8c13fb34c1ca5c2ea08943a5c89ebe1a99 Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Thu, 24 Oct 2019 13:14:19 +0530 Subject: [PATCH] net/bnxt: fix writing MTU to FW We are currently writing the MAX supported MTU size even though the MTU passed by the application is a different value. Configure the application specified MTU instead. Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde Signed-off-by: Somnath Kotur --- drivers/net/bnxt/bnxt_hwrm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 3eedd08ee2..c777c73bdf 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -2956,7 +2956,8 @@ 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(BNXT_MAX_MTU); + req.mtu = rte_cpu_to_le_16(RTE_MIN(bp->eth_dev->data->mtu, + BNXT_MAX_MTU)); //FW adds hdr sizes 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