net/ice/base: add command to LLDP
[dpdk.git] / drivers / net / ice / ice_switch_filter.c
index 72bb223..20e8187 100644 (file)
@@ -1297,6 +1297,8 @@ ice_switch_parse_action(struct ice_pf *pf,
                switch (action_type) {
                case RTE_FLOW_ACTION_TYPE_RSS:
                        act_qgrop = action->conf;
+                       if (act_qgrop->queue_num <= 1)
+                               goto error;
                        rule_info->sw_act.fltr_act =
                                ICE_FWD_TO_QGRP;
                        rule_info->sw_act.fwd_id.q_id =
@@ -1386,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,
@@ -1501,6 +1503,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
                goto error;
        }
 
+       memset(&rule_info, 0, sizeof(rule_info));
        rule_info.tun_type = tun_type;
 
        ret = ice_switch_check_action(actions, error);