DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice: fixed wrong return value
@ 2019-07-09  4:08 Qiming Yang
  2019-07-10  7:29 ` Thomas Monjalon
  2019-07-15  2:23 ` [dpdk-dev] [PATCH v3] net/ice: fix flow validation fail Qiming Yang
  0 siblings, 2 replies; 6+ messages in thread
From: Qiming Yang @ 2019-07-09  4:08 UTC (permalink / raw)
  To: dev; +Cc: Qiming Yang

Fixed error return value check and wrong error message.

Fixes: d76116a4678f ("net/ice: add generic flow API")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index d5ff278..e6a2c4b 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -549,7 +549,7 @@ static int ice_flow_valid_action(struct rte_eth_dev *dev,
 			rte_flow_error_set(error, EINVAL,
 					   RTE_FLOW_ERROR_TYPE_ACTION,
 					   actions, "Invalid queue ID for"
-					   " ethertype_filter.");
+					   " switch filter.");
 			return -rte_errno;
 		}
 		break;
@@ -596,7 +596,7 @@ ice_flow_validate(struct rte_eth_dev *dev,
 	}
 
 	ret = ice_flow_valid_attr(attr, error);
-	if (!ret)
+	if (ret)
 		return ret;
 
 	inset = ice_flow_valid_pattern(pattern, error);
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH] net/ice: fixed wrong return value
  2019-07-09  4:08 [dpdk-dev] [PATCH] net/ice: fixed wrong return value Qiming Yang
@ 2019-07-10  7:29 ` Thomas Monjalon
  2019-07-11  2:58   ` Yang, Qiming
  2019-07-15  2:23 ` [dpdk-dev] [PATCH v3] net/ice: fix flow validation fail Qiming Yang
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2019-07-10  7:29 UTC (permalink / raw)
  To: Qiming Yang; +Cc: dev, ferruh.yigit

Hi,

09/07/2019 06:08, Qiming Yang:
> Fixed error return value check and wrong error message.
> 
> Fixes: d76116a4678f ("net/ice: add generic flow API")
> 
> Signed-off-by: Qiming Yang <qiming.yang@intel.com>

Comments about the formatting of the title:

The verb must be in infinitive form: "fix".

The title must say which behaviour is fixed,
not the code detail (we don't care in the title
if it because of a return value or variable assignment).
Here it is about fixing flow rule validation, right?

One more thing, the word "wrong" can always be avoided
after "fix", because we know you are not fixing something
which worked perfectly :)

Do not hesitate to share these tips around you.
Thank you



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

* Re: [dpdk-dev] [PATCH] net/ice: fixed wrong return value
  2019-07-10  7:29 ` Thomas Monjalon
@ 2019-07-11  2:58   ` Yang, Qiming
  0 siblings, 0 replies; 6+ messages in thread
From: Yang, Qiming @ 2019-07-11  2:58 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Yigit, Ferruh

Hi, Thomas
Thanks for the comments. Will change it.

Qiming
-----Original Message-----
From: Thomas Monjalon [mailto:thomas@monjalon.net] 
Sent: Wednesday, July 10, 2019 3:30 PM
To: Yang, Qiming <qiming.yang@intel.com>
Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/ice: fixed wrong return value

Hi,

09/07/2019 06:08, Qiming Yang:
> Fixed error return value check and wrong error message.
> 
> Fixes: d76116a4678f ("net/ice: add generic flow API")
> 
> Signed-off-by: Qiming Yang <qiming.yang@intel.com>

Comments about the formatting of the title:

The verb must be in infinitive form: "fix".

The title must say which behaviour is fixed, not the code detail (we don't care in the title if it because of a return value or variable assignment).
Here it is about fixing flow rule validation, right?

One more thing, the word "wrong" can always be avoided after "fix", because we know you are not fixing something which worked perfectly :)

Do not hesitate to share these tips around you.
Thank you



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

* [dpdk-dev] [PATCH v3] net/ice: fix flow validation fail
  2019-07-09  4:08 [dpdk-dev] [PATCH] net/ice: fixed wrong return value Qiming Yang
  2019-07-10  7:29 ` Thomas Monjalon
@ 2019-07-15  2:23 ` Qiming Yang
  2019-07-15  3:19   ` Xing, Beilei
  1 sibling, 1 reply; 6+ messages in thread
From: Qiming Yang @ 2019-07-15  2:23 UTC (permalink / raw)
  To: dev; +Cc: Qiming Yang, stable

ice_flow_valid_attr will return zero on success and a
negative value on error. Current return value check
logical is opposite to the expected behavior. This
patch fixed this issue.

Fixes: d76116a4678f ("net/ice: add generic flow API")
Cc: stable@dpdk.org

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index d5ff278..e6a2c4b 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -549,7 +549,7 @@ static int ice_flow_valid_action(struct rte_eth_dev *dev,
 			rte_flow_error_set(error, EINVAL,
 					   RTE_FLOW_ERROR_TYPE_ACTION,
 					   actions, "Invalid queue ID for"
-					   " ethertype_filter.");
+					   " switch filter.");
 			return -rte_errno;
 		}
 		break;
@@ -596,7 +596,7 @@ ice_flow_validate(struct rte_eth_dev *dev,
 	}
 
 	ret = ice_flow_valid_attr(attr, error);
-	if (!ret)
+	if (ret)
 		return ret;
 
 	inset = ice_flow_valid_pattern(pattern, error);
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH v3] net/ice: fix flow validation fail
  2019-07-15  2:23 ` [dpdk-dev] [PATCH v3] net/ice: fix flow validation fail Qiming Yang
@ 2019-07-15  3:19   ` Xing, Beilei
  2019-07-15  5:59     ` Zhang, Qi Z
  0 siblings, 1 reply; 6+ messages in thread
From: Xing, Beilei @ 2019-07-15  3:19 UTC (permalink / raw)
  To: Yang, Qiming, dev; +Cc: Yang, Qiming, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qiming Yang
> Sent: Monday, July 15, 2019 10:24 AM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v3] net/ice: fix flow validation fail
> 
> ice_flow_valid_attr will return zero on success and a negative value on error.
> Current return value check logical is opposite to the expected behavior. This
> patch fixed this issue.
> 
> Fixes: d76116a4678f ("net/ice: add generic flow API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qiming Yang <qiming.yang@intel.com>
> ---
>  drivers/net/ice/ice_generic_flow.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ice/ice_generic_flow.c
> b/drivers/net/ice/ice_generic_flow.c
> index d5ff278..e6a2c4b 100644
> --- a/drivers/net/ice/ice_generic_flow.c
> +++ b/drivers/net/ice/ice_generic_flow.c
> @@ -549,7 +549,7 @@ static int ice_flow_valid_action(struct rte_eth_dev
> *dev,
>  			rte_flow_error_set(error, EINVAL,
>  					   RTE_FLOW_ERROR_TYPE_ACTION,
>  					   actions, "Invalid queue ID for"
> -					   " ethertype_filter.");
> +					   " switch filter.");
>  			return -rte_errno;
>  		}
>  		break;
> @@ -596,7 +596,7 @@ ice_flow_validate(struct rte_eth_dev *dev,
>  	}
> 
>  	ret = ice_flow_valid_attr(attr, error);
> -	if (!ret)
> +	if (ret)
>  		return ret;
> 
>  	inset = ice_flow_valid_pattern(pattern, error);
> --
> 2.7.4

Acked-by: Beilei Xing <beilei.xing@intel.com>

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

* Re: [dpdk-dev] [PATCH v3] net/ice: fix flow validation fail
  2019-07-15  3:19   ` Xing, Beilei
@ 2019-07-15  5:59     ` Zhang, Qi Z
  0 siblings, 0 replies; 6+ messages in thread
From: Zhang, Qi Z @ 2019-07-15  5:59 UTC (permalink / raw)
  To: Xing, Beilei, Yang, Qiming, dev; +Cc: Yang, Qiming, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xing, Beilei
> Sent: Monday, July 15, 2019 11:20 AM
> To: Yang, Qiming <qiming.yang@intel.com>; dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3] net/ice: fix flow validation fail
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qiming Yang
> > Sent: Monday, July 15, 2019 10:24 AM
> > To: dev@dpdk.org
> > Cc: Yang, Qiming <qiming.yang@intel.com>; stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH v3] net/ice: fix flow validation fail
> >
> > ice_flow_valid_attr will return zero on success and a negative value on error.
> > Current return value check logical is opposite to the expected
> > behavior. This patch fixed this issue.
> >
> > Fixes: d76116a4678f ("net/ice: add generic flow API")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Qiming Yang <qiming.yang@intel.com>
> > ---
> Acked-by: Beilei Xing <beilei.xing@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

end of thread, other threads:[~2019-07-15  5:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-09  4:08 [dpdk-dev] [PATCH] net/ice: fixed wrong return value Qiming Yang
2019-07-10  7:29 ` Thomas Monjalon
2019-07-11  2:58   ` Yang, Qiming
2019-07-15  2:23 ` [dpdk-dev] [PATCH v3] net/ice: fix flow validation fail Qiming Yang
2019-07-15  3:19   ` Xing, Beilei
2019-07-15  5:59     ` Zhang, Qi Z

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).