net/ice: fix core dumped issue in switch filter
PATCH 1/1 net/ice: fix core dumped issue in switch filter
The number of queues in queue group should be checked before using it to avoid NULL pointer. This patch fixed the issue.
--- drivers/net/ice/ice_switch_filter.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ice/ice_switch_filter.c +2 -0
@@ -1296,6 +1296,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 =
Signature · 1 line
2.17.1
Hi,
I don't understand your fix log, which pointer is NULL?
Qiming
Quoted 35 lines
-----Original Message-----
From: Jiang, JunyuX <[email protected]>
Sent: Wednesday, April 29, 2020 15:25
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Jiang, JunyuX <[email protected]>; [email protected]
Subject: [PATCH] net/ice: fix core dumped issue in switch filterThe number of queues in queue group should be checked before using it to avoid NULL pointer. This patch fixed the issue.
Fixes 47d460d63233 ("net/ice: rework switch filter")Signed-off-by Junyu Jiang <[email protected]>--- drivers/net/ice/ice_switch_filter.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ice/ice_switch_filter.c +2
-1@@ -1296,6 +1296,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 = --2.17.1
Hi Qiming,
Quoted 10 lines
-----Original Message-----
From: Yang, Qiming <[email protected]>
Sent: Thursday, April 30, 2020 2:53 PM
To: Jiang, JunyuX <[email protected]>; [email protected]
Cc: [email protected]
Subject: RE: [PATCH] net/ice: fix core dumped issue in switch filterHi,
I don't understand your fix log, which pointer is NULL?
The act_qgrop->queue is NULL if act_qgrop->queue_num is 0.
Thanks
Junyu
Regards,
Xiao Qimai
Quoted 35 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Junyu Jiang
Sent: Wednesday, April 29, 2020 3:25 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Jiang, JunyuX <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/ice: fix core dumped issue in switch filterThe number of queues in queue group should be checked before using it to avoid NULL pointer. This patch fixed the issue.
Fixes 47d460d63233 ("net/ice: rework switch filter")Signed-off-by Junyu Jiang <[email protected]>--- drivers/net/ice/ice_switch_filter.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ice/ice_switch_filter.c +2
-1@@ -1296,6 +1296,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 = --2.17.1
PATCH v2 1/1 net/ice: fix core dumped issue in switch filter
In reply to Junyu JiangThe number of queues in queue group should be checked before using it. This patch fixed the issue.
--- drivers/net/ice/ice_switch_filter.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ice/ice_switch_filter.c +2 -0
@@ -1296,6 +1296,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 =
Signature · 1 line
2.17.1
Quoted 36 lines
-----Original Message-----
From: Jiang, JunyuX <[email protected]>
Sent: Wednesday, May 6, 2020 11:05
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Jiang, JunyuX <[email protected]>; [email protected]
Subject: [PATCH v2] net/ice: fix core dumped issue in switch filterThe number of queues in queue group should be checked before using it. This patch fixed the issue.
Fixes 47d460d63233 ("net/ice: rework switch filter")Signed-off-by Junyu Jiang <[email protected]>Tested-by Qimai Xiao <[email protected]>--- drivers/net/ice/ice_switch_filter.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ice/ice_switch_filter.c +2
-1@@ -1296,6 +1296,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 = --2.17.1
Ye Xiaolong
AppliedQuoted 28 lines · Junyu Jiang
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")Signed-off-by Junyu Jiang <[email protected]>Tested-by Qimai Xiao <[email protected]>---
drivers/net/ice/ice_switch_filter.c| 2 ++1 file changed, 2 insertions(+)drivers/net/ice/ice_switch_filter.c +2
-0@@ -1296,6 +1296,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 =Signature · 1 line
2.17.1
Applied to dpdk-next-net-intel, Thanks.
Hi, Junyu
Quoted 26 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Junyu Jiang
Sent: Wednesday, May 6, 2020 11:05 AM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected] X <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v2] net/ice: fix core dumped issue in switch filterThe number of queues in queue group should be checked before using it. This patch fixed the issue.
Fixes 47d460d63233 ("net/ice: rework switch filter")Signed-off-by Junyu Jiang <[email protected]>Tested-by Qimai Xiao <[email protected]>--- drivers/net/ice/ice_switch_filter.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ice/ice_switch_filter.c +0
-0
drivers/net/ice/ice_switch_filter.c ice_switch_parse_action(struct ice_pf *pf, · line 1300
Quoted 5 lines
drivers/net/ice/ice_switch_filter.c +2
-0@@ -1296,6 +1296,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;
Why do you ban the case of queue num =1?
Quoted 5 lines
drivers/net/ice/ice_switch_filter.c +0
-1rule_info->sw_act.fltr_act =ICE_FWD_TO_QGRP ; rule_info->sw_act.fwd_id.q_id = --2.17.1
Get, this is for queue group, thanks.
Quoted 52 lines
-----Original Message-----
From: Zhao1, Wei
Sent: Wednesday, May 20, 2020 5:31 PM
To: Junyu Jiang <[email protected]>; [email protected]
Cc: Yang, Qiming <[email protected]>; Jiang, JunyuX <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH v2] net/ice: fix core dumped issue in switch filterHi, Junyu
Quoted 27 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Junyu Jiang
Sent: Wednesday, May 6, 2020 11:05 AM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected] X <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v2] net/ice: fix core dumped issue in switch filterThe number of queues in queue group should be checked before using it. This patch fixed the issue.
Fixes 47d460d63233 ("net/ice: rework switch filter")Signed-off-by Junyu Jiang <[email protected]>Tested-by Qimai Xiao <[email protected]>--- drivers/net/ice/ice_switch_filter.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ice/ice_switch_filter.c +0
-0drivers/net/ice/ice_switch_filter.c ice_switch_parse_action(struct ice_pf *pf, · line 1300
Quoted 5 lines
drivers/net/ice/ice_switch_filter.c +2
-0@@ -1296,6 +1296,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;Why do you ban the case of queue num =1?
Quoted 5 lines
drivers/net/ice/ice_switch_filter.c +0
-1rule_info->sw_act.fltr_act =ICE_FWD_TO_QGRP ; rule_info->sw_act.fwd_id.q_id = --2.17.1