1 .\" $OpenBSD: altq.9,v 1.4 2001/07/12 12:41:42 itojun Exp $
2 .\" $NetBSD: altq.9,v 1.14 2007/06/24 19:26:58 rumble Exp $
3 .\" $DragonFly: src/share/man/man9/altq.9,v 1.1 2007/11/18 14:10:41 swildner Exp $
6 .\" Sony Computer Science Laboratories Inc. All rights reserved.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
17 .\" THIS SOFTWARE IS PROVIDED BY SONY CSL AND CONTRIBUTORS ``AS IS'' AND
18 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED. IN NO EVENT SHALL SONY CSL OR CONTRIBUTORS BE LIABLE
21 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .Nd kernel interfaces for manipulating output queues on network interfaces
41 .Fn ifq_enqueue "struct ifaltq *_ifq" "struct mbuf *_m" "struct altq_pkgattr *_pa"
43 .Fn ifq_handoff "struct ifnet *_ifp" "struct mbuf *_m" "struct altq_pkgattr *_pa"
45 .Fn ifq_dequeue "struct ifaltq *_ifq" "struct mbuf *_mpolled"
47 .Fn ifq_poll "struct ifaltq *_ifq"
49 .Fn ifq_purge "struct ifaltq *_ifq"
51 .Fn ifq_classify "struct ifaltq *_ifq" "struct mbuf *_m" "uint8_t _af" "struct altq_pkgattr *_pa"
53 .Fn ifq_is_empty "struct ifaltq *_ifq"
55 .Fn ifq_set_maxlen "struct ifaltq *_ifq" "int _len"
57 .Fn ifq_set_ready "struct ifaltq *_ifq"
59 .Fn ifq_is_enabled "struct ifaltq *_ifq"
63 system is a framework to manage queueing disciplines on network
66 introduces new functions to manipulate output queues.
67 The output queue functions are used to abstract queue operations and not to
68 touch the internal fields of the output queue structure.
77 The underlying queueing discipline may discard the packet.
78 They return 0 on success, or
80 if the packet is discarded.
81 The packet pointed to by
83 will be freed by the device driver on success or by the queueing discipline on
84 failure, so that the caller should not touch
89 combines the enqueue operation with statistic generation and calls
91 upon successful enqueue to initiate the actual send.
94 dequeues a packet from the queue.
95 It returns the dequeued packet, or
97 if no packet is dequeued.
98 The caller must always check the return value
99 since a non-empty queue could return
104 returns the next packet without removing it from the queue.
105 It is guaranteed by the underlying queueing discipline that
109 returns the same packet.
112 discards all the packets in the queue.
113 The purge operation is needed since a non-work conserving queue cannot be
114 emptied by a dequeue loop.
117 classifies a packet to a scheduling class, and returns the result in
121 can be used to check if the queue is empty.
126 if the queueing discipline is non-work conserving.
129 sets the queue length limit to the default FIFO queue.
132 sets a flag to indicate that this driver is converted to use the new macros.
134 can be enabled only on interfaces with this flag.
139 is enabled for the queue, 0 if not.
140 .Sh QUEUEING DISCIPLINES
141 Queueing disciplines need to maintain
147 Queueing disciplines also need to guarantee that the same mbuf is returned if
149 is called immediately after
159 system first appeared in March 1997 and was imported into