Skip to content

Commit

Permalink
net/bnxt: fix writing MTU to FW
Browse files Browse the repository at this point in the history
[ upstream commit 8d7bdc8 ]

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: b7778e8 ("net/bnxt: refactor to properly allocate resources for PF/VF")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
  • Loading branch information
ajitkhaparde authored and kevintraynor committed Dec 10, 2019
1 parent 044ad35 commit c55fdd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/bnxt/bnxt_hwrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2529,7 +2529,8 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp, int tx_rings)
HWRM_FUNC_CFG_INPUT_ENABLES_NUM_VNICS |
HWRM_FUNC_CFG_INPUT_ENABLES_NUM_HW_RING_GRPS);
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);
Expand Down

0 comments on commit c55fdd8

Please sign in to comment.