Skip to contentSkip to conversation

net/i40e: fix error when create two RSS flow rule

PATCH Applied Wei Zhao 2 participants 3 messages May 9, 2019 – May 14, 2019 Network drivers

lore
Share & tools
lore

Wei Zhao

author
#0 lore raw

PATCH 1/1 net/i40e: fix error when create two RSS flow rule

There is need to refuse to create the second RSS flow rule as only one RSS key and HASH register for each PF port. Users should delete the first rule before setup the second rule.

Fixes ecad87d22383 ("net/i40e: move RSS to flow API")
---
 drivers/net/i40e/i40e_flow.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/i40e/i40e_flow.c +8 -0
index 5447e4e..bca93b6 100644
@@ -4444,6 +4444,14 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
 		}
 	}
 
+	if (rss_info->conf.queue_num) {
+		rte_flow_error_set(error, EINVAL,
+				RTE_FLOW_ERROR_TYPE_ACTION,
+				act,
+				"rss only allow one valid rule");
+		return -rte_errno;
+	}
+
 	/* Parse RSS related parameters from configuration */
 	if (rss->func != RTE_ETH_HASH_FUNCTION_DEFAULT)
 		return rte_flow_error_set
Signature · 1 line
2.7.5
author Tested-by Li WenjieX on v1 1/1
#1 lore raw
Quoted 42 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Thursday, May 9, 2019 11:00 AM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Peng, Yuan <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/i40e: fix error when create two RSS flow rule

There is need to refuse to create the second RSS flow rule as only one RSS key and HASH register for each PF port.
Users should delete the first rule before setup the second rule.

Fixes ecad87d22383 ("net/i40e: move RSS to flow API")
---
 drivers/net/i40e/i40e_flow.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/i40e/i40e_flow.c index renamed from drivers/net/i40e/i40e_flow.c +0 -0

5447e4e..bca93b6 100644

drivers/net/i40e/i40e_flow.c +8 -0
@@ -4444,6 +4444,14 @@ i40e_flow_parse_rss_action(struct rte_eth_dev
 *dev,
 		}
 	}
 
+	if (rss_info->conf.queue_num) {
+		rte_flow_error_set(error, EINVAL,
+				RTE_FLOW_ERROR_TYPE_ACTION,
+				act,
+				"rss only allow one valid rule");
+		return -rte_errno;
+	}
+
 	/* Parse RSS related parameters from configuration */
 	if (rss->func != RTE_ETH_HASH_FUNCTION_DEFAULT)

return rte_flow_error_set
--
2.7.5

Acked-by Applied
#2 lore raw
Quoted 10 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Thursday, May 9, 2019 11:35 AM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Peng, Yuan <[email protected]>; Li, WenjieX A <[email protected]>
Subject: RE: [PATCH] net/i40e: fix error when create two RSS flow rule

Quoted 18 lines
Quoted 16 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Thursday, May 9, 2019 11:00 AM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Peng, Yuan <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/i40e: fix error when create two RSS flow rule

There is need to refuse to create the second RSS flow rule as only one RSS key and HASH register for each PF port.
Users should delete the first rule before setup the second rule.

Fixes ecad87d22383 ("net/i40e: move RSS to flow API")

Applied to dpdk-next-net-intel.

Thanks
Qi