From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 480E9A04DD for ; Wed, 28 Oct 2020 11:46:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3AE7CC9D6; Wed, 28 Oct 2020 11:46:49 +0100 (CET) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by dpdk.org (Postfix) with ESMTP id 44564C9D6 for ; Wed, 28 Oct 2020 11:46:46 +0100 (CET) Received: by mail-wm1-f50.google.com with SMTP id e2so4290112wme.1 for ; Wed, 28 Oct 2020 03:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=85UYsFOeuiVGhlj2HxzlFqBtc4fYUZOlGxoOxlQ2ftc=; b=VK+vXFBZZ4v3s+zAPIJzK2dRxqbMUGvxlhbUiR0NqdIji8ZPW6Pbmuq1wuBDd2mY9T LKvRCQf5KRnr0YGHfx/lqwQFygurXCr95TiVjPQgnBdT5AedhbpKv0PpYIoWxDzLWD7Z n7Bik8ECg9zt611P3A3hQKUeSyUymzm09KSdrNNtAegZaea6Pb2MExZrtfZMmgqOAAmY ajcdMh0lvuxnB6PhIuXE3cAHdPngJ2HJlqcovq4nTYvDOlr5rTajqxUSGGjPmBFzfXsk 4WrmCARh+1B275WDxXXgvynU8+KW39wLMVydccQ2JBuMbUZYqviFI7fSB1TyHmZ/Smpq pBPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=85UYsFOeuiVGhlj2HxzlFqBtc4fYUZOlGxoOxlQ2ftc=; b=TcjaF+VNCX16CvZnn2vs3aTFeldjFHCbw44Kv8zM+Lxr5ladk+R0p7pVfmnPyRvwfV 2QPFm8SMgn7tnt99cceaZcsWRCGChthn5jJqb5jiqoUWb0IFYBQ0f4U72YcpsOL1I3UQ 1gKc92pMv+k7NvBBuVf/CN1nL5xmC7+Znanf0NAMYmYR7+GI618OzYVks4QeRM2WXGOE KELXDenAQbhvHZv4CgkLAS4kqf0Z6SPvInMQswHtuj7c7stGT5BpMfkFcRoYOBGVFFxH SN5M6gd1ep05mOU3eJzXvpwvHi7GgVIzzqcsIstMjvvHWKLJMiNJX2KZEMXdocgUR2aE UVmA== X-Gm-Message-State: AOAM532eSp6yNbfiN2yl7/KXggJVwMR5prYnbNAKsQy31IckahiPa2OQ vHcYe1C1ioViB/WGClbN6YyB3q3cQgKLHg== X-Google-Smtp-Source: ABdhPJzDcL7ZMMO+PXgsCIuImDs3vhY2e6Ae1RElhjLYI7LV7iLTV1PyKwjcs/cfGiB/7KlQNHojWg== X-Received: by 2002:a1c:f417:: with SMTP id z23mr7142017wma.57.1603882005050; Wed, 28 Oct 2020 03:46:45 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id m8sm6047962wrw.17.2020.10.28.03.46.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:46:44 -0700 (PDT) From: luca.boccassi@gmail.com To: Kalesh AP Cc: Ajit Khaparde , Somnath Kotur , dpdk stable Date: Wed, 28 Oct 2020 10:42:50 +0000 Message-Id: <20201028104606.3504127-11-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix endianness while setting L4 destination port' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From d874855ddca76ecec37ff7cd5a6ed26f41a26225 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Fri, 28 Aug 2020 10:31:07 +0530 Subject: [PATCH] net/bnxt: fix endianness while setting L4 destination port [ upstream commit d51a43f4343d35d850e6173ca3770ab3ef117adb ] Use "req.tunnel_dst_port_val" in bnxt_hwrm_tunnel_dst_port_alloc() as big endian since hwrm spec mandates this field in network byte order. Also, fixed the endianness while parsing the command output. Fixes: 10d074b2022d ("net/bnxt: support tunneling") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_hwrm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 15ec7248c2..f78563e944 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -3350,17 +3350,19 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port, HWRM_PREP(req, TUNNEL_DST_PORT_ALLOC, BNXT_USE_CHIMP_MB); req.tunnel_type = tunnel_type; - req.tunnel_dst_port_val = port; + req.tunnel_dst_port_val = rte_cpu_to_be_16(port); rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB); HWRM_CHECK_RESULT(); switch (tunnel_type) { case HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN: - bp->vxlan_fw_dst_port_id = resp->tunnel_dst_port_id; + bp->vxlan_fw_dst_port_id = + rte_le_to_cpu_16(resp->tunnel_dst_port_id); bp->vxlan_port = port; break; case HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE: - bp->geneve_fw_dst_port_id = resp->tunnel_dst_port_id; + bp->geneve_fw_dst_port_id = + rte_le_to_cpu_16(resp->tunnel_dst_port_id); bp->geneve_port = port; break; default: -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:12.132975745 +0000 +++ 0011-net-bnxt-fix-endianness-while-setting-L4-destination.patch 2020-10-28 10:35:11.412828670 +0000 @@ -1,15 +1,16 @@ -From d51a43f4343d35d850e6173ca3770ab3ef117adb Mon Sep 17 00:00:00 2001 +From d874855ddca76ecec37ff7cd5a6ed26f41a26225 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Fri, 28 Aug 2020 10:31:07 +0530 Subject: [PATCH] net/bnxt: fix endianness while setting L4 destination port +[ upstream commit d51a43f4343d35d850e6173ca3770ab3ef117adb ] + Use "req.tunnel_dst_port_val" in bnxt_hwrm_tunnel_dst_port_alloc() as big endian since hwrm spec mandates this field in network byte order. Also, fixed the endianness while parsing the command output. Fixes: 10d074b2022d ("net/bnxt: support tunneling") -Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde @@ -19,12 +20,12 @@ 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c -index f534f20159..c1af814040 100644 +index 15ec7248c2..f78563e944 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c -@@ -3620,17 +3620,19 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port, +@@ -3350,17 +3350,19 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port, - HWRM_PREP(&req, HWRM_TUNNEL_DST_PORT_ALLOC, BNXT_USE_CHIMP_MB); + HWRM_PREP(req, TUNNEL_DST_PORT_ALLOC, BNXT_USE_CHIMP_MB); req.tunnel_type = tunnel_type; - req.tunnel_dst_port_val = port; + req.tunnel_dst_port_val = rte_cpu_to_be_16(port);