From: Wei Zhao Date: Thu, 21 May 2020 07:34:11 +0000 (+0800) Subject: net/ice: fix switch action number check X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=59d3870c7facace93db794a37e136d4a9f6ef0a3 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") Cc: stable@dpdk.org Signed-off-by: Wei Zhao Tested-by: Qimai Xiao Acked-by: Qi Zhang --- diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index dd3f4847aa..20e8187d3a 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -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,