git: 92632371b360 - main - if_vxlan(4): Prefer SYSCTL_INT over TUNABLE_INT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Jan 2025 15:56:11 UTC
The branch main has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=92632371b360010709fad60146f1aee0b8b99776
commit 92632371b360010709fad60146f1aee0b8b99776
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-01-27 15:54:43 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-01-27 15:54:43 +0000
if_vxlan(4): Prefer SYSCTL_INT over TUNABLE_INT
This driver does not need to retrieve those tunable during early boot.
Meanwhile SYSCTL_INT can provide rich info such as description.
Also `sysctl net.link.vxlan.[legacy_port|reuse_port]` can report the
current settings.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48621
---
sys/net/if_vxlan.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index 58285c632771..03184c1fb678 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -429,9 +429,11 @@ SYSCTL_NODE(_net_link, OID_AUTO, vxlan, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"Virtual eXtensible Local Area Network");
static int vxlan_legacy_port = 0;
-TUNABLE_INT("net.link.vxlan.legacy_port", &vxlan_legacy_port);
+SYSCTL_INT(_net_link_vxlan, OID_AUTO, legacy_port, CTLFLAG_RDTUN,
+ &vxlan_legacy_port, 0, "Use legacy port");
static int vxlan_reuse_port = 0;
-TUNABLE_INT("net.link.vxlan.reuse_port", &vxlan_reuse_port);
+SYSCTL_INT(_net_link_vxlan, OID_AUTO, reuse_port, CTLFLAG_RDTUN,
+ &vxlan_reuse_port, 0, "Re-use port");
/*
* This macro controls the default upper limitation on nesting of vxlan