[6/7] net/bnxt: fix endianness while retrieving MTU from FW
diff mbox series

Message ID 20191014000120.3020-7-ajit.khaparde@broadcom.com
State Accepted, archived
Headers show
Series
  • patchset for bnxt
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ajit Khaparde Oct. 14, 2019, 12:01 a.m. UTC
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

In bnxt_hwrm_func_qcfg(), use rte_le_to_cpu_16 while getting
the mtu value from command response.

Fixes: 905cd45ce30ef ("net/bnxt: use configured MTU during load")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

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: