Skip to contentSkip to conversation

net/ice: ignore error when remove RSS rule

PATCH Applied Qi Zhang 2 participants 2 messages Nov 14, 2019 Network drivers

lore
Share & tools
lore

Qi Zhang

author
#0 lore raw

PATCH v2 1/1 net/ice: ignore error when remove RSS rule

Currently, multiple rte_flow RSS rules may map to the same hardware rule if a later rule is just for input set change or symm turn on/off. So after one of the rules be destroyed, we will get error ICE_ERR_DOES_NOT_EXIST when destroying any other rules. The patch simply fixes this by ignoring this error. A more sophisticated fix that remember the sequence and replay properly will be provided in the future.

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

---

v2:
- fix couple typo

 drivers/net/ice/ice_hash.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/ice/ice_hash.c +6 -1
index d88434305..2e9c1bc67 100644
@@ -536,7 +536,12 @@ ice_hash_destroy(struct ice_adapter *ad,
 		ret = ice_rem_rss_cfg(hw, vsi->idx,
 				filter_ptr->rss_cfg.hashed_flds,
 				filter_ptr->rss_cfg.packet_hdr);
-		if (ret) {
+		/* Fixme: Ignore the error if a rule does not exist.
+		 * Currently a rule for inputset change or symm turn on/off
+		 * will overwrite an exist rule, while application still
+		 * have 2 rte_flow handles.
+		 **/
+		if (ret && ret != ICE_ERR_DOES_NOT_EXIST) {
 			rte_flow_error_set(error, EINVAL,
 					RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 					"rss flow destroy fail");
Signature · 1 line
2.13.6
Applied
#1 lore raw
Quoted 40 lines · Qi Zhang

Currently, multiple rte_flow RSS rules may map to the same hardware rule if a later rule is just for input set change or symm turn on/off. So after one of the rules be destroyed, we will get error ICE_ERR_DOES_NOT_EXIST when destroying any other rules. The patch simply fixes this by ignoring this error. A more sophisticated fix that remember the sequence and replay properly will be provided in the future.

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

---

v2:
- fix couple typo

drivers/net/ice/ice_hash.c | 7 ++++++-

1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/ice/ice_hash.c +6 -1
index d88434305..2e9c1bc67 100644
@@ -536,7 +536,12 @@ ice_hash_destroy(struct ice_adapter *ad,
 		ret = ice_rem_rss_cfg(hw, vsi->idx,
 				filter_ptr->rss_cfg.hashed_flds,
 				filter_ptr->rss_cfg.packet_hdr);
-		if (ret) {
+		/* Fixme: Ignore the error if a rule does not exist.
+		 * Currently a rule for inputset change or symm turn on/off
+		 * will overwrite an exist rule, while application still
+		 * have 2 rte_flow handles.
+		 **/
+		if (ret && ret != ICE_ERR_DOES_NOT_EXIST) {
 			rte_flow_error_set(error, EINVAL,
 					RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 					"rss flow destroy fail");
Signature · 1 line
2.13.6

Applied to dpdk-next-net-intel, Thanks.