git: ef2235ec65fd - main - altq: purge EOL release compatibility
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 04 Feb 2023 16:20:08 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=ef2235ec65fdb31a1caf0215c269413b0e7630e5
commit ef2235ec65fdb31a1caf0215c269413b0e7630e5
Author: Elliott Mitchell <ehem+freebsd@m5p.com>
AuthorDate: 2022-06-23 00:53:47 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-02-04 16:10:27 +0000
altq: purge EOL release compatibility
Remove conditionals checking for End-of-Life releases, dating back to
3.0 in this case...
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
---
sys/net/altq/altq_rmclass.c | 8 +-------
sys/net/altq/altq_subr.c | 8 +-------
sys/net/altq/altq_var.h | 10 ----------
3 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/sys/net/altq/altq_rmclass.c b/sys/net/altq/altq_rmclass.c
index 6e64a0a6f80e..886641065d14 100644
--- a/sys/net/altq/altq_rmclass.c
+++ b/sys/net/altq/altq_rmclass.c
@@ -1449,13 +1449,8 @@ void rmc_dropall(struct rm_class *cl)
}
}
-#if (__FreeBSD_version > 300000)
-/* hzto() is removed from FreeBSD-3.0 */
-static int hzto(struct timeval *);
-
static int
-hzto(tv)
- struct timeval *tv;
+hzto(struct timeval *tv)
{
struct timeval t2;
@@ -1464,7 +1459,6 @@ hzto(tv)
t2.tv_usec = tv->tv_usec - t2.tv_usec;
return (tvtohz(&t2));
}
-#endif /* __FreeBSD_version > 300000 */
/*
* void
diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c
index 04ea1bc91e28..d569aa3f3ab3 100644
--- a/sys/net/altq/altq_subr.c
+++ b/sys/net/altq/altq_subr.c
@@ -81,11 +81,7 @@
static void tbr_timeout(void *);
static struct mbuf *tbr_dequeue(struct ifaltq *, int);
static int tbr_timer = 0; /* token bucket regulator timer */
-#if !defined(__FreeBSD__) || (__FreeBSD_version < 600000)
-static struct callout tbr_callout = CALLOUT_INITIALIZER;
-#else
static struct callout tbr_callout;
-#endif
#ifdef ALTQ3_CLFIER_COMPAT
static int extract_ports4(struct mbuf *, struct ip *, struct flowinfo_in *);
@@ -883,7 +879,6 @@ u_int32_t machclk_per_tick;
extern u_int64_t cpu_tsc_freq;
#endif
-#if (__FreeBSD_version >= 700035)
/* Update TSC freq with the value indicated by the caller. */
static void
tsc_freq_changed(void *arg, const struct cf_level *level, int status)
@@ -892,7 +887,7 @@ tsc_freq_changed(void *arg, const struct cf_level *level, int status)
if (status != 0)
return;
-#if (__FreeBSD_version >= 701102) && (defined(__amd64__) || defined(__i386__))
+#if defined(__amd64__) || defined(__i386__)
/* If TSC is P-state invariant, don't do anything. */
if (tsc_is_invariant)
return;
@@ -903,7 +898,6 @@ tsc_freq_changed(void *arg, const struct cf_level *level, int status)
}
EVENTHANDLER_DEFINE(cpufreq_post_change, tsc_freq_changed, NULL,
EVENTHANDLER_PRI_LAST);
-#endif /* __FreeBSD_version >= 700035 */
static void
init_machclk_setup(void)
diff --git a/sys/net/altq/altq_var.h b/sys/net/altq/altq_var.h
index 6763fd972d7d..3be03482b8c9 100644
--- a/sys/net/altq/altq_var.h
+++ b/sys/net/altq/altq_var.h
@@ -64,25 +64,15 @@ struct acc_filter {
#endif
#define ACC_GET_HINDEX(handle) ((handle) >> 20)
-#if (__FreeBSD_version > 500000)
#define ACC_LOCK_INIT(ac) mtx_init(&(ac)->acc_mtx, "classifier", MTX_DEF)
#define ACC_LOCK_DESTROY(ac) mtx_destroy(&(ac)->acc_mtx)
#define ACC_LOCK(ac) mtx_lock(&(ac)->acc_mtx)
#define ACC_UNLOCK(ac) mtx_unlock(&(ac)->acc_mtx)
-#else
-#define ACC_LOCK_INIT(ac)
-#define ACC_LOCK_DESTROY(ac)
-#define ACC_LOCK(ac)
-#define ACC_UNLOCK(ac)
-#endif
struct acc_classifier {
u_int32_t acc_fbmask;
LIST_HEAD(filt, acc_filter) acc_filters[ACC_FILTER_TABLESIZE];
-
-#if (__FreeBSD_version > 500000)
struct mtx acc_mtx;
-#endif
};
/*