patch 'net/ice: fix overflow on storing devargs' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Oct 27 12:50:39 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 10/29/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/f178cab50fe65108813ab0db9170c7a60432e8ce

Thanks.

Luca Boccassi

---
>From f178cab50fe65108813ab0db9170c7a60432e8ce Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Mon, 14 Sep 2026 16:30:19 +0100
Subject: [PATCH] net/ice: fix overflow on storing devargs

[ upstream commit 69b7cd8f29700f7cb1a5f5587f3847e71ae87a49 ]

Boolean device args to ice driver are sometimes stored as an int and
sometimes as a uint8_t. The parse bool function stores them as an int,
leading to overflow when storing a uint8_t value.

Fix all these by standardizing on "bool" type, both for the arg values
in the structure and inside the parsing function.

Bugzilla ID: 2037
Fixes: 603beeb970b5 ("net/ice: add safe mode devarg")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 drivers/net/ice/ice_ethdev.c | 11 ++++++-----
 drivers/net/ice/ice_ethdev.h |  8 ++++----
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 81f1ca51644..75933428cb4 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1007,7 +1007,7 @@ ice_init_mac_address(struct rte_eth_dev *dev)
 		return -ENOMEM;
 	}
 	/* store it to dev data */
-	if (ad->devargs.default_mac_disable != 1)
+	if (!ad->devargs.default_mac_disable)
 		rte_ether_addr_copy((struct rte_ether_addr *)hw->port_info[0].mac.perm_addr,
 			&dev->data->mac_addrs[0]);
 	return 0;
@@ -1037,7 +1037,7 @@ ice_add_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr)
 	struct ice_adapter *ad = (struct ice_adapter *)hw->back;
 	int ret = 0;
 
-	if (ad->devargs.default_mac_disable == 1 && rte_is_same_ether_addr(mac_addr,
+	if (ad->devargs.default_mac_disable && rte_is_same_ether_addr(mac_addr,
 			(struct rte_ether_addr *)hw->port_info[0].mac.perm_addr)) {
 		PMD_DRV_LOG(ERR, "This Default MAC filter is disabled.");
 		return 0;
@@ -2045,7 +2045,7 @@ ice_base_queue_get(struct ice_pf *pf)
 static int
 parse_bool(const char *key, const char *value, void *args)
 {
-	int *i = args;
+	bool *i = args;
 
 	if (value == NULL || value[0] == '\0') {
 		PMD_DRV_LOG(WARNING, "key:\"%s\", requires a value, which must be 0 or 1", key);
@@ -2592,7 +2592,7 @@ ice_dev_init(struct rte_eth_dev *dev)
 	}
 
 	if (ret) {
-		if (ad->devargs.safe_mode_support == 0) {
+		if (!ad->devargs.safe_mode_support) {
 			PMD_INIT_LOG(ERR, "Failed to load the DDP package,"
 					"Use safe-mode-support=1 to enter Safe Mode");
 			goto err_init_fw;
@@ -3695,7 +3695,8 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
 {
 	struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
 	uint32_t val, val_tx;
-	int rx_low_latency, i;
+	bool rx_low_latency;
+	int i;
 
 	rx_low_latency = vsi->adapter->devargs.rx_low_latency;
 	for (i = 0; i < nb_queue; i++) {
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index 653e7455265..0dc3f0224c6 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -553,14 +553,14 @@ struct ice_pf {
  * Cache devargs parse result.
  */
 struct ice_devargs {
-	int rx_low_latency;
-	int safe_mode_support;
+	bool rx_low_latency;
+	bool safe_mode_support;
 	uint8_t proto_xtr_dflt;
-	uint8_t default_mac_disable;
+	bool default_mac_disable;
 	uint8_t proto_xtr[ICE_MAX_QUEUE_NUM];
 	uint8_t pin_idx;
 	uint8_t pps_out_ena;
-	uint8_t ddp_load_sched;
+	bool ddp_load_sched;
 	uint8_t tm_exposed_levels;
 	int xtr_field_offs;
 	uint8_t xtr_flag_offs[PROTO_XTR_MAX];
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-10-27 11:43:59.275690442 +0000
+++ 0145-net-ice-fix-overflow-on-storing-devargs.patch	2026-10-27 11:43:53.674064401 +0000
@@ -1 +1 @@
-From 69b7cd8f29700f7cb1a5f5587f3847e71ae87a49 Mon Sep 17 00:00:00 2001
+From f178cab50fe65108813ab0db9170c7a60432e8ce Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 69b7cd8f29700f7cb1a5f5587f3847e71ae87a49 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -20,9 +21,9 @@
- drivers/net/intel/ice/ice_ethdev.c | 13 +++++++------
- drivers/net/intel/ice/ice_ethdev.h | 10 +++++-----
- 2 files changed, 12 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
-index 1bb185356e..0caae39f29 100644
---- a/drivers/net/intel/ice/ice_ethdev.c
-+++ b/drivers/net/intel/ice/ice_ethdev.c
-@@ -1090,7 +1090,7 @@ ice_init_mac_address(struct rte_eth_dev *dev)
+ drivers/net/ice/ice_ethdev.c | 11 ++++++-----
+ drivers/net/ice/ice_ethdev.h |  8 ++++----
+ 2 files changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
+index 81f1ca51644..75933428cb4 100644
+--- a/drivers/net/ice/ice_ethdev.c
++++ b/drivers/net/ice/ice_ethdev.c
+@@ -1007,7 +1007,7 @@ ice_init_mac_address(struct rte_eth_dev *dev)
@@ -37 +38 @@
-@@ -1120,7 +1120,7 @@ ice_add_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr)
+@@ -1037,7 +1037,7 @@ ice_add_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr)
@@ -46,10 +47 @@
-@@ -1770,7 +1770,7 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
- 		 */
- 		vsi_ctx.info.sw_id = hw->port_info->sw_id;
- 		/* Source Prune */
--		if (ad->devargs.source_prune != 1) {
-+		if (!ad->devargs.source_prune) {
- 			/* Disable source prune to support VRRP
- 			 * when source-prune devarg is not set
- 			 */
-@@ -2144,7 +2144,7 @@ ice_base_queue_get(struct ice_pf *pf)
+@@ -2045,7 +2045,7 @@ ice_base_queue_get(struct ice_pf *pf)
@@ -64 +56 @@
-@@ -2763,7 +2763,7 @@ ice_dev_init(struct rte_eth_dev *dev)
+@@ -2592,7 +2592,7 @@ ice_dev_init(struct rte_eth_dev *dev)
@@ -73 +65 @@
-@@ -4314,7 +4314,8 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
+@@ -3695,7 +3695,8 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
@@ -83,5 +75,5 @@
-diff --git a/drivers/net/intel/ice/ice_ethdev.h b/drivers/net/intel/ice/ice_ethdev.h
-index e39757e842..39583cff38 100644
---- a/drivers/net/intel/ice/ice_ethdev.h
-+++ b/drivers/net/intel/ice/ice_ethdev.h
-@@ -627,16 +627,16 @@ struct ice_pf {
+diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
+index 653e7455265..0dc3f0224c6 100644
+--- a/drivers/net/ice/ice_ethdev.h
++++ b/drivers/net/ice/ice_ethdev.h
+@@ -553,14 +553,14 @@ struct ice_pf {
@@ -104,4 +95,0 @@
--	uint8_t source_prune;
-+	bool source_prune;
- 	uint32_t rl_burst_size;
- 	int link_state_on_close;
@@ -108,0 +97 @@
+ 	uint8_t xtr_flag_offs[PROTO_XTR_MAX];


More information about the stable mailing list