Skip to content

Commit a6b811c

Browse files
gal-pressmankuba-moo
authored andcommitted
net/mlx5e: Remove hairpin write debugfs files
Per the discussion in [1], hairpin parameters will be exposed using devlink, remove the debugfs files. [1] https://lore.kernel.org/all/[email protected]/ Signed-off-by: Gal Pressman <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 3acd9db commit a6b811c

File tree

1 file changed

+0
-59
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+0
-59
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,61 +1048,6 @@ static int mlx5e_hairpin_get_prio(struct mlx5e_priv *priv,
10481048
return 0;
10491049
}
10501050

1051-
static int debugfs_hairpin_queues_set(void *data, u64 val)
1052-
{
1053-
struct mlx5e_hairpin_params *hp = data;
1054-
1055-
if (!val) {
1056-
mlx5_core_err(hp->mdev,
1057-
"Number of hairpin queues must be > 0\n");
1058-
return -EINVAL;
1059-
}
1060-
1061-
hp->num_queues = val;
1062-
1063-
return 0;
1064-
}
1065-
1066-
static int debugfs_hairpin_queues_get(void *data, u64 *val)
1067-
{
1068-
struct mlx5e_hairpin_params *hp = data;
1069-
1070-
*val = hp->num_queues;
1071-
1072-
return 0;
1073-
}
1074-
DEFINE_DEBUGFS_ATTRIBUTE(fops_hairpin_queues, debugfs_hairpin_queues_get,
1075-
debugfs_hairpin_queues_set, "%llu\n");
1076-
1077-
static int debugfs_hairpin_queue_size_set(void *data, u64 val)
1078-
{
1079-
struct mlx5e_hairpin_params *hp = data;
1080-
1081-
if (val > BIT(MLX5_CAP_GEN(hp->mdev, log_max_hairpin_num_packets))) {
1082-
mlx5_core_err(hp->mdev,
1083-
"Invalid hairpin queue size, must be <= %lu\n",
1084-
BIT(MLX5_CAP_GEN(hp->mdev,
1085-
log_max_hairpin_num_packets)));
1086-
return -EINVAL;
1087-
}
1088-
1089-
hp->queue_size = roundup_pow_of_two(val);
1090-
1091-
return 0;
1092-
}
1093-
1094-
static int debugfs_hairpin_queue_size_get(void *data, u64 *val)
1095-
{
1096-
struct mlx5e_hairpin_params *hp = data;
1097-
1098-
*val = hp->queue_size;
1099-
1100-
return 0;
1101-
}
1102-
DEFINE_DEBUGFS_ATTRIBUTE(fops_hairpin_queue_size,
1103-
debugfs_hairpin_queue_size_get,
1104-
debugfs_hairpin_queue_size_set, "%llu\n");
1105-
11061051
static int debugfs_hairpin_num_active_get(void *data, u64 *val)
11071052
{
11081053
struct mlx5e_tc_table *tc = data;
@@ -1148,10 +1093,6 @@ static void mlx5e_tc_debugfs_init(struct mlx5e_tc_table *tc,
11481093

11491094
tc->dfs_root = debugfs_create_dir("tc", dfs_root);
11501095

1151-
debugfs_create_file("hairpin_num_queues", 0644, tc->dfs_root,
1152-
&tc->hairpin_params, &fops_hairpin_queues);
1153-
debugfs_create_file("hairpin_queue_size", 0644, tc->dfs_root,
1154-
&tc->hairpin_params, &fops_hairpin_queue_size);
11551096
debugfs_create_file("hairpin_num_active", 0444, tc->dfs_root, tc,
11561097
&fops_hairpin_num_active);
11571098
debugfs_create_file("hairpin_table_dump", 0444, tc->dfs_root, tc,

0 commit comments

Comments
 (0)