From: Kalesh AP Date: Thu, 25 Jul 2019 04:59:48 +0000 (+0530) Subject: net/bnxt: fix endianness X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ebbc8f27f1eb23bbe9e7572e152f2ae42b5dc4f1;p=dpdk.git net/bnxt: fix endianness Use rte_cpu_to_le_16/32 while parsing the hwrm command response. Fixes: 11e5e19695c7 ("net/bnxt: support redirecting tunnel packets to VF") Signed-off-by: Kalesh AP Signed-off-by: Somnath Kotur --- diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index c1b117e3d6..6128f0f791 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -4571,7 +4571,7 @@ int bnxt_hwrm_tunnel_redirect_query(struct bnxt *bp, uint32_t *type) HWRM_CHECK_RESULT(); if (type) - *type = resp->tunnel_mask; + *type = rte_le_to_cpu_32(resp->tunnel_mask); HWRM_UNLOCK(); @@ -4593,7 +4593,7 @@ int bnxt_hwrm_tunnel_redirect_info(struct bnxt *bp, uint8_t tun_type, HWRM_CHECK_RESULT(); if (dst_fid) - *dst_fid = resp->dest_fid; + *dst_fid = rte_le_to_cpu_16(resp->dest_fid); PMD_DRV_LOG(DEBUG, "dst_fid: %x\n", resp->dest_fid);