From 3ff2763a72d0451354ab0e7f7a57bb4b2c0e97aa Mon Sep 17 00:00:00 2001 From: Zhenlei Huang Date: Mon, 27 Jan 2025 23:54:43 +0800 Subject: [PATCH] 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 (cherry picked from commit 92632371b360010709fad60146f1aee0b8b99776) --- 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 0bbb3e0bcf9..979d48bf4a3 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