From 2f225d65423bbd7da67244cdad3a20eb29d67e1f Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Tue, 24 Sep 2019 15:49:45 +0530 Subject: [PATCH] net/bnxt: fix endianness while retrieving MTU from FW In bnxt_hwrm_func_qcfg(), use rte_le_to_cpu_16 while getting the mtu value from command response. Fixes: 905cd45ce30e ("net/bnxt: use configured MTU during load") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 1a1ea1bdef..18e7429a77 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -2882,7 +2882,7 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu) } if (mtu) - *mtu = resp->mtu; + *mtu = rte_le_to_cpu_16(resp->mtu); switch (resp->port_partition_type) { case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_0: -- 2.20.1