net/mlx5: fix Rss level validation

Message ID 1529413738-28378-1-git-send-email-rasland@mellanox.com (mailing list archive)
State Superseded, archived
Delegated to: Shahaf Shuler
Headers
Series net/mlx5: fix Rss level validation |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Raslan Darawsheh June 19, 2018, 1:08 p.m. UTC
  When setting the level in rss action it's checking for the value
stored in the parser which is set to 0 by default.

this change the check to be for the requested action insted.

Fixes: d4a40518 ("net/mlx5: support tunnel RSS level")

Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Shahaf Shuler June 20, 2018, 5:34 a.m. UTC | #1
Adding the maintainers, 

Tuesday, June 19, 2018 4:09 PM, Raslan Darawsheh:
>Subject: [PATCH] net/mlx5: fix Rss level validation

Rss -> RSS

>
>When setting the level in rss action it's checking for the value stored in the
>parser which is set to 0 by default.
>
>this change the check to be for the requested action insted.

this -> This
instead -> instead

>
>Fixes: d4a40518 ("net/mlx5: support tunnel RSS level")
>
>Cc: stable@dpdk.org
>Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
>---
> drivers/net/mlx5/mlx5_flow.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
>index 994be05..40df633 100644
>--- a/drivers/net/mlx5/mlx5_flow.c
>+++ b/drivers/net/mlx5/mlx5_flow.c
>@@ -738,7 +738,7 @@ mlx5_flow_convert_actions(struct rte_eth_dev *dev,
> 				return -rte_errno;
> 			}
> #ifndef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
>-			if (parser->rss_conf.level > 1) {
>+			if (rss->level > 1) {
> 				rte_flow_error_set(error, EINVAL,
>
>RTE_FLOW_ERROR_TYPE_ACTION,
> 						   actions,
>@@ -747,7 +747,7 @@ mlx5_flow_convert_actions(struct rte_eth_dev *dev,
> 				return -rte_errno;
> 			}
> #endif
>-			if (parser->rss_conf.level > 2) {
>+			if (rss->level > 2) {
> 				rte_flow_error_set(error, EINVAL,
>
>RTE_FLOW_ERROR_TYPE_ACTION,
> 						   actions,
>--

The above changes (if they are the only one) can be address by me when I apply the patch.
Will wait few days for the maintainers comments.

Acked-by: Shahaf Shuler <shahafs@mellanox.com>

>2.7.4
  
Nélio Laranjeiro June 20, 2018, 7:10 a.m. UTC | #2
On Wed, Jun 20, 2018 at 05:34:23AM +0000, Shahaf Shuler wrote:
> Adding the maintainers, 
> 
> Tuesday, June 19, 2018 4:09 PM, Raslan Darawsheh:
> >Subject: [PATCH] net/mlx5: fix Rss level validation
> 
> Rss -> RSS
> 
> >
> >When setting the level in rss action it's checking for the value stored in the
> >parser which is set to 0 by default.
> >
> >this change the check to be for the requested action insted.
> 
> this -> This
> instead -> instead
> 
> >
> >Fixes: d4a40518 ("net/mlx5: support tunnel RSS level")
> >
> >Cc: stable@dpdk.org
> >Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
> >---
> > drivers/net/mlx5/mlx5_flow.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> >diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> >index 994be05..40df633 100644
> >--- a/drivers/net/mlx5/mlx5_flow.c
> >+++ b/drivers/net/mlx5/mlx5_flow.c
> >@@ -738,7 +738,7 @@ mlx5_flow_convert_actions(struct rte_eth_dev *dev,
> > 				return -rte_errno;
> > 			}
> > #ifndef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
> >-			if (parser->rss_conf.level > 1) {
> >+			if (rss->level > 1) {
> > 				rte_flow_error_set(error, EINVAL,
> >
> >RTE_FLOW_ERROR_TYPE_ACTION,
> > 						   actions,
> >@@ -747,7 +747,7 @@ mlx5_flow_convert_actions(struct rte_eth_dev *dev,
> > 				return -rte_errno;
> > 			}
> > #endif
> >-			if (parser->rss_conf.level > 2) {
> >+			if (rss->level > 2) {
> > 				rte_flow_error_set(error, EINVAL,
> >
> >RTE_FLOW_ERROR_TYPE_ACTION,
> > 						   actions,
> >--
> 
> The above changes (if they are the only one) can be address by me when I apply the patch.
> Will wait few days for the maintainers comments.
> 
> Acked-by: Shahaf Shuler <shahafs@mellanox.com>

We should answer the same as the other patches, there is already a
re-work remodeling the whole engine, this patch remains relevant for
stables branches, but no more for mainline.

Regards,
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 994be05..40df633 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -738,7 +738,7 @@  mlx5_flow_convert_actions(struct rte_eth_dev *dev,
 				return -rte_errno;
 			}
 #ifndef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
-			if (parser->rss_conf.level > 1) {
+			if (rss->level > 1) {
 				rte_flow_error_set(error, EINVAL,
 						   RTE_FLOW_ERROR_TYPE_ACTION,
 						   actions,
@@ -747,7 +747,7 @@  mlx5_flow_convert_actions(struct rte_eth_dev *dev,
 				return -rte_errno;
 			}
 #endif
-			if (parser->rss_conf.level > 2) {
+			if (rss->level > 2) {
 				rte_flow_error_set(error, EINVAL,
 						   RTE_FLOW_ERROR_TYPE_ACTION,
 						   actions,