summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/altq/altq/altq_subr.c6
-rw-r--r--sys/contrib/altq/altq/if_altq.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/contrib/altq/altq/altq_subr.c b/sys/contrib/altq/altq/altq_subr.c
index 435f7ab..b673d3c 100644
--- a/sys/contrib/altq/altq/altq_subr.c
+++ b/sys/contrib/altq/altq/altq_subr.c
@@ -91,6 +91,7 @@
*/
static void tbr_timeout(void *);
int (*altq_input)(struct mbuf *, int) = NULL;
+static struct mbuf *tbr_dequeue(struct ifaltq *, int);
static int tbr_timer = 0; /* token bucket regulator timer */
static struct callout tbr_callout = CALLOUT_INITIALIZER;
@@ -312,7 +313,7 @@ altq_assert(file, line, failedexpr)
#define TBR_SCALE(x) ((int64_t)(x) << TBR_SHIFT)
#define TBR_UNSCALE(x) ((x) >> TBR_SHIFT)
-struct mbuf *
+static struct mbuf *
tbr_dequeue(ifq, op)
struct ifaltq *ifq;
int op;
@@ -370,6 +371,9 @@ tbr_set(ifq, profile)
struct tb_profile *profile;
{
struct tb_regulator *tbr, *otbr;
+
+ if (tbr_dequeue_ptr == NULL)
+ tbr_dequeue_ptr = tbr_dequeue;
if (machclk_freq == 0)
init_machclk();
diff --git a/sys/contrib/altq/altq/if_altq.h b/sys/contrib/altq/altq/if_altq.h
index 8e60587..0676e40 100644
--- a/sys/contrib/altq/altq/if_altq.h
+++ b/sys/contrib/altq/altq/if_altq.h
@@ -181,9 +181,9 @@ extern int altq_attach(struct ifaltq *, int, void *,
extern int altq_detach(struct ifaltq *);
extern int altq_enable(struct ifaltq *);
extern int altq_disable(struct ifaltq *);
-extern struct mbuf *tbr_dequeue(struct ifaltq *, int);
+extern struct mbuf *(*tbr_dequeue_ptr)(struct ifaltq *, int);
extern int (*altq_input)(struct mbuf *, int);
-#if 1 /* ALTQ3_CLFIER_COMPAT */
+#if 0 /* ALTQ3_CLFIER_COMPAT */
void altq_etherclassify(struct ifaltq *, struct mbuf *, struct altq_pktattr *);
#endif
#endif /* _KERNEL */
OpenPOWER on IntegriCloud