summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorpelikan <pelikan@cvs.openbsd.org>2013-10-31 13:19:18 +0000
committerpelikan <pelikan@cvs.openbsd.org>2013-10-31 13:19:18 +0000
commitc58031f643cd172402b0ea8d0e6923d630817fe4 (patch)
treecf748c880ef45a83ff5ee66b65ff7170b52a06c5 /sys
parent7195ff1b9ed488014eca93b3d347bdad73f54868 (diff)
revert previous, net/if.h exports bad things to userspace.
Diffstat (limited to 'sys')
-rw-r--r--sys/net/hfsc.c23
-rw-r--r--sys/net/hfsc.h5
2 files changed, 2 insertions, 26 deletions
diff --git a/sys/net/hfsc.c b/sys/net/hfsc.c
index f11a3b5654c..07e863cb39d 100644
--- a/sys/net/hfsc.c
+++ b/sys/net/hfsc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hfsc.c,v 1.2 2013/10/31 08:52:44 pelikan Exp $ */
+/* $OpenBSD: hfsc.c,v 1.3 2013/10/31 13:19:17 pelikan Exp $ */
/*
* Copyright (c) 2012-2013 Henning Brauer <henning@openbsd.org>
@@ -74,7 +74,6 @@ int hfsc_addq(struct hfsc_class *, struct mbuf *);
struct mbuf *hfsc_getq(struct hfsc_class *);
struct mbuf *hfsc_pollq(struct hfsc_class *);
void hfsc_purgeq(struct hfsc_class *);
-void hfsc_deferred(void *);
void hfsc_update_cfmin(struct hfsc_class *);
void hfsc_set_active(struct hfsc_class *, int);
void hfsc_set_passive(struct hfsc_class *);
@@ -141,9 +140,6 @@ hfsc_attach(struct ifnet *ifp)
hif->hif_eligible = hfsc_ellist_alloc();
hif->hif_ifq = (struct ifqueue *)&ifp->if_snd; /* XXX cast temp */
ifp->if_snd.ifq_hfsc = hif;
- timeout_set(&hif->hif_defer, hfsc_deferred, ifp);
- /* XXX HRTIMER don't schedule it yet, only when some packets wait. */
- timeout_add(&hif->hif_defer, 1);
return (0);
}
@@ -151,7 +147,6 @@ hfsc_attach(struct ifnet *ifp)
int
hfsc_detach(struct ifnet *ifp)
{
- timeout_del(&ifp->if_snd.ifq_hfsc->hif_defer);
free(ifp->if_snd.ifq_hfsc, M_DEVBUF);
ifp->if_snd.ifq_hfsc = NULL;
@@ -562,7 +557,6 @@ hfsc_dequeue(struct ifqueue *ifq, int remove)
cl = tcl;
}
- /* XXX HRTIMER plan hfsc_deferred precisely here. */
if (cl == NULL)
return (NULL);
}
@@ -609,21 +603,6 @@ hfsc_dequeue(struct ifqueue *ifq, int remove)
return (m);
}
-void
-hfsc_deferred(void *arg)
-{
- struct ifnet *ifp = arg;
- int s;
-
- s = splnet();
- if (HFSC_ENABLED(&ifp->if_snd) && !IFQ_IS_EMPTY(&ifp->if_snd))
- if_start(ifp);
- splx(s);
-
- /* XXX HRTIMER nearest virtual/fit time is likely less than 1/HZ. */
- timeout_add(&ifp->if_snd.ifq_hfsc->hif_defer, 1);
-}
-
int
hfsc_addq(struct hfsc_class *cl, struct mbuf *m)
{
diff --git a/sys/net/hfsc.h b/sys/net/hfsc.h
index ae362bda6ca..08ce66704d2 100644
--- a/sys/net/hfsc.h
+++ b/sys/net/hfsc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hfsc.h,v 1.2 2013/10/31 08:52:44 pelikan Exp $ */
+/* $OpenBSD: hfsc.h,v 1.3 2013/10/31 13:19:17 pelikan Exp $ */
/*
* Copyright (c) 2012-2013 Henning Brauer <henning@openbsd.org>
@@ -33,8 +33,6 @@
#ifndef _HFSC_H_
#define _HFSC_H_
-#include <sys/timeout.h>
-
/* hfsc class flags */
#define HFSC_RED 0x0001 /* use RED */
#define HFSC_ECN 0x0002 /* use RED/ECN */
@@ -244,7 +242,6 @@ struct hfsc_if {
u_int hif_classid; /* class id sequence number */
hfsc_ellist_t *hif_eligible; /* eligible list */
- struct timeout hif_defer; /* for queues that weren't ready */
};
#define HFSC_CLK_SHIFT 8