Skip to contentSkip to conversation

neighbour: Rename procfs entry

PATCH In review Yajun Deng 2 participants 2 messages Aug 2, 2021

Subsystems (2)
lore
Share & tools
lore

Yajun Deng

author
#0 lore raw

PATCH 1/1 neighbour: Rename procfs entry

Use gc_thresh_{min, default, max} instead of gc_thresh{1, 2, 3}. This is more friendly for user.

---
 net/core/neighbour.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
net/core/neighbour.c +3 -3
index e831b9adf1e4..c294addb7818 100644
@@ -3595,7 +3595,7 @@ static struct neigh_sysctl_table {
 			.proc_handler	= proc_dointvec_jiffies,
 		},
 		[NEIGH_VAR_GC_THRESH1] = {
-			.procname	= "gc_thresh1",
+			.procname	= "gc_thresh_min",
 			.maxlen		= sizeof(int),
 			.mode		= 0644,
 			.extra1		= SYSCTL_ZERO,
@@ -3603,7 +3603,7 @@ static struct neigh_sysctl_table {
 			.proc_handler	= proc_dointvec_minmax,
 		},
 		[NEIGH_VAR_GC_THRESH2] = {
-			.procname	= "gc_thresh2",
+			.procname	= "gc_thresh_default",
 			.maxlen		= sizeof(int),
 			.mode		= 0644,
 			.extra1		= SYSCTL_ZERO,
@@ -3611,7 +3611,7 @@ static struct neigh_sysctl_table {
 			.proc_handler	= proc_dointvec_minmax,
 		},
 		[NEIGH_VAR_GC_THRESH3] = {
-			.procname	= "gc_thresh3",
+			.procname	= "gc_thresh_max",
 			.maxlen		= sizeof(int),
 			.mode		= 0644,
 			.extra1		= SYSCTL_ZERO,
Signature · 1 line
2.32.0
maintainer
#1 lore raw
Quoted 2 lines · On Mon, 2 Aug 2021 11:57:45 +0800 Yajun Deng wrote:

Use gc_thresh_{min, default, max} instead of gc_thresh{1, 2, 3}. This is more friendly for user.

We can't rename files in procfs after they had been present in an official kernel release. They are uABI. Same goes for your default -> current rename patch.

You also forgot to update documentation.