* [PATCH 0/3] Ice Tx Scheduler Fixes
@ 2026-01-15 10:38 Ciara Loftus
2026-01-15 10:38 ` [PATCH 1/3] net/ice: check for null before dereferencing Ciara Loftus
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Ciara Loftus @ 2026-01-15 10:38 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
Three fixes for the ice Tx Scheduler: reenable strict priority, fix debug printing and prevent a
potential null dereference.
Ciara Loftus (3):
net/ice: check for null before dereferencing
net/ice: fix priority mode printing in Tx scheduler dump
net/ice: re-enable strict priority on non-root levels
drivers/net/intel/ice/ice_diagnose.c | 2 +-
drivers/net/intel/ice/ice_tm.c | 10 ++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] net/ice: check for null before dereferencing
2026-01-15 10:38 [PATCH 0/3] Ice Tx Scheduler Fixes Ciara Loftus
@ 2026-01-15 10:38 ` Ciara Loftus
2026-01-15 10:41 ` Bruce Richardson
2026-01-15 10:38 ` [PATCH 2/3] net/ice: fix priority mode printing in Tx scheduler dump Ciara Loftus
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Ciara Loftus @ 2026-01-15 10:38 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus, stable
When commiting a new Tx scheduler hierarchy we assume the user has
created a root node. However if they have not, it leads to an invalid
memory access. While this would be an invalid configuration by the user
we should still prevent the invalid memory access from happening. Do so
by ensuring the root node is non null before dereferencing.
Fixes: 715d449a965b ("net/ice: enhance Tx scheduler hierarchy support")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/ice/ice_tm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/ice/ice_tm.c b/drivers/net/intel/ice/ice_tm.c
index f2d8e12181..db895613cc 100644
--- a/drivers/net/intel/ice/ice_tm.c
+++ b/drivers/net/intel/ice/ice_tm.c
@@ -816,8 +816,13 @@ commit_new_hierarchy(struct rte_eth_dev *dev)
uint16_t nodes_created_per_level[ICE_TM_MAX_LAYERS] = {0};
uint8_t q_lvl = ice_get_leaf_level(pf);
uint8_t qg_lvl = q_lvl - 1;
-
struct ice_sched_node *new_vsi_root = hw->vsi_ctx[pf->main_vsi->idx]->sched.vsi_node[0];
+
+ if (sw_root == NULL) {
+ PMD_DRV_LOG(ERR, "No root node defined in TM hierarchy");
+ return -1;
+ }
+
/* handle case where VSI node needs to move DOWN the hierarchy */
while (new_vsi_root->tx_sched_layer < new_root_level) {
if (new_vsi_root->num_children == 0)
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] net/ice: fix priority mode printing in Tx scheduler dump
2026-01-15 10:38 [PATCH 0/3] Ice Tx Scheduler Fixes Ciara Loftus
2026-01-15 10:38 ` [PATCH 1/3] net/ice: check for null before dereferencing Ciara Loftus
@ 2026-01-15 10:38 ` Ciara Loftus
2026-01-15 10:55 ` Bruce Richardson
2026-01-15 10:38 ` [PATCH 3/3] net/ice: re-enable strict priority on non-root levels Ciara Loftus
2026-01-16 14:33 ` [PATCH 0/3] Ice Tx Scheduler Fixes Bruce Richardson
3 siblings, 1 reply; 8+ messages in thread
From: Ciara Loftus @ 2026-01-15 10:38 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus, stable
A value of zero in bit 4 of the generic data means that strict priority
is enabled. Prior to this commit it was being interpreted as WFQ being
enabled. Fix this.
Fixes: ab4eaf9a8a31 ("net/ice: dump Tx scheduling tree")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/ice/ice_diagnose.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/intel/ice/ice_diagnose.c b/drivers/net/intel/ice/ice_diagnose.c
index 298d1eda5c..a58279a116 100644
--- a/drivers/net/intel/ice/ice_diagnose.c
+++ b/drivers/net/intel/ice/ice_diagnose.c
@@ -641,7 +641,7 @@ void print_node(const struct rte_eth_dev_data *ethdata,
fprintf(stream, "\t\t\t\t<tr>\n");
fprintf(stream, "\t\t\t\t\t<td> priority mode</td>\n");
fprintf(stream, "\t\t\t\t\t<td>");
- print_priority_mode(stream, ((data->data.generic >> 4) & 0x1) != 0);
+ print_priority_mode(stream, ((data->data.generic >> 4) & 0x1) == 0);
fprintf(stream, "</td>\n");
fprintf(stream, "\t\t\t\t</tr>\n");
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] net/ice: re-enable strict priority on non-root levels
2026-01-15 10:38 [PATCH 0/3] Ice Tx Scheduler Fixes Ciara Loftus
2026-01-15 10:38 ` [PATCH 1/3] net/ice: check for null before dereferencing Ciara Loftus
2026-01-15 10:38 ` [PATCH 2/3] net/ice: fix priority mode printing in Tx scheduler dump Ciara Loftus
@ 2026-01-15 10:38 ` Ciara Loftus
2026-01-15 10:42 ` Bruce Richardson
2026-01-16 14:33 ` [PATCH 0/3] Ice Tx Scheduler Fixes Bruce Richardson
3 siblings, 1 reply; 8+ messages in thread
From: Ciara Loftus @ 2026-01-15 10:38 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus, stable
Commit 715d449a965b ("net/ice: enhance Tx scheduler hierarchy support")
disabled strict priority on all levels however it will work on all
levels except for the root level. This commit re-enables configurability
of priority on non-root levels.
Fixes: 715d449a965b ("net/ice: enhance Tx scheduler hierarchy support")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/ice/ice_tm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/ice/ice_tm.c b/drivers/net/intel/ice/ice_tm.c
index db895613cc..ff53f2acfd 100644
--- a/drivers/net/intel/ice/ice_tm.c
+++ b/drivers/net/intel/ice/ice_tm.c
@@ -522,7 +522,8 @@ ice_tm_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->parent->children[tm_node->parent->reference_count++] = tm_node;
tm_node->params = *params;
- if (tm_node->priority != 0)
+ /* Priority cannot be configured for the root level */
+ if (tm_node->priority != 0 && level_id == 0)
PMD_DRV_LOG(WARNING, "priority != 0 not supported in level %d", level_id);
if (tm_node->weight != 1 && level_id == 0)
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] net/ice: check for null before dereferencing
2026-01-15 10:38 ` [PATCH 1/3] net/ice: check for null before dereferencing Ciara Loftus
@ 2026-01-15 10:41 ` Bruce Richardson
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2026-01-15 10:41 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev, stable
On Thu, Jan 15, 2026 at 10:38:21AM +0000, Ciara Loftus wrote:
> When commiting a new Tx scheduler hierarchy we assume the user has
> created a root node. However if they have not, it leads to an invalid
> memory access. While this would be an invalid configuration by the user
> we should still prevent the invalid memory access from happening. Do so
> by ensuring the root node is non null before dereferencing.
>
> Fixes: 715d449a965b ("net/ice: enhance Tx scheduler hierarchy support")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] net/ice: re-enable strict priority on non-root levels
2026-01-15 10:38 ` [PATCH 3/3] net/ice: re-enable strict priority on non-root levels Ciara Loftus
@ 2026-01-15 10:42 ` Bruce Richardson
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2026-01-15 10:42 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev, stable
On Thu, Jan 15, 2026 at 10:38:23AM +0000, Ciara Loftus wrote:
> Commit 715d449a965b ("net/ice: enhance Tx scheduler hierarchy support")
> disabled strict priority on all levels however it will work on all
> levels except for the root level. This commit re-enables configurability
> of priority on non-root levels.
>
> Fixes: 715d449a965b ("net/ice: enhance Tx scheduler hierarchy support")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
> drivers/net/intel/ice/ice_tm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] net/ice: fix priority mode printing in Tx scheduler dump
2026-01-15 10:38 ` [PATCH 2/3] net/ice: fix priority mode printing in Tx scheduler dump Ciara Loftus
@ 2026-01-15 10:55 ` Bruce Richardson
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2026-01-15 10:55 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev, stable
On Thu, Jan 15, 2026 at 10:38:22AM +0000, Ciara Loftus wrote:
> A value of zero in bit 4 of the generic data means that strict priority
> is enabled. Prior to this commit it was being interpreted as WFQ being
> enabled. Fix this.
>
> Fixes: ab4eaf9a8a31 ("net/ice: dump Tx scheduling tree")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
The relevant masks and defines are in some way badly named since the field
is therefore for enabling WFQ rather than Strict Priority. Running an AI
analysis of this block returns that the code is correct because it assumes
that the SP bit being enabled means that strict-priority is enabled (where
in datasheet the SP stands for Single Priority!)
Anyway, after checking datasheet agree fix is correct.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> drivers/net/intel/ice/ice_diagnose.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/intel/ice/ice_diagnose.c b/drivers/net/intel/ice/ice_diagnose.c
> index 298d1eda5c..a58279a116 100644
> --- a/drivers/net/intel/ice/ice_diagnose.c
> +++ b/drivers/net/intel/ice/ice_diagnose.c
> @@ -641,7 +641,7 @@ void print_node(const struct rte_eth_dev_data *ethdata,
> fprintf(stream, "\t\t\t\t<tr>\n");
> fprintf(stream, "\t\t\t\t\t<td> priority mode</td>\n");
> fprintf(stream, "\t\t\t\t\t<td>");
> - print_priority_mode(stream, ((data->data.generic >> 4) & 0x1) != 0);
> + print_priority_mode(stream, ((data->data.generic >> 4) & 0x1) == 0);
> fprintf(stream, "</td>\n");
> fprintf(stream, "\t\t\t\t</tr>\n");
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] Ice Tx Scheduler Fixes
2026-01-15 10:38 [PATCH 0/3] Ice Tx Scheduler Fixes Ciara Loftus
` (2 preceding siblings ...)
2026-01-15 10:38 ` [PATCH 3/3] net/ice: re-enable strict priority on non-root levels Ciara Loftus
@ 2026-01-16 14:33 ` Bruce Richardson
3 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2026-01-16 14:33 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Thu, Jan 15, 2026 at 10:38:20AM +0000, Ciara Loftus wrote:
> Three fixes for the ice Tx Scheduler: reenable strict priority, fix debug printing and prevent a
> potential null dereference.
>
> Ciara Loftus (3):
> net/ice: check for null before dereferencing
> net/ice: fix priority mode printing in Tx scheduler dump
> net/ice: re-enable strict priority on non-root levels
>
Series applied to dpdk-next-net-intel.
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-01-16 14:36 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-15 10:38 [PATCH 0/3] Ice Tx Scheduler Fixes Ciara Loftus
2026-01-15 10:38 ` [PATCH 1/3] net/ice: check for null before dereferencing Ciara Loftus
2026-01-15 10:41 ` Bruce Richardson
2026-01-15 10:38 ` [PATCH 2/3] net/ice: fix priority mode printing in Tx scheduler dump Ciara Loftus
2026-01-15 10:55 ` Bruce Richardson
2026-01-15 10:38 ` [PATCH 3/3] net/ice: re-enable strict priority on non-root levels Ciara Loftus
2026-01-15 10:42 ` Bruce Richardson
2026-01-16 14:33 ` [PATCH 0/3] Ice Tx Scheduler Fixes Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox