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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Nov 16 23:51:52 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/18/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/61070e573816ef22fe4f0ad4d4663c74b6b1ef44

Thanks.

Luca Boccassi

---
>From 61070e573816ef22fe4f0ad4d4663c74b6b1ef44 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/ice/ice_hash.c | 43 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 00d65bc637..237423cba5 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -1273,6 +1273,40 @@ update_symm:
 	return 0;
 }
 
+/* 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,
 		struct rte_flow *flow,
@@ -1308,6 +1342,15 @@ 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) {
 			memcpy(&filter_ptr->rss_cfg.raw, &rss_meta->raw,
 			       sizeof(struct ice_rss_raw_cfg));
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-16 22:52:18.030332222 +0000
+++ 0038-net-ice-fix-RSS-rule-overwriting-an-existing-one.patch	2026-11-16 22:52:16.476233166 +0000
@@ -1 +1 @@
-From 4f1ef37e935ff5f582222a848f80c394a2d5bbf2 Mon Sep 17 00:00:00 2001
+From 61070e573816ef22fe4f0ad4d4663c74b6b1ef44 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4f1ef37e935ff5f582222a848f80c394a2d5bbf2 ]
+
@@ -30 +31,0 @@
-Cc: stable at dpdk.org
@@ -35 +36 @@
- drivers/net/intel/ice/ice_hash.c | 43 ++++++++++++++++++++++++++++++++
+ drivers/net/ice/ice_hash.c | 43 ++++++++++++++++++++++++++++++++++++++
@@ -38,5 +39,5 @@
-diff --git a/drivers/net/intel/ice/ice_hash.c b/drivers/net/intel/ice/ice_hash.c
-index 2930aca228..6643820ae3 100644
---- a/drivers/net/intel/ice/ice_hash.c
-+++ b/drivers/net/intel/ice/ice_hash.c
-@@ -1311,6 +1311,40 @@ update_symm:
+diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
+index 00d65bc637..237423cba5 100644
+--- a/drivers/net/ice/ice_hash.c
++++ b/drivers/net/ice/ice_hash.c
+@@ -1273,6 +1273,40 @@ update_symm:
@@ -49 +50 @@
-+		      const struct ice_hash_flow_cfg *new_cfg)
++		      const struct ice_rss_meta *new_cfg)
@@ -51,2 +52,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;
@@ -82,2 +83,2 @@
- 		void *flow_rule,
-@@ -1332,6 +1366,15 @@ ice_hash_create(struct ice_adapter *ad,
+ 		struct rte_flow *flow,
+@@ -1308,6 +1342,15 @@ ice_hash_create(struct ice_adapter *ad,
@@ -88 +89 @@
-+		if (ice_hash_ptype_in_use(ad, filter_ptr)) {
++		if (ice_hash_ptype_in_use(ad, rss_meta)) {
@@ -96,3 +97,3 @@
- 		if (filter_ptr->rss_cfg.raw.raw_ena) {
- 			ret = ice_hash_add_raw_cfg(ad, &filter_ptr->rss_cfg.raw,
- 						   pf->main_vsi->idx);
+ 		if (rss_meta->raw.raw_ena) {
+ 			memcpy(&filter_ptr->rss_cfg.raw, &rss_meta->raw,
+ 			       sizeof(struct ice_rss_raw_cfg));


More information about the stable mailing list