Skip to contentSkip to conversation

net/ice: fix switch action number check

PATCH Applied Wei Zhao 4 participants 5 messages May 21, 2020 – May 25, 2020 Network drivers

lore
Share & tools
lore

Wei Zhao

author
#0 lore raw

PATCH 1/1 net/ice: fix switch action number check

The action number for switch filter should be 1, any other such as 0 or more than 1 is invalid.

Fixes 3428c6b6ec1f ("net/ice: add action number check for switch")
---
 drivers/net/ice/ice_switch_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ice/ice_switch_filter.c +1 -1
index dd3f4847a..20e8187d3 100644
@@ -1388,7 +1388,7 @@ ice_switch_check_action(const struct rte_flow_action *actions,
 		}
 	}
 
-	if (actions_num > 1) {
+	if (actions_num != 1) {
 		rte_flow_error_set(error,
 				   EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
 				   actions,
Signature · 1 line
2.19.1
author
#1 lore raw

add Qimai

Quoted 36 lines

-----Original Message-----
From: Zhao1, Wei <[email protected]>
Sent: Thursday, May 21, 2020 3:34 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Ye, Xiaolong <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/ice: fix switch action number check

The action number for switch filter should be 1, any other such as 0 or more than 1 is invalid.

Fixes 3428c6b6ec1f ("net/ice: add action number check for switch")
---
 drivers/net/ice/ice_switch_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ice/ice_switch_filter.c +1 -1
index dd3f4847a..20e8187d3 100644
@@ -1388,7 +1388,7 @@ ice_switch_check_action(const struct
 rte_flow_action *actions,
 		}
 	}
 
-	if (actions_num > 1) {
+	if (actions_num != 1) {
 		rte_flow_error_set(error,
 				   EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,

actions,
--
2.19.1

Tested-by on v1 1/1
#2 lore raw
In reply to Wei Zhao

Regards,
Xiao Qimai

Quoted 36 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Wei Zhao
Sent: Thursday, May 21, 2020 3:34 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Ye, Xiaolong <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ice: fix switch action number check

The action number for switch filter should be 1, any other such as 0 or more than 1 is invalid.

Fixes 3428c6b6ec1f ("net/ice: add action number check for switch")
---
 drivers/net/ice/ice_switch_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ice/ice_switch_filter.c +1 -1
index dd3f4847a..20e8187d3 100644
@@ -1388,7 +1388,7 @@ ice_switch_check_action(const struct
 rte_flow_action *actions,
 		}
 	}
 
-	if (actions_num > 1) {
+	if (actions_num != 1) {
 		rte_flow_error_set(error,
 				   EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,

actions,
--
2.19.1

Acked-by on v1 1/1
#3 lore raw
In reply to Wei Zhao
Quoted 10 lines

-----Original Message-----
From: Zhao1, Wei <[email protected]>
Sent: Thursday, May 21, 2020 3:34 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Ye, Xiaolong <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/ice: fix switch action number check

Quoted 7 lines

The action number for switch filter should be 1, any other such as 0 or more than 1 is invalid.

Fixes 3428c6b6ec1f ("net/ice: add action number check for switch")
Applied
#4 lore raw
In reply to Wei Zhao
Quoted 27 lines · Wei Zhao

The action number for switch filter should be 1, any other such as 0 or more than 1 is invalid.

Fixes 3428c6b6ec1f ("net/ice: add action number check for switch")

---
drivers/net/ice/ice_switch_filter.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ice/ice_switch_filter.c +1 -1
index dd3f4847a..20e8187d3 100644
@@ -1388,7 +1388,7 @@ ice_switch_check_action(const struct rte_flow_action *actions,
 		}
 	}
 
-	if (actions_num > 1) {
+	if (actions_num != 1) {
 		rte_flow_error_set(error,
 				   EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
 				   actions,
Signature · 1 line
2.19.1

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