From: Kalesh AP Date: Tue, 24 Sep 2019 10:19:45 +0000 (+0530) Subject: net/bnxt: fix endianness while retrieving MTU from FW X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2f225d65423bbd7da67244cdad3a20eb29d67e1f;p=dpdk.git 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 --- 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: