patch 'net/ice: fix missing bytes when getting EEPROM data' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Nov 20 21:29:38 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

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/22/26. 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9aa7e74ea0ebc1fe1f7687344dcae986e77a4de9

Thanks.

Luca Boccassi

---
>From 9aa7e74ea0ebc1fe1f7687344dcae986e77a4de9 Mon Sep 17 00:00:00 2001
From: Marcel Telka <marcel at telka.sk>
Date: Fri, 13 Nov 2026 11:53:18 +0100
Subject: [PATCH] net/ice: fix missing bytes when getting EEPROM data

[ upstream commit 52475ac3d21619448874c280eed33edebfb0c634 ]

When info->length is not an exact multiple of SFF_READ_BLOCK_SIZE (8),
the final loop iteration reads the correct 8 bytes from the module into
value[], but the guard evaluates false, so the memcpy is skipped
entirely. Since the destination buffer is memset to 0 at function entry,
the trailing length % 8 bytes are silently returned as zero instead of
the real EEPROM content, with no error indication to the caller.

Bugzilla ID: 2091
Fixes: 52569256583a ("net/ice: support module EEPROM")

Signed-off-by: Marcel Telka <marcel at telka.sk>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/ice/ice_ethdev.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 57a9557c2c..4848468ffe 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -5921,6 +5921,8 @@ ice_get_module_eeprom(struct rte_eth_dev *dev,
 		 * SFP modules only ever use page 0.
 		 */
 		if (page == 0 || !(data[0x2] & 0x4)) {
+			uint32_t copy_len;
+
 			/* If i2c bus is busy due to slow page change or
 			 * link management access, call can fail.
 			 * This is normal. So we retry this a few times.
@@ -5948,9 +5950,12 @@ ice_get_module_eeprom(struct rte_eth_dev *dev,
 				break;
 			}
 
-			/* Make sure we have enough room for the new block */
-			if ((i + SFF_READ_BLOCK_SIZE) <= info->length)
-				memcpy(data + i, value, SFF_READ_BLOCK_SIZE);
+			/* Clamp the copy to the bytes actually requested: the final
+			 * block is shorter than SFF_READ_BLOCK_SIZE whenever
+			 * info->length is not a multiple of it.
+			 */
+			copy_len = RTE_MIN((uint32_t)SFF_READ_BLOCK_SIZE, info->length - i);
+			memcpy(data + i, value, copy_len);
 		}
 	}
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-20 20:29:05.557775019 +0000
+++ 0009-net-ice-fix-missing-bytes-when-getting-EEPROM-data.patch	2026-11-20 20:29:05.204110350 +0000
@@ -1 +1 @@
-From 52475ac3d21619448874c280eed33edebfb0c634 Mon Sep 17 00:00:00 2001
+From 9aa7e74ea0ebc1fe1f7687344dcae986e77a4de9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52475ac3d21619448874c280eed33edebfb0c634 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
- drivers/net/intel/ice/ice_ethdev.c | 11 ++++++++---
+ drivers/net/ice/ice_ethdev.c | 11 ++++++++---
@@ -23,5 +24,5 @@
-diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
-index 457c955b2e..3de9840e7c 100644
---- a/drivers/net/intel/ice/ice_ethdev.c
-+++ b/drivers/net/intel/ice/ice_ethdev.c
-@@ -6750,6 +6750,8 @@ ice_get_module_eeprom(struct rte_eth_dev *dev,
+diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
+index 57a9557c2c..4848468ffe 100644
+--- a/drivers/net/ice/ice_ethdev.c
++++ b/drivers/net/ice/ice_ethdev.c
+@@ -5921,6 +5921,8 @@ ice_get_module_eeprom(struct rte_eth_dev *dev,
@@ -36 +37 @@
-@@ -6777,9 +6779,12 @@ ice_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -5948,9 +5950,12 @@ ice_get_module_eeprom(struct rte_eth_dev *dev,


More information about the stable mailing list