patch 'net/ice/base: fix endian format' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Tue Oct 25 17:06:49 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/01/22. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/26b64ce3a27cb58eb0a9acd7db00182996d13056

Thanks.

Kevin

---
>From 26b64ce3a27cb58eb0a9acd7db00182996d13056 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang at intel.com>
Date: Mon, 15 Aug 2022 03:31:22 -0400
Subject: [PATCH] net/ice/base: fix endian format

[ upstream commit 843a099aa29fe554bf5e5ff2295eac6615d055b5 ]

A few functions failed to properly convert some values into Little
Endian format before sending them to the firmware. This will produce
incorrect results when running on a Big Endian platform.

Fix this by adding the necessary CPU_TO_LE* macros around the input
to firmware.

These issues were detected by sparse.

Fixes: 0f61c2af88c8 ("net/ice/base: add set/get GPIO helper functions")

Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
Acked-by: Qiming Yang <qiming.yang at intel.com>
---
 drivers/net/ice/base/ice_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index fec51e3237..c6fc32fbc6 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -3933,5 +3933,5 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw,
 	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_read_topo_dev_nvm);
 
-	desc.datalen = data_size;
+	desc.datalen = CPU_TO_LE16(data_size);
 	ice_memcpy(&cmd->topo_params, topo_params, sizeof(*topo_params),
 		   ICE_NONDMA_TO_NONDMA);
@@ -5587,5 +5587,5 @@ ice_aq_set_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, bool value,
 	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_set_gpio);
 	cmd = &desc.params.read_write_gpio;
-	cmd->gpio_ctrl_handle = gpio_ctrl_handle;
+	cmd->gpio_ctrl_handle = CPU_TO_LE16(gpio_ctrl_handle);
 	cmd->gpio_num = pin_idx;
 	cmd->gpio_val = value ? 1 : 0;
@@ -5615,5 +5615,5 @@ ice_aq_get_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,
 	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_gpio);
 	cmd = &desc.params.read_write_gpio;
-	cmd->gpio_ctrl_handle = gpio_ctrl_handle;
+	cmd->gpio_ctrl_handle = CPU_TO_LE16(gpio_ctrl_handle);
 	cmd->gpio_num = pin_idx;
 
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.757221114 +0100
+++ 0054-net-ice-base-fix-endian-format.patch	2022-10-25 14:18:58.427798148 +0100
@@ -1 +1 @@
-From 843a099aa29fe554bf5e5ff2295eac6615d055b5 Mon Sep 17 00:00:00 2001
+From 26b64ce3a27cb58eb0a9acd7db00182996d13056 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 843a099aa29fe554bf5e5ff2295eac6615d055b5 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 57602a31e1..cb06fdf42b 100644
+index fec51e3237..c6fc32fbc6 100644
@@ -29 +30 @@
-@@ -4029,5 +4029,5 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw,
+@@ -3933,5 +3933,5 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw,
@@ -36 +37 @@
-@@ -5683,5 +5683,5 @@ ice_aq_set_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, bool value,
+@@ -5587,5 +5587,5 @@ ice_aq_set_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, bool value,
@@ -43 +44 @@
-@@ -5711,5 +5711,5 @@ ice_aq_get_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,
+@@ -5615,5 +5615,5 @@ ice_aq_get_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,



More information about the stable mailing list