Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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/20230111194608.7f15b9a1@kernel.org/

Signed-off-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Link: https://lore.kernel.org/all/20230222230202.523667-1-saeed@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Gal Pressman and committed by
Jakub Kicinski
a6b811cb 3acd9db9

-59
-59
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
··· 1048 1048 return 0; 1049 1049 } 1050 1050 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 - 1106 1051 static int debugfs_hairpin_num_active_get(void *data, u64 *val) 1107 1052 { 1108 1053 struct mlx5e_tc_table *tc = data; ··· 1093 1148 1094 1149 tc->dfs_root = debugfs_create_dir("tc", dfs_root); 1095 1150 1096 - debugfs_create_file("hairpin_num_queues", 0644, tc->dfs_root, 1097 - &tc->hairpin_params, &fops_hairpin_queues); 1098 - debugfs_create_file("hairpin_queue_size", 0644, tc->dfs_root, 1099 - &tc->hairpin_params, &fops_hairpin_queue_size); 1100 1151 debugfs_create_file("hairpin_num_active", 0444, tc->dfs_root, tc, 1101 1152 &fops_hairpin_num_active); 1102 1153 debugfs_create_file("hairpin_table_dump", 0444, tc->dfs_root, tc,