From: Junyu Jiang Date: Wed, 6 May 2020 03:05:25 +0000 (+0000) Subject: net/ice: fix crash in switch filter X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1f8672be4208e897e0d1004f43dadcac80749f68;p=dpdk.git net/ice: fix crash in switch filter The number of queues in queue group should be checked before using it. This patch fixed the issue. Fixes: 47d460d63233 ("net/ice: rework switch filter") Cc: stable@dpdk.org Signed-off-by: Junyu Jiang Tested-by: Qimai Xiao Acked-by: Qiming Yang --- diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 72bb22395b..1bea7e807c 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -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 =