net/mlx5: allow jump to group lower than current

Message ID c9d4a7d931186604fd69b7cfd2817522eec033c9.1573126083.git.dekelp@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: allow jump to group lower than current |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK

Commit Message

Dekel Peled Nov. 7, 2019, 11:33 a.m. UTC
  In current implementation, jump action is allowed only if target
group is higher than the current flow group,

This patch updates function flow_dv_validate_action_jump() to allow
jump action if target group is higher or lower than the current flow
group.
Target group equal to current flow group is still rejected.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Slava Ovsiienko Nov. 7, 2019, 2:07 p.m. UTC | #1
> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Thursday, November 7, 2019 13:34
> To: Matan Azrad <matan@mellanox.com>; Shahaf Shuler
> <shahafs@mellanox.com>; Slava Ovsiienko <viacheslavo@mellanox.com>;
> Ori Kam <orika@mellanox.com>
> Cc: dev@dpdk.org
> Subject: [PATCH] net/mlx5: allow jump to group lower than current
> 
> In current implementation, jump action is allowed only if target group is
> higher than the current flow group,
> 
> This patch updates function flow_dv_validate_action_jump() to allow jump
> action if target group is higher or lower than the current flow group.
> Target group equal to current flow group is still rejected.
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index 42c265f..3ad3df9 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -2514,10 +2514,10 @@ struct field_modify_info modify_tcp[] = {
>  		return rte_flow_error_set(error, EINVAL,
> 
> RTE_FLOW_ERROR_TYPE_ATTR_GROUP, NULL,
>  					  "target group index out of range");
> -	if (attributes->group >= target_group)
> +	if (attributes->group == target_group)
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "target group must be higher than"
> +					  "target group must be other than"
>  					  " the current flow group");
>  	return 0;
>  }
> --
> 1.8.3.1
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
  
Raslan Darawsheh Nov. 7, 2019, 11:12 p.m. UTC | #2
Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
> Sent: Thursday, November 7, 2019 1:34 PM
> To: Matan Azrad <matan@mellanox.com>; Shahaf Shuler
> <shahafs@mellanox.com>; Slava Ovsiienko <viacheslavo@mellanox.com>;
> Ori Kam <orika@mellanox.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: allow jump to group lower than
> current
> 
> In current implementation, jump action is allowed only if target group is
> higher than the current flow group,
> 
> This patch updates function flow_dv_validate_action_jump() to allow jump
> action if target group is higher or lower than the current flow group.
> Target group equal to current flow group is still rejected.
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 42c265f..3ad3df9 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2514,10 +2514,10 @@  struct field_modify_info modify_tcp[] = {
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ATTR_GROUP, NULL,
 					  "target group index out of range");
-	if (attributes->group >= target_group)
+	if (attributes->group == target_group)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "target group must be higher than"
+					  "target group must be other than"
 					  " the current flow group");
 	return 0;
 }