]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5e: Fix missing pedit action after ct clear action
authorRoi Dayan <roid@mellanox.com>
Sun, 29 Mar 2020 15:54:10 +0000 (18:54 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 8 Apr 2020 22:46:46 +0000 (15:46 -0700)
With ct clear action we should not allocate the action in hw
and not release the mod_acts parsed in advance.
It will be done when handling the ct clear action.

Fixes: 6f55268be994 ("net/mlx5e: CT: Support clear action")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index e3fee837c7a3e723abe8a76a66e5d70f66c9cb39..a574c588269a0f0110eb05c745351c9a8c0c761e 100644 (file)
@@ -1343,7 +1343,8 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
        if (err)
                return err;
 
-       if (attr->action & MLX5_FLOW_CONTEXT_ACTION_MOD_HDR) {
+       if (attr->action & MLX5_FLOW_CONTEXT_ACTION_MOD_HDR &&
+           !(attr->ct_attr.ct_action & TCA_CT_ACT_CLEAR)) {
                err = mlx5e_attach_mod_hdr(priv, flow, parse_attr);
                dealloc_mod_hdr_actions(&parse_attr->mod_hdr_acts);
                if (err)