DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice: fix core dumped issue in switch filter
@ 2020-04-29  7:25 Junyu Jiang
  2020-04-30  6:52 ` Yang, Qiming
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Junyu Jiang @ 2020-04-29  7:25 UTC (permalink / raw)
  To: dev; +Cc: Qiming Yang, Junyu Jiang, stable

The 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")
Cc: stable@dpdk.org

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 179430136..c2762e331 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ice: fix core dumped issue in switch filter
  2020-04-29  7:25 [dpdk-dev] [PATCH] net/ice: fix core dumped issue in switch filter Junyu Jiang
@ 2020-04-30  6:52 ` Yang, Qiming
  2020-04-30  7:42   ` Jiang, JunyuX
  2020-04-30  9:09 ` Xiao, QimaiX
  2020-05-06  3:05 ` [dpdk-dev] [PATCH v2] " Junyu Jiang
  2 siblings, 1 reply; 9+ messages in thread
From: Yang, Qiming @ 2020-04-30  6:52 UTC (permalink / raw)
  To: Jiang, JunyuX, dev; +Cc: stable

Hi, 
I don't understand your fix log, which pointer is NULL?

Qiming

> -----Original Message-----
> From: Jiang, JunyuX <junyux.jiang@intel.com>
> Sent: Wednesday, April 29, 2020 15:25
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Jiang, JunyuX
> <junyux.jiang@intel.com>; stable@dpdk.org
> Subject: [PATCH] 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.
> 
> Fixes: 47d460d63233 ("net/ice: rework switch filter")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
> ---
>  drivers/net/ice/ice_switch_filter.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ice/ice_switch_filter.c
> b/drivers/net/ice/ice_switch_filter.c
> index 179430136..c2762e331 100644
> --- a/drivers/net/ice/ice_switch_filter.c
> +++ b/drivers/net/ice/ice_switch_filter.c
> @@ -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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ice: fix core dumped issue in switch filter
  2020-04-30  6:52 ` Yang, Qiming
@ 2020-04-30  7:42   ` Jiang, JunyuX
  0 siblings, 0 replies; 9+ messages in thread
From: Jiang, JunyuX @ 2020-04-30  7:42 UTC (permalink / raw)
  To: Yang, Qiming, dev; +Cc: stable

Hi Qiming,

> -----Original Message-----
> From: Yang, Qiming <qiming.yang@intel.com>
> Sent: Thursday, April 30, 2020 2:53 PM
> To: Jiang, JunyuX <junyux.jiang@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: RE: [PATCH] net/ice: fix core dumped issue in switch filter
> 
> Hi,
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ice: fix core dumped issue in switch filter
  2020-04-29  7:25 [dpdk-dev] [PATCH] net/ice: fix core dumped issue in switch filter Junyu Jiang
  2020-04-30  6:52 ` Yang, Qiming
@ 2020-04-30  9:09 ` Xiao, QimaiX
  2020-05-06  3:05 ` [dpdk-dev] [PATCH v2] " Junyu Jiang
  2 siblings, 0 replies; 9+ messages in thread
From: Xiao, QimaiX @ 2020-04-30  9:09 UTC (permalink / raw)
  To: Jiang, JunyuX, dev; +Cc: Yang, Qiming, Jiang, JunyuX, stable

Tested-by: Xiao, QimaiX <qimaix.xiao@intel.com>

Regards,
Xiao Qimai


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Junyu Jiang
> Sent: Wednesday, April 29, 2020 3:25 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Jiang, JunyuX
> <junyux.jiang@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] 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.
> 
> Fixes: 47d460d63233 ("net/ice: rework switch filter")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
> ---
>  drivers/net/ice/ice_switch_filter.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ice/ice_switch_filter.c
> b/drivers/net/ice/ice_switch_filter.c
> index 179430136..c2762e331 100644
> --- a/drivers/net/ice/ice_switch_filter.c
> +++ b/drivers/net/ice/ice_switch_filter.c
> @@ -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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v2] net/ice: fix core dumped issue in switch filter
  2020-04-29  7:25 [dpdk-dev] [PATCH] net/ice: fix core dumped issue in switch filter Junyu Jiang
  2020-04-30  6:52 ` Yang, Qiming
  2020-04-30  9:09 ` Xiao, QimaiX
@ 2020-05-06  3:05 ` Junyu Jiang
  2020-05-06  6:30   ` Yang, Qiming
                     ` (2 more replies)
  2 siblings, 3 replies; 9+ messages in thread
From: Junyu Jiang @ 2020-05-06  3:05 UTC (permalink / raw)
  To: dev; +Cc: Qiming Yang, Junyu Jiang, stable

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 <junyux.jiang@intel.com>
Tested-by: Qimai Xiao <qimaix.xiao@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 179430136..c2762e331 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ice: fix core dumped issue in switch filter
  2020-05-06  3:05 ` [dpdk-dev] [PATCH v2] " Junyu Jiang
@ 2020-05-06  6:30   ` Yang, Qiming
  2020-05-06  8:57   ` [dpdk-dev] [dpdk-stable] " Ye Xiaolong
  2020-05-20  9:31   ` [dpdk-dev] " Zhao1, Wei
  2 siblings, 0 replies; 9+ messages in thread
From: Yang, Qiming @ 2020-05-06  6:30 UTC (permalink / raw)
  To: Jiang, JunyuX, dev; +Cc: stable

Acked-by: Qiming Yang <qiming.yang@intel.com>

> -----Original Message-----
> From: Jiang, JunyuX <junyux.jiang@intel.com>
> Sent: Wednesday, May 6, 2020 11:05
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Jiang, JunyuX
> <junyux.jiang@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/ice: fix core dumped issue 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 <junyux.jiang@intel.com>
> Tested-by: Qimai Xiao <qimaix.xiao@intel.com>
> ---
>  drivers/net/ice/ice_switch_filter.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ice/ice_switch_filter.c
> b/drivers/net/ice/ice_switch_filter.c
> index 179430136..c2762e331 100644
> --- a/drivers/net/ice/ice_switch_filter.c
> +++ b/drivers/net/ice/ice_switch_filter.c
> @@ -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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] net/ice: fix core dumped issue in switch filter
  2020-05-06  3:05 ` [dpdk-dev] [PATCH v2] " Junyu Jiang
  2020-05-06  6:30   ` Yang, Qiming
@ 2020-05-06  8:57   ` Ye Xiaolong
  2020-05-20  9:31   ` [dpdk-dev] " Zhao1, Wei
  2 siblings, 0 replies; 9+ messages in thread
From: Ye Xiaolong @ 2020-05-06  8:57 UTC (permalink / raw)
  To: Junyu Jiang; +Cc: dev, Qiming Yang, stable

On 05/06, Junyu Jiang wrote:
>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 <junyux.jiang@intel.com>
>Tested-by: Qimai Xiao <qimaix.xiao@intel.com>
>---
> drivers/net/ice/ice_switch_filter.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
>index 179430136..c2762e331 100644
>--- a/drivers/net/ice/ice_switch_filter.c
>+++ b/drivers/net/ice/ice_switch_filter.c
>@@ -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
>

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ice: fix core dumped issue in switch filter
  2020-05-06  3:05 ` [dpdk-dev] [PATCH v2] " Junyu Jiang
  2020-05-06  6:30   ` Yang, Qiming
  2020-05-06  8:57   ` [dpdk-dev] [dpdk-stable] " Ye Xiaolong
@ 2020-05-20  9:31   ` Zhao1, Wei
  2020-05-20  9:32     ` Zhao1, Wei
  2 siblings, 1 reply; 9+ messages in thread
From: Zhao1, Wei @ 2020-05-20  9:31 UTC (permalink / raw)
  To: Jiang, JunyuX, dev; +Cc: Yang, Qiming, Jiang, JunyuX, stable

Hi, Junyu

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Junyu Jiang
> Sent: Wednesday, May 6, 2020 11:05 AM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; guinanx.sun@intel.com X
> <junyux.jiang@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] net/ice: fix core dumped issue 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 <junyux.jiang@intel.com>
> Tested-by: Qimai Xiao <qimaix.xiao@intel.com>
> ---
>  drivers/net/ice/ice_switch_filter.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ice/ice_switch_filter.c
> b/drivers/net/ice/ice_switch_filter.c
> index 179430136..c2762e331 100644
> --- a/drivers/net/ice/ice_switch_filter.c
> +++ b/drivers/net/ice/ice_switch_filter.c
> @@ -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?

>  			rule_info->sw_act.fltr_act =
>  				ICE_FWD_TO_QGRP;
>  			rule_info->sw_act.fwd_id.q_id =
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ice: fix core dumped issue in switch filter
  2020-05-20  9:31   ` [dpdk-dev] " Zhao1, Wei
@ 2020-05-20  9:32     ` Zhao1, Wei
  0 siblings, 0 replies; 9+ messages in thread
From: Zhao1, Wei @ 2020-05-20  9:32 UTC (permalink / raw)
  To: Jiang, JunyuX, dev; +Cc: Yang, Qiming, Jiang, JunyuX, stable

Get, this is for queue group, thanks.


> -----Original Message-----
> From: Zhao1, Wei
> Sent: Wednesday, May 20, 2020 5:31 PM
> To: Junyu Jiang <junyux.jiang@intel.com>; dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Jiang, JunyuX
> <JunyuX.Jiang@intel.com>; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2] net/ice: fix core dumped issue in switch
> filter
> 
> Hi, Junyu
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Junyu Jiang
> > Sent: Wednesday, May 6, 2020 11:05 AM
> > To: dev@dpdk.org
> > Cc: Yang, Qiming <qiming.yang@intel.com>; guinanx.sun@intel.com X
> > <junyux.jiang@intel.com>; stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH v2] net/ice: fix core dumped issue 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 <junyux.jiang@intel.com>
> > Tested-by: Qimai Xiao <qimaix.xiao@intel.com>
> > ---
> >  drivers/net/ice/ice_switch_filter.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/net/ice/ice_switch_filter.c
> > b/drivers/net/ice/ice_switch_filter.c
> > index 179430136..c2762e331 100644
> > --- a/drivers/net/ice/ice_switch_filter.c
> > +++ b/drivers/net/ice/ice_switch_filter.c
> > @@ -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?

> 
> >  			rule_info->sw_act.fltr_act =
> >  				ICE_FWD_TO_QGRP;
> >  			rule_info->sw_act.fwd_id.q_id =
> > --
> > 2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-20  9:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29  7:25 [dpdk-dev] [PATCH] net/ice: fix core dumped issue in switch filter Junyu Jiang
2020-04-30  6:52 ` Yang, Qiming
2020-04-30  7:42   ` Jiang, JunyuX
2020-04-30  9:09 ` Xiao, QimaiX
2020-05-06  3:05 ` [dpdk-dev] [PATCH v2] " Junyu Jiang
2020-05-06  6:30   ` Yang, Qiming
2020-05-06  8:57   ` [dpdk-dev] [dpdk-stable] " Ye Xiaolong
2020-05-20  9:31   ` [dpdk-dev] " Zhao1, Wei
2020-05-20  9:32     ` Zhao1, Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).