[dpdk-stable] patch 'net/i40e/base: read LLDP config area with correct endianness' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Wed Nov 21 17:47:32 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.1

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/27/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 3feb1e9eb8faf906eee3991db764ff593e7772f5 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang at intel.com>
Date: Tue, 25 Sep 2018 10:34:30 +0800
Subject: [PATCH] net/i40e/base: read LLDP config area with correct endianness

[ upstream commit b72611a2743c4198e3b031cf120e0bd432256c83 ]

The NVM is in little endian so when we read from it we need to do
the correct thing for the endianness of the machine.

Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
Acked-by: Beilei Xing <beilei.xing at intel.com>
---
 drivers/net/i40e/base/i40e_dcb.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index 7600c9227..c93b633c6 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -1292,4 +1292,5 @@ static enum i40e_status_code _i40e_read_lldp_cfg(struct i40e_hw *hw,
 	u32 address, offset = (2 * word_offset);
 	enum i40e_status_code ret;
+	__le16 raw_mem;
 	u16 mem;
 
@@ -1298,10 +1299,11 @@ static enum i40e_status_code _i40e_read_lldp_cfg(struct i40e_hw *hw,
 		return ret;
 
-	ret = i40e_aq_read_nvm(hw, 0x0, module * 2, sizeof(mem), &mem, true,
-			       NULL);
+	ret = i40e_aq_read_nvm(hw, 0x0, module * 2, sizeof(raw_mem), &raw_mem,
+			       true, NULL);
 	i40e_release_nvm(hw);
 	if (ret != I40E_SUCCESS)
 		return ret;
 
+	mem = LE16_TO_CPU(raw_mem);
 	/* Check if this pointer needs to be read in word size or 4K sector
 	 * units.
@@ -1316,10 +1318,11 @@ static enum i40e_status_code _i40e_read_lldp_cfg(struct i40e_hw *hw,
 		goto err_lldp_cfg;
 
-	ret = i40e_aq_read_nvm(hw, module, offset, sizeof(mem), &mem, true,
-			       NULL);
+	ret = i40e_aq_read_nvm(hw, module, offset, sizeof(raw_mem), &raw_mem,
+			       true, NULL);
 	i40e_release_nvm(hw);
 	if (ret != I40E_SUCCESS)
 		return ret;
 
+	mem = LE16_TO_CPU(raw_mem);
 	offset = mem + word_offset;
 	offset *= 2;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 16:44:31.431133104 +0000
+++ 0018-net-i40e-base-read-LLDP-config-area-with-correct-end.patch	2018-11-21 16:44:30.000000000 +0000
@@ -1,13 +1,13 @@
-From b72611a2743c4198e3b031cf120e0bd432256c83 Mon Sep 17 00:00:00 2001
+From 3feb1e9eb8faf906eee3991db764ff593e7772f5 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang at intel.com>
 Date: Tue, 25 Sep 2018 10:34:30 +0800
 Subject: [PATCH] net/i40e/base: read LLDP config area with correct endianness
 
+[ upstream commit b72611a2743c4198e3b031cf120e0bd432256c83 ]
+
 The NVM is in little endian so when we read from it we need to do
 the correct thing for the endianness of the machine.
 
-Cc: stable at dpdk.org
-
 Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
 Acked-by: Beilei Xing <beilei.xing at intel.com>
 ---
@@ -15,16 +15,16 @@
  1 file changed, 7 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
-index 7cd444bb3..a26f82b3a 100644
+index 7600c9227..c93b633c6 100644
 --- a/drivers/net/i40e/base/i40e_dcb.c
 +++ b/drivers/net/i40e/base/i40e_dcb.c
-@@ -1263,4 +1263,5 @@ static enum i40e_status_code _i40e_read_lldp_cfg(struct i40e_hw *hw,
+@@ -1292,4 +1292,5 @@ static enum i40e_status_code _i40e_read_lldp_cfg(struct i40e_hw *hw,
  	u32 address, offset = (2 * word_offset);
  	enum i40e_status_code ret;
 +	__le16 raw_mem;
  	u16 mem;
  
-@@ -1269,10 +1270,11 @@ static enum i40e_status_code _i40e_read_lldp_cfg(struct i40e_hw *hw,
+@@ -1298,10 +1299,11 @@ static enum i40e_status_code _i40e_read_lldp_cfg(struct i40e_hw *hw,
  		return ret;
  
 -	ret = i40e_aq_read_nvm(hw, 0x0, module * 2, sizeof(mem), &mem, true,
@@ -38,7 +38,7 @@
 +	mem = LE16_TO_CPU(raw_mem);
  	/* Check if this pointer needs to be read in word size or 4K sector
  	 * units.
-@@ -1287,10 +1289,11 @@ static enum i40e_status_code _i40e_read_lldp_cfg(struct i40e_hw *hw,
+@@ -1316,10 +1318,11 @@ static enum i40e_status_code _i40e_read_lldp_cfg(struct i40e_hw *hw,
  		goto err_lldp_cfg;
  
 -	ret = i40e_aq_read_nvm(hw, module, offset, sizeof(mem), &mem, true,


More information about the stable mailing list