patch 'net/iavf: 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:03:38 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/2cae837e690de79b14d2d999c50d1bc0caa53dd6

Thanks.

Kevin

---
>From 2cae837e690de79b14d2d999c50d1bc0caa53dd6 Mon Sep 17 00:00:00 2001
From: Anurag Mandal <anurag.mandal at intel.com>
Date: Mon, 26 Oct 2026 10:47:11 +0000
Subject: [PATCH] net/iavf: fix RSS rule overwriting an existing one

[ upstream commit d9ef24d60ad1cc6c40ee00aec3864e1fa78f0b5d ]

An RSS flow rule only selects the hash input set of a packet type, and
the PF keeps a single configuration per packet type for the VF VSI.
When a second rule is created for a packet type already used by another
rule, the PF silently replaces the first configuration, 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. The existing rule has to
be destroyed first to change the hash input set of that packet type.
Raw pattern rules are not checked, as their packet type is only known
by the PF parser.

Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF")

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

diff --git a/drivers/net/intel/iavf/iavf_hash.c b/drivers/net/intel/iavf/iavf_hash.c
index 0e85cd26a5..e7ac3b234e 100644
--- a/drivers/net/intel/iavf/iavf_hash.c
+++ b/drivers/net/intel/iavf/iavf_hash.c
@@ -1571,4 +1571,42 @@ error:
 }
 
+/* Check duplicate packet type RSS rule in same VSI */
+static bool
+iavf_hash_ptype_in_use(struct iavf_adapter *ad,
+		       const struct virtchnl_proto_hdrs *hdrs)
+{
+	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);
+	const struct virtchnl_rss_cfg *cfg;
+	struct rte_flow *flow;
+	bool found = false;
+	int i;
+
+	/* the packet type of a raw pattern is only known by the PF parser */
+	if (hdrs->count == 0)
+		return false;
+
+	rte_spinlock_lock(&vf->flow_ops_lock);
+	TAILQ_FOREACH(flow, &vf->flow_list, node) {
+		cfg = flow->rule;
+		if (flow->engine != &iavf_hash_engine || cfg == NULL ||
+		    cfg->proto_hdrs.tunnel_level != hdrs->tunnel_level ||
+		    cfg->proto_hdrs.count != hdrs->count)
+			continue;
+
+		for (i = 0; i < hdrs->count; i++) {
+			if (cfg->proto_hdrs.proto_hdr[i].type != hdrs->proto_hdr[i].type)
+				break;
+		}
+
+		if (i == hdrs->count) {
+			found = true;
+			break;
+		}
+	}
+	rte_spinlock_unlock(&vf->flow_ops_lock);
+
+	return found;
+}
+
 static int
 iavf_hash_create(__rte_unused struct iavf_adapter *ad,
@@ -1580,4 +1618,14 @@ iavf_hash_create(__rte_unused struct iavf_adapter *ad,
 	int ret = 0;
 
+	/* Reject duplicate packet type rule in same VSI */
+	if (iavf_hash_ptype_in_use(ad, &rss_meta->proto_hdrs)) {
+		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");
+		rte_free(meta);
+		return -rte_errno;
+	}
+
 	rss_cfg = rte_zmalloc("iavf rss rule",
 			      sizeof(struct virtchnl_rss_cfg), 0);
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:47.497903509 +0000
+++ 0292-net-iavf-fix-RSS-rule-overwriting-an-existing-one.patch	2026-12-03 12:52:39.235177499 +0000
@@ -1 +1 @@
-From d9ef24d60ad1cc6c40ee00aec3864e1fa78f0b5d Mon Sep 17 00:00:00 2001
+From 2cae837e690de79b14d2d999c50d1bc0caa53dd6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d9ef24d60ad1cc6c40ee00aec3864e1fa78f0b5d ]
+
@@ -28 +29,0 @@
-Cc: stable at dpdk.org
@@ -33,2 +34,2 @@
- drivers/net/intel/iavf/iavf_hash.c | 47 ++++++++++++++++++++++++++++++
- 1 file changed, 47 insertions(+)
+ drivers/net/intel/iavf/iavf_hash.c | 48 ++++++++++++++++++++++++++++++
+ 1 file changed, 48 insertions(+)
@@ -37 +38 @@
-index fe5d725064..c079511898 100644
+index 0e85cd26a5..e7ac3b234e 100644
@@ -40 +41 @@
-@@ -1572,4 +1572,42 @@ error:
+@@ -1571,4 +1571,42 @@ error:
@@ -82,2 +83,2 @@
- iavf_hash_create(struct iavf_adapter *ad,
-@@ -1580,4 +1618,13 @@ iavf_hash_create(struct iavf_adapter *ad,
+ iavf_hash_create(__rte_unused struct iavf_adapter *ad,
+@@ -1580,4 +1618,14 @@ iavf_hash_create(__rte_unused struct iavf_adapter *ad,
@@ -87 +88 @@
-+	if (iavf_hash_ptype_in_use(ad, &rss_cfg->proto_hdrs)) {
++	if (iavf_hash_ptype_in_use(ad, &rss_meta->proto_hdrs)) {
@@ -91,0 +93 @@
++		rte_free(meta);
@@ -95,2 +97,2 @@
- 	ret = iavf_add_del_rss_cfg(ad, rss_cfg, true);
- 	if (!ret) {
+ 	rss_cfg = rte_zmalloc("iavf rss rule",
+ 			      sizeof(struct virtchnl_rss_cfg), 0);



More information about the stable mailing list