Date: Thu, 29 Apr 2021 09:17:23 GMT From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 2c0d16218efa - stable/13 - Fix NOINET[6], !VIMAGE builds after FIB_ALGO addition to GENERIC Message-ID: <202104290917.13T9HN2I032738@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=2c0d16218efa5db40b8e3f0a0326fb0438faa4a1 commit 2c0d16218efa5db40b8e3f0a0326fb0438faa4a1 Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2021-04-21 04:52:38 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2021-04-29 08:47:32 +0000 Fix NOINET[6],!VIMAGE builds after FIB_ALGO addition to GENERIC Reported by: jbeich PR: 255390 (cherry picked from commit 7d222ce3c10bdc23c8dc92d6b13e376ede5840d5) --- sys/net/route/fib_algo.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c index 83fff1ec43e0..5dff2690454d 100644 --- a/sys/net/route/fib_algo.c +++ b/sys/net/route/fib_algo.c @@ -108,19 +108,19 @@ SYSCTL_NODE(_net_route, OID_AUTO, algo, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, /* Algorithm sync policy */ /* Time interval to bucket updates */ -VNET_DEFINE(unsigned int, bucket_time_ms) = 50; -#define V_bucket_time_ms VNET(bucket_time_ms) +VNET_DEFINE_STATIC(unsigned int, update_bucket_time_ms) = 50; +#define V_update_bucket_time_ms VNET(update_bucket_time_ms) SYSCTL_UINT(_net_route_algo, OID_AUTO, bucket_time_ms, CTLFLAG_RW | CTLFLAG_VNET, - &VNET_NAME(bucket_time_ms), 0, "Time interval to calculate update rate"); + &VNET_NAME(update_bucket_time_ms), 0, "Time interval to calculate update rate"); /* Minimum update rate to delay sync */ -VNET_DEFINE(unsigned int, bucket_change_threshold_rate) = 500; +VNET_DEFINE_STATIC(unsigned int, bucket_change_threshold_rate) = 500; #define V_bucket_change_threshold_rate VNET(bucket_change_threshold_rate) SYSCTL_UINT(_net_route_algo, OID_AUTO, bucket_change_threshold_rate, CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(bucket_change_threshold_rate), 0, "Minimum update rate to delay sync"); /* Max allowed delay to sync */ -VNET_DEFINE(unsigned int, fib_max_sync_delay_ms) = 1000; +VNET_DEFINE_STATIC(unsigned int, fib_max_sync_delay_ms) = 1000; #define V_fib_max_sync_delay_ms VNET(fib_max_sync_delay_ms) SYSCTL_UINT(_net_route_algo, OID_AUTO, fib_max_sync_delay_ms, CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(fib_max_sync_delay_ms), 0, "Maximum time to delay sync (ms)"); @@ -589,7 +589,7 @@ update_rebuild_delay(struct fib_data *fd, enum fib_callout_action action) struct timeval tv; /* Fetch all variables at once to ensure consistent reads */ - uint32_t bucket_time_ms = V_bucket_time_ms; + uint32_t bucket_time_ms = V_update_bucket_time_ms; uint32_t threshold_rate = V_bucket_change_threshold_rate; uint32_t max_delay_ms = V_fib_max_sync_delay_ms; @@ -1618,10 +1618,14 @@ static struct fib_dp ** get_family_dp_ptr(int family) { switch (family) { +#ifdef INET case AF_INET: return (&V_inet_dp); +#endif +#ifdef INET6 case AF_INET6: return (&V_inet6_dp); +#endif } return (NULL); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104290917.13T9HN2I032738>