patch 'net/ice: fix RSS rule overwriting an existing one' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:05:29 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

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

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

Thanks.

Kevin

---
>From 954bdf5a251e25087afd953c73c13a537335c46e Mon Sep 17 00:00:00 2001
From: Anurag Mandal <anurag.mandal at intel.com>
Date: Tue, 3 Nov 2026 06:44:38 +0000
Subject: [PATCH] net/ice: fix RSS rule overwriting an existing one

[ upstream commit 4f1ef37e935ff5f582222a848f80c394a2d5bbf2 ]

An RSS flow rule only selects the hash input set of a packet type,
& the hardware keeps a single RSS profile per packet type for a
port or the PF VSI.
When a second rule is created for a packet type already used by
another rule, the existing profile is silently replaced, while both
flow handles remain valid.
For example:
  flow create 0 ingress pattern eth / vlan vid is 1500 / ipv6 / end
    actions rss types ipv6 l3-dst-only end queues end / end
  flow create 0 ingress pattern eth / vlan vid is 2640 / ipv6 / end
    actions rss types ipv6 l3-src-only end queues end / end

Only the second rule is applied, whatever the VLAN ID of the packet,
and destroying it, leaves the first rule without any hardware
configuration.

Reject the creation of an RSS rule when another RSS rule of the port
already uses the same protocol header stack.
An outer VLAN header is ignored in the comparison, as it does not
change the packet type.
The existing rule has to be destroyed first to change the hash input
set of that packet type.

Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")

Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/intel/ice/ice_hash.c | 43 ++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/drivers/net/intel/ice/ice_hash.c b/drivers/net/intel/ice/ice_hash.c
index aa6a21c055..d905d63aae 100644
--- a/drivers/net/intel/ice/ice_hash.c
+++ b/drivers/net/intel/ice/ice_hash.c
@@ -1274,4 +1274,38 @@ update_symm:
 }
 
+/* Check duplicate packet type RSS rule in same port */
+static bool
+ice_hash_ptype_in_use(struct ice_adapter *ad,
+		      const struct ice_rss_meta *new_cfg)
+{
+	const struct ice_rss_hash_cfg *hash = &new_cfg->cfg;
+	const struct ice_rss_raw_cfg *raw = &new_cfg->raw;
+	const struct ice_hash_flow_cfg *cfg;
+	struct rte_flow *flow;
+
+	/* flow_ops_lock is held by ice_flow_create() */
+	TAILQ_FOREACH(flow, &ad->pf.flow_list, node) {
+		cfg = flow->rule;
+		if (flow->engine != &ice_hash_engine || cfg->simple_xor ||
+		    cfg->rss_cfg.raw.raw_ena != raw->raw_ena)
+			continue;
+
+		if (raw->raw_ena) {
+			if (ice_find_first_bit(cfg->rss_cfg.raw.prof.ptypes, ICE_FLOW_PTYPE_MAX) ==
+			    ice_find_first_bit(raw->prof.ptypes, ICE_FLOW_PTYPE_MAX))
+				return true;
+			continue;
+		}
+
+		/* an outer VLAN header does not change the packet type */
+		if (cfg->rss_cfg.hash.hdr_type == hash->hdr_type &&
+		    !((cfg->rss_cfg.hash.addl_hdrs ^ hash->addl_hdrs) &
+		      ~ICE_FLOW_SEG_HDR_VLAN))
+			return true;
+	}
+
+	return false;
+}
+
 static int
 ice_hash_create(struct ice_adapter *ad,
@@ -1309,4 +1343,13 @@ ice_hash_create(struct ice_adapter *ad,
 		goto out;
 	} else {
+		/* Reject duplicate packet type rule in same port */
+		if (ice_hash_ptype_in_use(ad, rss_meta)) {
+			PMD_DRV_LOG(ERR, "RSS rule for this packet type already exists");
+			rte_flow_error_set(error, EEXIST,
+					   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+					   "RSS rule for this packet type already exists");
+			goto error;
+		}
+
 		if (rss_meta->raw.raw_ena) {
 			filter_ptr->rss_cfg.raw = rss_meta->raw;
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:50.591771012 +0000
+++ 0403-net-ice-fix-RSS-rule-overwriting-an-existing-one.patch	2026-12-03 12:52:39.309106967 +0000
@@ -1 +1 @@
-From 4f1ef37e935ff5f582222a848f80c394a2d5bbf2 Mon Sep 17 00:00:00 2001
+From 954bdf5a251e25087afd953c73c13a537335c46e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4f1ef37e935ff5f582222a848f80c394a2d5bbf2 ]
+
@@ -30 +31,0 @@
-Cc: stable at dpdk.org
@@ -39 +40 @@
-index 2930aca228..6643820ae3 100644
+index aa6a21c055..d905d63aae 100644
@@ -42 +43 @@
-@@ -1312,4 +1312,38 @@ update_symm:
+@@ -1274,4 +1274,38 @@ update_symm:
@@ -48 +49 @@
-+		      const struct ice_hash_flow_cfg *new_cfg)
++		      const struct ice_rss_meta *new_cfg)
@@ -50,2 +51,2 @@
-+	const struct ice_rss_hash_cfg *hash = &new_cfg->rss_cfg.hash;
-+	const struct ice_rss_raw_cfg *raw = &new_cfg->rss_cfg.raw;
++	const struct ice_rss_hash_cfg *hash = &new_cfg->cfg;
++	const struct ice_rss_raw_cfg *raw = &new_cfg->raw;
@@ -81 +82 @@
-@@ -1333,4 +1367,13 @@ ice_hash_create(struct ice_adapter *ad,
+@@ -1309,4 +1343,13 @@ ice_hash_create(struct ice_adapter *ad,
@@ -85 +86 @@
-+		if (ice_hash_ptype_in_use(ad, filter_ptr)) {
++		if (ice_hash_ptype_in_use(ad, rss_meta)) {
@@ -93,2 +94,2 @@
- 		if (filter_ptr->rss_cfg.raw.raw_ena) {
- 			ret = ice_hash_add_raw_cfg(ad, &filter_ptr->rss_cfg.raw,
+ 		if (rss_meta->raw.raw_ena) {
+ 			filter_ptr->rss_cfg.raw = rss_meta->raw;



More information about the stable mailing list