diff options
author | Zhenlei Huang <zlei@FreeBSD.org> | 2025-01-27 15:54:43 +0000 |
---|---|---|
committer | Zhenlei Huang <zlei@FreeBSD.org> | 2025-02-03 12:27:05 +0000 |
commit | 67e952ebaaad2f3db00c05b1fe23afdf95c32166 (patch) | |
tree | 93ba20cd3c6bfd9a11dd2ace34a123f939a42074 | |
parent | 7a6319ece24f2c672ca074c1266364ac018b3ef2 (diff) |
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)
(cherry picked from commit 7d2a5c78a714732f3494c7d8668b36368ed6bc39)
-rw-r--r-- | sys/net/if_vxlan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index f9478da983d8..737a2ae312ac 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -428,9 +428,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 |