[4/5] net/bnxt: fix endianness issue

Message ID 20190724060158.15571-5-somnath.kotur@broadcom.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series bnxt patches |

Checks

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

Commit Message

Somnath Kotur July 24, 2019, 6:01 a.m. UTC
  From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

Use rte_cpu_to_le_16/32 while parsing the hwrm command response.

Fixes: 11e5e19695c7bfb3 ("net/bnxt: support redirecting tunnel packets to VF")

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

Patch

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 1587ca1..39c71bc 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4567,7 +4567,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();
 
@@ -4589,7 +4589,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);