1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

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
This commit is contained in:
Elliott Mitchell 2022-06-22 17:53:47 -07:00 committed by Warner Losh
parent 6f52f85048
commit ef2235ec65
3 changed files with 2 additions and 24 deletions

View File

@ -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

View File

@ -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)

View File

@ -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
};
/*