Commit c43182e6 authored by Roi Dayan's avatar Roi Dayan Committed by Saeed Mahameed
Browse files

net/mlx5e: TC, Add tc prefix to attach/detach hdr functions



Currently there are confusing names for attach/detach functions.

mlx5e_attach_mod_hdr() vs mlx5e_mod_hdr_attach()
mlx5e_detach_mod_hdr() vs mlx5e_mod_hdr_detach()

Add tc prefix to the functions that are in en_tc.c to separate
from the functions in mod_hdr.c which has the mod_hdr prefix.

Signed-off-by: default avatarRoi Dayan <roid@nvidia.com>
Reviewed-by: default avatarMaor Dickman <maord@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 82b56480
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -646,7 +646,7 @@ get_mod_hdr_table(struct mlx5e_priv *priv, struct mlx5e_tc_flow *flow)
		&tc->mod_hdr;
}

static int mlx5e_attach_mod_hdr(struct mlx5e_priv *priv,
static int mlx5e_tc_attach_mod_hdr(struct mlx5e_priv *priv,
				   struct mlx5e_tc_flow *flow,
				   struct mlx5_flow_attr *attr)
{
@@ -665,7 +665,7 @@ static int mlx5e_attach_mod_hdr(struct mlx5e_priv *priv,
	return 0;
}

static void mlx5e_detach_mod_hdr(struct mlx5e_priv *priv,
static void mlx5e_tc_detach_mod_hdr(struct mlx5e_priv *priv,
				    struct mlx5e_tc_flow *flow,
				    struct mlx5_flow_attr *attr)
{
@@ -1433,7 +1433,7 @@ mlx5e_tc_add_nic_flow(struct mlx5e_priv *priv,
	}

	if (attr->action & MLX5_FLOW_CONTEXT_ACTION_MOD_HDR) {
		err = mlx5e_attach_mod_hdr(priv, flow, attr);
		err = mlx5e_tc_attach_mod_hdr(priv, flow, attr);
		if (err)
			return err;
	}
@@ -1493,7 +1493,7 @@ static void mlx5e_tc_del_nic_flow(struct mlx5e_priv *priv,

	if (attr->action & MLX5_FLOW_CONTEXT_ACTION_MOD_HDR) {
		mlx5e_mod_hdr_dealloc(&attr->parse_attr->mod_hdr_acts);
		mlx5e_detach_mod_hdr(priv, flow, attr);
		mlx5e_tc_detach_mod_hdr(priv, flow, attr);
	}

	if (attr->action & MLX5_FLOW_CONTEXT_ACTION_COUNT)
@@ -1928,7 +1928,7 @@ post_process_attr(struct mlx5e_tc_flow *flow,
			if (err)
				goto err_out;
		} else {
			err = mlx5e_attach_mod_hdr(flow->priv, flow, attr);
			err = mlx5e_tc_attach_mod_hdr(flow->priv, flow, attr);
			if (err)
				goto err_out;
		}
@@ -2145,7 +2145,7 @@ static void mlx5e_tc_del_fdb_flow(struct mlx5e_priv *priv,
		if (vf_tun && attr->modify_hdr)
			mlx5_modify_header_dealloc(priv->mdev, attr->modify_hdr);
		else
			mlx5e_detach_mod_hdr(priv, flow, attr);
			mlx5e_tc_detach_mod_hdr(priv, flow, attr);
	}

	if (attr->action & MLX5_FLOW_CONTEXT_ACTION_COUNT)