[5/5] net/mlx5: fix flow mark ID conversion in Direct Verbs

Message ID 20181017020739.11203-5-yskoh@mellanox.com (mailing list archive)
State Superseded, archived
Delegated to: Shahaf Shuler
Headers
Series [1/5] net/mlx5: add warning message for Direct Verbs flow |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

Yongseok Koh Oct. 17, 2018, 2:07 a.m. UTC
  Fixes: d02cb0691299 ("net/mlx5: add Direct Verbs translate actions")
Cc: orika@mellanox.com

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
  

Comments

Ori Kam Oct. 17, 2018, 5:15 a.m. UTC | #1
> -----Original Message-----
> From: Yongseok Koh
> Sent: Wednesday, October 17, 2018 5:08 AM
> To: Shahaf Shuler <shahafs@mellanox.com>
> Cc: dev@dpdk.org; Yongseok Koh <yskoh@mellanox.com>; Ori Kam
> <orika@mellanox.com>
> Subject: [PATCH 5/5] net/mlx5: fix flow mark ID conversion in Direct Verbs
> 
> Fixes: d02cb0691299 ("net/mlx5: add Direct Verbs translate actions")
> Cc: orika@mellanox.com
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c
> index 0c09ac8026..cbda05455a 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -959,15 +959,16 @@ flow_dv_create_action(const struct rte_flow_action
> *action,
>  	case RTE_FLOW_ACTION_TYPE_FLAG:
>  		dev_flow->dv.actions[actions_n].type =
> MLX5DV_FLOW_ACTION_TAG;
>  		dev_flow->dv.actions[actions_n].tag_value =
> -			MLX5_FLOW_MARK_DEFAULT;
> +			mlx5_flow_mark_set(MLX5_FLOW_MARK_DEFAULT);
>  		actions_n++;
>  		flow->actions |= MLX5_FLOW_ACTION_FLAG;
>  		break;
>  	case RTE_FLOW_ACTION_TYPE_MARK:
>  		dev_flow->dv.actions[actions_n].type =
> MLX5DV_FLOW_ACTION_TAG;
>  		dev_flow->dv.actions[actions_n].tag_value =
> -			((const struct rte_flow_action_mark *)
> -			 (action->conf))->id;
> +			mlx5_flow_mark_set
> +			(((const struct rte_flow_action_mark *)
> +			  (action->conf))->id);
>  		flow->actions |= MLX5_FLOW_ACTION_MARK;
>  		actions_n++;
>  		break;
> --
> 2.11.0

Acked-by: Ori Kam <orika@mellanox.com>

Thanks,
Ori
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 0c09ac8026..cbda05455a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -959,15 +959,16 @@  flow_dv_create_action(const struct rte_flow_action *action,
 	case RTE_FLOW_ACTION_TYPE_FLAG:
 		dev_flow->dv.actions[actions_n].type = MLX5DV_FLOW_ACTION_TAG;
 		dev_flow->dv.actions[actions_n].tag_value =
-			MLX5_FLOW_MARK_DEFAULT;
+			mlx5_flow_mark_set(MLX5_FLOW_MARK_DEFAULT);
 		actions_n++;
 		flow->actions |= MLX5_FLOW_ACTION_FLAG;
 		break;
 	case RTE_FLOW_ACTION_TYPE_MARK:
 		dev_flow->dv.actions[actions_n].type = MLX5DV_FLOW_ACTION_TAG;
 		dev_flow->dv.actions[actions_n].tag_value =
-			((const struct rte_flow_action_mark *)
-			 (action->conf))->id;
+			mlx5_flow_mark_set
+			(((const struct rte_flow_action_mark *)
+			  (action->conf))->id);
 		flow->actions |= MLX5_FLOW_ACTION_MARK;
 		actions_n++;
 		break;