From patchwork Wed Jul 24 06:01:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Somnath Kotur X-Patchwork-Id: 56990 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 092E71C12E; Wed, 24 Jul 2019 08:07:54 +0200 (CEST) Received: from relay.smtp.broadcom.com (unknown [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id E57631C10B for ; Wed, 24 Jul 2019 08:07:43 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (dhcp-10-123-153-55.dhcp.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 0239F1BECFA; Tue, 23 Jul 2019 23:07:42 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 0239F1BECFA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1563948463; bh=Zc9EW1zoWjk98zVC+Z28+KWRkMAmOb7oRnjYEucBVyA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iOhTU4jI2h9qGCoAFaI0UI+bSP6pYOxOEQTzx/gy8acyPakb4V81zrGn2Jr46OZ4q wJOb8CY4cgAh7JcEDoh2PH+e/eVSVj7J8aEjK018f7oUd0a+T8ra4L+FUk5iMUO9Kg VtreshtwkmSo8yalqQTYUEQ9QX6p/E+h7gxPEYuo= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Wed, 24 Jul 2019 11:31:57 +0530 Message-Id: <20190724060158.15571-5-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20190724060158.15571-1-somnath.kotur@broadcom.com> References: <20190724060158.15571-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 4/5] net/bnxt: fix endianness issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kalesh AP 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 Reviewed-by: Somnath Kotur Signed-off-by: Somnath Kotur --- drivers/net/bnxt/bnxt_hwrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);