net/mlx5e: TC, Move comment about mod header flag to correct place
authorRoi Dayan <roid@nvidia.com>
Wed, 10 Nov 2021 14:19:41 +0000 (16:19 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 17 Nov 2021 04:31:50 +0000 (20:31 -0800)
Move the comment to the correct place where the driver actually
removes the flag and not in the check that maybe pedit actions exists.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index aa4da8d..686bb2e 100644 (file)
@@ -3424,10 +3424,10 @@ actions_prepare_mod_hdr_actions(struct mlx5e_priv *priv,
        if (err)
                return err;
 
-       /* In case all pedit actions are skipped, remove the MOD_HDR flag. */
        if (parse_attr->mod_hdr_acts.num_actions > 0)
                return 0;
 
+       /* In case all pedit actions are skipped, remove the MOD_HDR flag. */
        attr->action &= ~MLX5_FLOW_CONTEXT_ACTION_MOD_HDR;
        mlx5e_mod_hdr_dealloc(&parse_attr->mod_hdr_acts);