Home | History | Annotate | Line # | Download | only in altq
altq_fifoq.c revision 1.7.10.2
      1  1.7.10.2      elad /*	$NetBSD: altq_fifoq.c,v 1.7.10.2 2006/03/10 13:29:35 elad Exp $	*/
      2       1.1   thorpej /*	$KAME: altq_fifoq.c,v 1.7 2000/12/14 08:12:45 thorpej Exp $	*/
      3       1.1   thorpej 
      4       1.1   thorpej /*
      5       1.1   thorpej  * Copyright (C) 1997-2000
      6       1.1   thorpej  *	Sony Computer Science Laboratories Inc.  All rights reserved.
      7       1.1   thorpej  *
      8       1.1   thorpej  * Redistribution and use in source and binary forms, with or without
      9       1.1   thorpej  * modification, are permitted provided that the following conditions
     10       1.1   thorpej  * are met:
     11       1.1   thorpej  * 1. Redistributions of source code must retain the above copyright
     12       1.1   thorpej  *    notice, this list of conditions and the following disclaimer.
     13       1.1   thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     14       1.1   thorpej  *    notice, this list of conditions and the following disclaimer in the
     15       1.1   thorpej  *    documentation and/or other materials provided with the distribution.
     16       1.1   thorpej  *
     17       1.1   thorpej  * THIS SOFTWARE IS PROVIDED BY SONY CSL AND CONTRIBUTORS ``AS IS'' AND
     18       1.1   thorpej  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19       1.1   thorpej  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20       1.1   thorpej  * ARE DISCLAIMED.  IN NO EVENT SHALL SONY CSL OR CONTRIBUTORS BE LIABLE
     21       1.1   thorpej  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22       1.1   thorpej  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23       1.1   thorpej  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24       1.1   thorpej  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25       1.1   thorpej  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26       1.1   thorpej  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27       1.1   thorpej  * SUCH DAMAGE.
     28       1.1   thorpej  */
     29       1.4     lukem 
     30       1.4     lukem #include <sys/cdefs.h>
     31  1.7.10.2      elad __KERNEL_RCSID(0, "$NetBSD: altq_fifoq.c,v 1.7.10.2 2006/03/10 13:29:35 elad Exp $");
     32       1.1   thorpej 
     33       1.1   thorpej #if defined(__FreeBSD__) || defined(__NetBSD__)
     34       1.1   thorpej #include "opt_altq.h"
     35       1.1   thorpej #endif /* __FreeBSD__ || __NetBSD__ */
     36       1.1   thorpej #ifdef ALTQ_FIFOQ  /* fifoq is enabled by ALTQ_FIFOQ option in opt_altq.h */
     37       1.1   thorpej 
     38       1.1   thorpej /*
     39       1.1   thorpej  * FIFOQ is an altq sample implementation.  There will be little
     40       1.1   thorpej  * need to use FIFOQ as an alternative queueing scheme.
     41       1.1   thorpej  * But this code is provided as a template for those who want to
     42       1.1   thorpej  * write their own queueing schemes.
     43       1.1   thorpej  */
     44       1.1   thorpej 
     45       1.1   thorpej #include <sys/param.h>
     46       1.1   thorpej #include <sys/malloc.h>
     47       1.1   thorpej #include <sys/mbuf.h>
     48       1.1   thorpej #include <sys/socket.h>
     49       1.1   thorpej #include <sys/sockio.h>
     50       1.1   thorpej #include <sys/systm.h>
     51       1.1   thorpej #include <sys/proc.h>
     52       1.1   thorpej #include <sys/errno.h>
     53       1.1   thorpej #include <sys/kernel.h>
     54       1.1   thorpej 
     55       1.1   thorpej #include <net/if.h>
     56       1.1   thorpej #include <net/if_types.h>
     57       1.1   thorpej #include <netinet/in.h>
     58       1.1   thorpej 
     59       1.1   thorpej #include <altq/altq.h>
     60       1.1   thorpej #include <altq/altq_conf.h>
     61       1.1   thorpej #include <altq/altq_fifoq.h>
     62       1.1   thorpej 
     63       1.1   thorpej /* fifoq_list keeps all fifoq_state_t's allocated. */
     64       1.1   thorpej static fifoq_state_t *fifoq_list = NULL;
     65       1.1   thorpej 
     66       1.1   thorpej /* internal function prototypes */
     67       1.1   thorpej static int		fifoq_enqueue __P((struct ifaltq *, struct mbuf *,
     68       1.1   thorpej 					   struct altq_pktattr *));
     69       1.1   thorpej static struct mbuf 	*fifoq_dequeue __P((struct ifaltq *, int));
     70       1.1   thorpej static int 		fifoq_detach __P((fifoq_state_t *));
     71       1.1   thorpej static int		fifoq_request __P((struct ifaltq *, int, void *));
     72       1.1   thorpej static void 		fifoq_purge __P((fifoq_state_t *));
     73       1.1   thorpej 
     74       1.1   thorpej /*
     75       1.1   thorpej  * fifoq device interface
     76       1.1   thorpej  */
     77       1.1   thorpej altqdev_decl(fifoq);
     78       1.1   thorpej 
     79       1.1   thorpej int
     80       1.7  christos fifoqopen(dev, flag, fmt, l)
     81       1.1   thorpej 	dev_t dev;
     82       1.1   thorpej 	int flag, fmt;
     83       1.7  christos 	struct lwp *l;
     84       1.1   thorpej {
     85       1.1   thorpej 	/* everything will be done when the queueing scheme is attached. */
     86       1.1   thorpej 	return 0;
     87       1.1   thorpej }
     88       1.1   thorpej 
     89       1.1   thorpej /*
     90       1.1   thorpej  * there are 2 ways to act on close.
     91       1.1   thorpej  *   detach-all-on-close:
     92       1.1   thorpej  *	use for the daemon style approach.  if the daemon dies, all the
     93       1.1   thorpej  *	resource will be released.
     94       1.1   thorpej  *   no-action-on-close:
     95       1.1   thorpej  *	use for the command style approach.  (e.g.  fifoq on/off)
     96       1.1   thorpej  *
     97       1.1   thorpej  * note: close is called not on every close but when the last reference
     98       1.1   thorpej  *       is removed (only once with multiple simultaneous references.)
     99       1.1   thorpej  */
    100       1.1   thorpej int
    101       1.7  christos fifoqclose(dev, flag, fmt, l)
    102       1.1   thorpej 	dev_t dev;
    103       1.1   thorpej 	int flag, fmt;
    104       1.7  christos 	struct lwp *l;
    105       1.1   thorpej {
    106       1.1   thorpej 	fifoq_state_t *q;
    107       1.1   thorpej 	int err, error = 0;
    108       1.1   thorpej 
    109       1.1   thorpej 	while ((q = fifoq_list) != NULL) {
    110       1.1   thorpej 		/* destroy all */
    111       1.1   thorpej 		err = fifoq_detach(q);
    112       1.1   thorpej 		if (err != 0 && error == 0)
    113       1.1   thorpej 			error = err;
    114       1.1   thorpej 	}
    115       1.1   thorpej 
    116       1.1   thorpej 	return error;
    117       1.1   thorpej }
    118       1.1   thorpej 
    119       1.1   thorpej int
    120       1.7  christos fifoqioctl(dev, cmd, addr, flag, l)
    121       1.1   thorpej 	dev_t dev;
    122       1.1   thorpej 	ioctlcmd_t cmd;
    123       1.1   thorpej 	caddr_t addr;
    124       1.1   thorpej 	int flag;
    125       1.7  christos 	struct lwp *l;
    126       1.1   thorpej {
    127       1.1   thorpej 	fifoq_state_t *q;
    128       1.1   thorpej 	struct fifoq_interface *ifacep;
    129       1.1   thorpej 	struct ifnet *ifp;
    130       1.7  christos 	struct proc *p = l->l_proc;
    131       1.1   thorpej 	int	error = 0;
    132       1.1   thorpej 
    133       1.1   thorpej 	/* check super-user privilege */
    134       1.1   thorpej 	switch (cmd) {
    135       1.1   thorpej 	case FIFOQ_GETSTATS:
    136       1.1   thorpej 		break;
    137       1.1   thorpej 	default:
    138       1.1   thorpej #if (__FreeBSD_version > 400000)
    139       1.1   thorpej 		if ((error = suser(p)) != 0)
    140       1.1   thorpej 			return (error);
    141       1.1   thorpej #else
    142  1.7.10.2      elad 		if ((error = kauth_authorize_generic(p->p_cred,
    143  1.7.10.1      elad 					       KAUTH_GENERIC_ISSUSER,
    144  1.7.10.1      elad 					       &p->p_acflag)) != 0)
    145       1.1   thorpej 			return (error);
    146       1.1   thorpej #endif
    147       1.1   thorpej 		break;
    148       1.1   thorpej 	}
    149       1.6     perry 
    150       1.1   thorpej 	switch (cmd) {
    151       1.1   thorpej 	case FIFOQ_ENABLE:
    152       1.1   thorpej 		ifacep = (struct fifoq_interface *)addr;
    153       1.1   thorpej 		if ((q = altq_lookup(ifacep->fifoq_ifname, ALTQT_FIFOQ))
    154       1.1   thorpej 		    == NULL) {
    155       1.1   thorpej 			error = EBADF;
    156       1.1   thorpej 			break;
    157       1.1   thorpej 		}
    158       1.1   thorpej 		error = altq_enable(q->q_ifq);
    159       1.1   thorpej 		break;
    160       1.1   thorpej 
    161       1.1   thorpej 	case FIFOQ_DISABLE:
    162       1.1   thorpej 		ifacep = (struct fifoq_interface *)addr;
    163       1.1   thorpej 		if ((q = altq_lookup(ifacep->fifoq_ifname, ALTQT_FIFOQ))
    164       1.1   thorpej 		    == NULL) {
    165       1.1   thorpej 			error = EBADF;
    166       1.1   thorpej 			break;
    167       1.1   thorpej 		}
    168       1.1   thorpej 		error = altq_disable(q->q_ifq);
    169       1.1   thorpej 		break;
    170       1.1   thorpej 
    171       1.1   thorpej 	case FIFOQ_IF_ATTACH:
    172       1.1   thorpej 		ifp = ifunit(((struct fifoq_interface *)addr)->fifoq_ifname);
    173       1.1   thorpej 		if (ifp == NULL) {
    174       1.1   thorpej 			error = ENXIO;
    175       1.1   thorpej 			break;
    176       1.1   thorpej 		}
    177       1.1   thorpej 
    178       1.1   thorpej 		/* allocate and initialize fifoq_state_t */
    179       1.1   thorpej 		MALLOC(q, fifoq_state_t *, sizeof(fifoq_state_t),
    180       1.1   thorpej 		       M_DEVBUF, M_WAITOK);
    181       1.1   thorpej 		if (q == NULL) {
    182       1.1   thorpej 			error = ENOMEM;
    183       1.1   thorpej 			break;
    184       1.1   thorpej 		}
    185       1.5  christos 		(void)memset(q, 0, sizeof(fifoq_state_t));
    186       1.1   thorpej 
    187       1.1   thorpej 		q->q_ifq = &ifp->if_snd;
    188       1.1   thorpej 		q->q_head = q->q_tail = NULL;
    189       1.1   thorpej 		q->q_len = 0;
    190       1.1   thorpej 		q->q_limit = FIFOQ_LIMIT;
    191       1.1   thorpej 
    192       1.1   thorpej 		/*
    193       1.1   thorpej 		 * set FIFOQ to this ifnet structure.
    194       1.1   thorpej 		 */
    195       1.1   thorpej 		error = altq_attach(q->q_ifq, ALTQT_FIFOQ, q,
    196       1.1   thorpej 				    fifoq_enqueue, fifoq_dequeue, fifoq_request,
    197       1.1   thorpej 				    NULL, NULL);
    198       1.1   thorpej 		if (error) {
    199       1.1   thorpej 			FREE(q, M_DEVBUF);
    200       1.1   thorpej 			break;
    201       1.1   thorpej 		}
    202       1.1   thorpej 
    203       1.1   thorpej 		/* add this state to the fifoq list */
    204       1.1   thorpej 		q->q_next = fifoq_list;
    205       1.1   thorpej 		fifoq_list = q;
    206       1.1   thorpej 		break;
    207       1.1   thorpej 
    208       1.1   thorpej 	case FIFOQ_IF_DETACH:
    209       1.1   thorpej 		ifacep = (struct fifoq_interface *)addr;
    210       1.1   thorpej 		if ((q = altq_lookup(ifacep->fifoq_ifname, ALTQT_FIFOQ))
    211       1.1   thorpej 		    == NULL) {
    212       1.1   thorpej 			error = EBADF;
    213       1.1   thorpej 			break;
    214       1.1   thorpej 		}
    215       1.1   thorpej 		error = fifoq_detach(q);
    216       1.1   thorpej 		break;
    217       1.1   thorpej 
    218       1.1   thorpej 	case FIFOQ_GETSTATS:
    219       1.1   thorpej 		do {
    220       1.1   thorpej 			struct fifoq_getstats *q_stats;
    221       1.1   thorpej 
    222       1.1   thorpej 			q_stats = (struct fifoq_getstats *)addr;
    223       1.1   thorpej 			if ((q = altq_lookup(q_stats->iface.fifoq_ifname,
    224       1.1   thorpej 					     ALTQT_FIFOQ)) == NULL) {
    225       1.1   thorpej 				error = EBADF;
    226       1.1   thorpej 				break;
    227       1.1   thorpej 			}
    228       1.1   thorpej 
    229       1.1   thorpej 			q_stats->q_len		= q->q_len;
    230       1.1   thorpej 			q_stats->q_limit 	= q->q_limit;
    231       1.1   thorpej 			q_stats->xmit_cnt	= q->q_stats.xmit_cnt;
    232       1.1   thorpej 			q_stats->drop_cnt 	= q->q_stats.drop_cnt;
    233       1.1   thorpej 			q_stats->period   	= q->q_stats.period;
    234       1.1   thorpej 		} while (0);
    235       1.1   thorpej 		break;
    236       1.1   thorpej 
    237       1.1   thorpej 	case FIFOQ_CONFIG:
    238       1.1   thorpej 		do {
    239       1.1   thorpej 			struct fifoq_conf *fc;
    240       1.1   thorpej 			int limit;
    241       1.1   thorpej 
    242       1.1   thorpej 			fc = (struct fifoq_conf *)addr;
    243       1.1   thorpej 			if ((q = altq_lookup(fc->iface.fifoq_ifname,
    244       1.1   thorpej 					     ALTQT_FIFOQ)) == NULL) {
    245       1.1   thorpej 				error = EBADF;
    246       1.1   thorpej 				break;
    247       1.1   thorpej 			}
    248       1.1   thorpej 			limit = fc->fifoq_limit;
    249       1.1   thorpej 			if (limit < 0)
    250       1.1   thorpej 				limit = 0;
    251       1.1   thorpej 			q->q_limit = limit;
    252       1.1   thorpej 			fc->fifoq_limit = limit;
    253       1.1   thorpej 		} while (0);
    254       1.1   thorpej 		break;
    255       1.1   thorpej 
    256       1.1   thorpej 	default:
    257       1.1   thorpej 		error = EINVAL;
    258       1.1   thorpej 		break;
    259       1.1   thorpej 	}
    260       1.1   thorpej 	return error;
    261       1.1   thorpej }
    262       1.1   thorpej 
    263       1.1   thorpej /*
    264       1.1   thorpej  * fifoq support routines
    265       1.1   thorpej  */
    266       1.1   thorpej 
    267       1.1   thorpej /*
    268       1.1   thorpej  * enqueue routine:
    269       1.1   thorpej  *
    270       1.1   thorpej  *	returns: 0 when successfully queued.
    271       1.1   thorpej  *		 ENOBUFS when drop occurs.
    272       1.1   thorpej  */
    273       1.1   thorpej static int
    274       1.1   thorpej fifoq_enqueue(ifq, m, pktattr)
    275       1.1   thorpej 	struct ifaltq *ifq;
    276       1.1   thorpej 	struct mbuf *m;
    277       1.1   thorpej 	struct altq_pktattr *pktattr;
    278       1.1   thorpej {
    279       1.1   thorpej 	fifoq_state_t *q = (fifoq_state_t *)ifq->altq_disc;
    280       1.1   thorpej 
    281       1.1   thorpej 	/* if the queue is full, drop the incoming packet(drop-tail) */
    282       1.1   thorpej 	if (q->q_len >= q->q_limit) {
    283       1.1   thorpej #ifdef FIFOQ_STATS
    284       1.1   thorpej 		PKTCNTR_ADD(&q->q_stats.drop_cnt, m_pktlen(m));
    285       1.1   thorpej #endif
    286       1.1   thorpej 		m_freem(m);
    287       1.1   thorpej 		return (ENOBUFS);
    288       1.1   thorpej 	}
    289       1.1   thorpej 
    290       1.1   thorpej 	/* enqueue the packet at the taile of the queue */
    291       1.1   thorpej 	m->m_nextpkt = NULL;
    292       1.1   thorpej 	if (q->q_tail == NULL)
    293       1.1   thorpej 		q->q_head = m;
    294       1.1   thorpej 	else
    295       1.1   thorpej 		q->q_tail->m_nextpkt = m;
    296       1.1   thorpej 	q->q_tail = m;
    297       1.1   thorpej 	q->q_len++;
    298       1.1   thorpej 	ifq->ifq_len++;
    299       1.1   thorpej 	return 0;
    300       1.1   thorpej }
    301       1.1   thorpej 
    302       1.1   thorpej /*
    303       1.1   thorpej  * dequeue routine:
    304       1.3   thorpej  *	must be called in splnet.
    305       1.1   thorpej  *
    306       1.1   thorpej  *	returns: mbuf dequeued.
    307       1.1   thorpej  *		 NULL when no packet is available in the queue.
    308       1.1   thorpej  */
    309       1.1   thorpej /*
    310       1.1   thorpej  * ALTDQ_PEEK is provided for drivers which need to know the next packet
    311       1.1   thorpej  * to send in advance.
    312       1.1   thorpej  * when ALTDQ_PEEK is specified, the next packet to be dequeued is
    313       1.1   thorpej  * returned without dequeueing the packet.
    314       1.1   thorpej  * when ALTDQ_DEQUEUE is called *immediately after* an ALTDQ_PEEK
    315       1.1   thorpej  * operation, the same packet should be returned.
    316       1.1   thorpej  */
    317       1.1   thorpej static struct mbuf *
    318       1.1   thorpej fifoq_dequeue(ifq, op)
    319       1.1   thorpej 	struct ifaltq *ifq;
    320       1.1   thorpej 	int op;
    321       1.1   thorpej {
    322       1.1   thorpej 	fifoq_state_t *q = (fifoq_state_t *)ifq->altq_disc;
    323       1.1   thorpej 	struct mbuf *m = NULL;
    324       1.1   thorpej 
    325       1.1   thorpej 	if (op == ALTDQ_POLL)
    326       1.1   thorpej 		return (q->q_head);
    327       1.6     perry 
    328       1.1   thorpej 	if ((m = q->q_head) == NULL)
    329       1.1   thorpej 		return (NULL);
    330       1.1   thorpej 
    331       1.1   thorpej 	if ((q->q_head = m->m_nextpkt) == NULL)
    332       1.1   thorpej 		q->q_tail = NULL;
    333       1.1   thorpej 	m->m_nextpkt = NULL;
    334       1.1   thorpej 	q->q_len--;
    335       1.1   thorpej 	ifq->ifq_len--;
    336       1.1   thorpej #ifdef FIFOQ_STATS
    337       1.1   thorpej 	PKTCNTR_ADD(&q->q_stats.xmit_cnt, m_pktlen(m));
    338       1.1   thorpej 	if (q->q_len == 0)
    339       1.1   thorpej 		q->q_stats.period++;
    340       1.1   thorpej #endif
    341       1.1   thorpej 	return (m);
    342       1.1   thorpej }
    343       1.1   thorpej 
    344       1.1   thorpej static int
    345       1.1   thorpej fifoq_request(ifq, req, arg)
    346       1.1   thorpej 	struct ifaltq *ifq;
    347       1.1   thorpej 	int req;
    348       1.1   thorpej 	void *arg;
    349       1.1   thorpej {
    350       1.1   thorpej 	fifoq_state_t *q = (fifoq_state_t *)ifq->altq_disc;
    351       1.1   thorpej 
    352       1.1   thorpej 	switch (req) {
    353       1.1   thorpej 	case ALTRQ_PURGE:
    354       1.1   thorpej 		fifoq_purge(q);
    355       1.1   thorpej 		break;
    356       1.1   thorpej 	}
    357       1.1   thorpej 	return (0);
    358       1.1   thorpej }
    359       1.1   thorpej 
    360       1.1   thorpej 
    361       1.1   thorpej static int fifoq_detach(q)
    362       1.1   thorpej 	fifoq_state_t *q;
    363       1.1   thorpej {
    364       1.1   thorpej 	fifoq_state_t *tmp;
    365       1.1   thorpej 	int error = 0;
    366       1.1   thorpej 
    367       1.1   thorpej 	if (ALTQ_IS_ENABLED(q->q_ifq))
    368       1.1   thorpej 		altq_disable(q->q_ifq);
    369       1.1   thorpej 
    370       1.1   thorpej 	fifoq_purge(q);
    371       1.1   thorpej 
    372       1.1   thorpej 	if ((error = altq_detach(q->q_ifq)))
    373       1.1   thorpej 		return (error);
    374       1.1   thorpej 
    375       1.1   thorpej 	if (fifoq_list == q)
    376       1.1   thorpej 		fifoq_list = q->q_next;
    377       1.1   thorpej 	else {
    378       1.1   thorpej 		for (tmp = fifoq_list; tmp != NULL; tmp = tmp->q_next)
    379       1.1   thorpej 			if (tmp->q_next == q) {
    380       1.1   thorpej 				tmp->q_next = q->q_next;
    381       1.1   thorpej 				break;
    382       1.1   thorpej 			}
    383       1.1   thorpej 		if (tmp == NULL)
    384       1.1   thorpej 			printf("fifoq_detach: no state in fifoq_list!\n");
    385       1.1   thorpej 	}
    386       1.1   thorpej 
    387       1.1   thorpej 	FREE(q, M_DEVBUF);
    388       1.1   thorpej 	return (error);
    389       1.1   thorpej }
    390       1.1   thorpej 
    391       1.1   thorpej /*
    392       1.1   thorpej  * fifoq_purge
    393       1.3   thorpej  * should be called in splnet or after disabling the fifoq.
    394       1.1   thorpej  */
    395       1.1   thorpej static void fifoq_purge(q)
    396       1.1   thorpej 	fifoq_state_t *q;
    397       1.1   thorpej {
    398       1.1   thorpej 	struct mbuf *m;
    399       1.1   thorpej 
    400       1.1   thorpej 	while ((m = q->q_head) != NULL) {
    401       1.1   thorpej 		q->q_head = m->m_nextpkt;
    402       1.1   thorpej 		m_freem(m);
    403       1.1   thorpej 	}
    404       1.1   thorpej 	q->q_tail = NULL;
    405       1.1   thorpej 	q->q_len = 0;
    406       1.1   thorpej 	if (ALTQ_IS_ENABLED(q->q_ifq))
    407       1.1   thorpej 		q->q_ifq->ifq_len = 0;
    408       1.1   thorpej }
    409       1.1   thorpej 
    410       1.1   thorpej #ifdef KLD_MODULE
    411       1.1   thorpej 
    412       1.1   thorpej static struct altqsw fifoq_sw =
    413       1.1   thorpej 	{"fifoq", fifoqopen, fifoqclose, fifoqioctl};
    414       1.1   thorpej 
    415       1.1   thorpej ALTQ_MODULE(altq_fifoq, ALTQT_FIFOQ, &fifoq_sw);
    416       1.1   thorpej 
    417       1.1   thorpej #endif /* KLD_MODULE */
    418       1.1   thorpej 
    419       1.1   thorpej #endif /* ALTQ_FIFOQ */
    420