xref: /xnu-8792.41.9/bsd/net/classq/classq_fq_codel.h (revision 5c2921b07a2480ab43ec66f5b9e41cb872bc554f)
1*5c2921b0SApple OSS Distributions /*
2*5c2921b0SApple OSS Distributions  * Copyright (c) 2016-2021 Apple Inc. All rights reserved.
3*5c2921b0SApple OSS Distributions  *
4*5c2921b0SApple OSS Distributions  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5*5c2921b0SApple OSS Distributions  *
6*5c2921b0SApple OSS Distributions  * This file contains Original Code and/or Modifications of Original Code
7*5c2921b0SApple OSS Distributions  * as defined in and that are subject to the Apple Public Source License
8*5c2921b0SApple OSS Distributions  * Version 2.0 (the 'License'). You may not use this file except in
9*5c2921b0SApple OSS Distributions  * compliance with the License. The rights granted to you under the License
10*5c2921b0SApple OSS Distributions  * may not be used to create, or enable the creation or redistribution of,
11*5c2921b0SApple OSS Distributions  * unlawful or unlicensed copies of an Apple operating system, or to
12*5c2921b0SApple OSS Distributions  * circumvent, violate, or enable the circumvention or violation of, any
13*5c2921b0SApple OSS Distributions  * terms of an Apple operating system software license agreement.
14*5c2921b0SApple OSS Distributions  *
15*5c2921b0SApple OSS Distributions  * Please obtain a copy of the License at
16*5c2921b0SApple OSS Distributions  * http://www.opensource.apple.com/apsl/ and read it before using this file.
17*5c2921b0SApple OSS Distributions  *
18*5c2921b0SApple OSS Distributions  * The Original Code and all software distributed under the License are
19*5c2921b0SApple OSS Distributions  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20*5c2921b0SApple OSS Distributions  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21*5c2921b0SApple OSS Distributions  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22*5c2921b0SApple OSS Distributions  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23*5c2921b0SApple OSS Distributions  * Please see the License for the specific language governing rights and
24*5c2921b0SApple OSS Distributions  * limitations under the License.
25*5c2921b0SApple OSS Distributions  *
26*5c2921b0SApple OSS Distributions  * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27*5c2921b0SApple OSS Distributions  */
28*5c2921b0SApple OSS Distributions 
29*5c2921b0SApple OSS Distributions #ifndef _NET_CLASSQ_CLASSQ_FQ_CODEL_H
30*5c2921b0SApple OSS Distributions #define _NET_CLASSQ_CLASSQ_FQ_CODEL_H
31*5c2921b0SApple OSS Distributions #ifdef PRIVATE
32*5c2921b0SApple OSS Distributions #ifdef BSD_KERNEL_PRIVATE
33*5c2921b0SApple OSS Distributions #include <stdbool.h>
34*5c2921b0SApple OSS Distributions #include <sys/time.h>
35*5c2921b0SApple OSS Distributions #include <net/flowadv.h>
36*5c2921b0SApple OSS Distributions #include <net/classq/if_classq.h>
37*5c2921b0SApple OSS Distributions #if SKYWALK
38*5c2921b0SApple OSS Distributions #include <skywalk/os_skywalk_private.h>
39*5c2921b0SApple OSS Distributions #endif /* SKYWALK */
40*5c2921b0SApple OSS Distributions 
41*5c2921b0SApple OSS Distributions #ifdef __cplusplus
42*5c2921b0SApple OSS Distributions extern "C" {
43*5c2921b0SApple OSS Distributions #endif
44*5c2921b0SApple OSS Distributions 
45*5c2921b0SApple OSS Distributions #define AQM_KTRACE_AON_FLOW_HIGH_DELAY    AQMDBG_CODE(DBG_AQM_ALWAYSON, 0x001)
46*5c2921b0SApple OSS Distributions #define AQM_KTRACE_AON_THROTTLE           AQMDBG_CODE(DBG_AQM_ALWAYSON, 0x002)
47*5c2921b0SApple OSS Distributions #define AQM_KTRACE_AON_FLOW_OVERWHELMING  AQMDBG_CODE(DBG_AQM_ALWAYSON, 0x003)
48*5c2921b0SApple OSS Distributions #define AQM_KTRACE_AON_FLOW_DQ_STALL      AQMDBG_CODE(DBG_AQM_ALWAYSON, 0x004)
49*5c2921b0SApple OSS Distributions 
50*5c2921b0SApple OSS Distributions #define AQM_KTRACE_STATS_FLOW_ENQUEUE   AQMDBG_CODE(DBG_AQM_STATS, 0x001)
51*5c2921b0SApple OSS Distributions #define AQM_KTRACE_STATS_FLOW_DEQUEUE   AQMDBG_CODE(DBG_AQM_STATS, 0x002)
52*5c2921b0SApple OSS Distributions #define AQM_KTRACE_STATS_FLOW_CTL       AQMDBG_CODE(DBG_AQM_STATS, 0x003)
53*5c2921b0SApple OSS Distributions #define AQM_KTRACE_STATS_FLOW_ALLOC     AQMDBG_CODE(DBG_AQM_STATS, 0x004)
54*5c2921b0SApple OSS Distributions #define AQM_KTRACE_STATS_FLOW_DESTROY   AQMDBG_CODE(DBG_AQM_STATS, 0x005)
55*5c2921b0SApple OSS Distributions 
56*5c2921b0SApple OSS Distributions #define AQM_KTRACE_FQ_GRP_SC_IDX(_fq_) \
57*5c2921b0SApple OSS Distributions 	((_fq_)->fq_group->fqg_index << 4 | (_fq_)->fq_sc_index)
58*5c2921b0SApple OSS Distributions 
59*5c2921b0SApple OSS Distributions #define FQ_MIN_FC_THRESHOLD_BYTES       7500
60*5c2921b0SApple OSS Distributions #define FQ_IS_DELAY_HIGH(_fq_)   ((_fq_)->fq_flags & FQF_DELAY_HIGH)
61*5c2921b0SApple OSS Distributions #define FQ_SET_DELAY_HIGH(_fq_) do {                          \
62*5c2921b0SApple OSS Distributions     if (!FQ_IS_DELAY_HIGH(_fq_)) {                              \
63*5c2921b0SApple OSS Distributions 	KDBG(AQM_KTRACE_AON_FLOW_HIGH_DELAY | DBG_FUNC_START, \
64*5c2921b0SApple OSS Distributions 	    (_fq_)->fq_flowhash, AQM_KTRACE_FQ_GRP_SC_IDX((_fq_)),    \
65*5c2921b0SApple OSS Distributions 	    (_fq_)->fq_bytes, (_fq_)->fq_min_qdelay);                 \
66*5c2921b0SApple OSS Distributions     }                                                                 \
67*5c2921b0SApple OSS Distributions     (_fq_)->fq_flags |= FQF_DELAY_HIGH; \
68*5c2921b0SApple OSS Distributions     } while (0)
69*5c2921b0SApple OSS Distributions #define FQ_CLEAR_DELAY_HIGH(_fq_) do { \
70*5c2921b0SApple OSS Distributions     if (FQ_IS_DELAY_HIGH(_fq_)) {        \
71*5c2921b0SApple OSS Distributions 	    KDBG(AQM_KTRACE_AON_FLOW_HIGH_DELAY | DBG_FUNC_END, \
72*5c2921b0SApple OSS Distributions 	            (_fq_)->fq_flowhash, AQM_KTRACE_FQ_GRP_SC_IDX((_fq_)),  \
73*5c2921b0SApple OSS Distributions 	            (_fq_)->fq_bytes, (_fq_)->fq_min_qdelay);               \
74*5c2921b0SApple OSS Distributions     }                                                       \
75*5c2921b0SApple OSS Distributions     (_fq_)->fq_flags &= ~FQF_DELAY_HIGH;                    \
76*5c2921b0SApple OSS Distributions } while (0)
77*5c2921b0SApple OSS Distributions 
78*5c2921b0SApple OSS Distributions #define FQ_IS_OVERWHELMING(_fq_)   ((_fq_)->fq_flags & FQF_OVERWHELMING)
79*5c2921b0SApple OSS Distributions #define FQ_SET_OVERWHELMING(_fq_) do { \
80*5c2921b0SApple OSS Distributions 	if (!FQ_IS_OVERWHELMING(_fq_)) {                              \
81*5c2921b0SApple OSS Distributions 	        KDBG(AQM_KTRACE_AON_FLOW_OVERWHELMING | DBG_FUNC_START, \
82*5c2921b0SApple OSS Distributions 	                        (_fq_)->fq_flowhash, AQM_KTRACE_FQ_GRP_SC_IDX((_fq_)),    \
83*5c2921b0SApple OSS Distributions 	                        (_fq_)->fq_bytes, (_fq_)->fq_min_qdelay);                 \
84*5c2921b0SApple OSS Distributions 	}                                                                                                                                         \
85*5c2921b0SApple OSS Distributions 	(_fq_)->fq_flags |= FQF_OVERWHELMING; \
86*5c2921b0SApple OSS Distributions } while (0)
87*5c2921b0SApple OSS Distributions #define FQ_CLEAR_OVERWHELMING(_fq_) do { \
88*5c2921b0SApple OSS Distributions 	if (FQ_IS_OVERWHELMING(_fq_)) {                              \
89*5c2921b0SApple OSS Distributions 	        KDBG(AQM_KTRACE_AON_FLOW_OVERWHELMING | DBG_FUNC_END,  \
90*5c2921b0SApple OSS Distributions 	                        (_fq_)->fq_flowhash, AQM_KTRACE_FQ_GRP_SC_IDX((_fq_)),    \
91*5c2921b0SApple OSS Distributions 	                        (_fq_)->fq_bytes, (_fq_)->fq_min_qdelay);                 \
92*5c2921b0SApple OSS Distributions 	}                                                                                     \
93*5c2921b0SApple OSS Distributions 	(_fq_)->fq_flags &= ~FQF_OVERWHELMING; \
94*5c2921b0SApple OSS Distributions } while (0)
95*5c2921b0SApple OSS Distributions 
96*5c2921b0SApple OSS Distributions /*
97*5c2921b0SApple OSS Distributions  * time (in ns) the flow queue can stay in empty state.
98*5c2921b0SApple OSS Distributions  */
99*5c2921b0SApple OSS Distributions #define FQ_EMPTY_PURGE_DELAY    (3ULL * 1000 * 1000 * 1000)
100*5c2921b0SApple OSS Distributions 
101*5c2921b0SApple OSS Distributions /*
102*5c2921b0SApple OSS Distributions  * maximum number of flow queues which can be purged during a dequeue.
103*5c2921b0SApple OSS Distributions  */
104*5c2921b0SApple OSS Distributions #define FQ_EMPTY_PURGE_MAX      4
105*5c2921b0SApple OSS Distributions 
106*5c2921b0SApple OSS Distributions struct flowq {
107*5c2921b0SApple OSS Distributions #pragma pack(push,1)
108*5c2921b0SApple OSS Distributions 	union {
109*5c2921b0SApple OSS Distributions 		MBUFQ_HEAD(mbufq_head) __mbufq; /* mbuf packet queue */
110*5c2921b0SApple OSS Distributions #if SKYWALK
111*5c2921b0SApple OSS Distributions 		KPKTQ_HEAD(kpktq_head) __kpktq; /* skywalk packet queue */
112*5c2921b0SApple OSS Distributions #endif /* SKYWALK */
113*5c2921b0SApple OSS Distributions 	} __fq_pktq_u;
114*5c2921b0SApple OSS Distributions #pragma pack(pop)
115*5c2921b0SApple OSS Distributions 	uint32_t       fq_flowhash;    /* Flow hash */
116*5c2921b0SApple OSS Distributions 	uint32_t       fq_bytes;       /* Number of bytes in the queue */
117*5c2921b0SApple OSS Distributions 	int32_t        fq_deficit;     /* Deficit for scheduling */
118*5c2921b0SApple OSS Distributions 	fq_if_group_t  *fq_group;          /* Back pointer to the group */
119*5c2921b0SApple OSS Distributions #define FQF_FLOWCTL_CAPABLE 0x01 /* Use flow control instead of drop */
120*5c2921b0SApple OSS Distributions #define FQF_DELAY_HIGH  0x02    /* Min delay is greater than target */
121*5c2921b0SApple OSS Distributions #define FQF_NEW_FLOW    0x04    /* Currently on new flows queue */
122*5c2921b0SApple OSS Distributions #define FQF_OLD_FLOW    0x08    /* Currently on old flows queue */
123*5c2921b0SApple OSS Distributions #define FQF_FLOWCTL_ON  0x10    /* Currently flow controlled */
124*5c2921b0SApple OSS Distributions #define FQF_EMPTY_FLOW  0x20    /* Currently on empty flows queue */
125*5c2921b0SApple OSS Distributions #define FQF_OVERWHELMING  0x40  /* The largest flow when AQM hits queue limit */
126*5c2921b0SApple OSS Distributions 	uint8_t        fq_flags;       /* flags */
127*5c2921b0SApple OSS Distributions 	uint8_t        fq_sc_index; /* service_class index */
128*5c2921b0SApple OSS Distributions 	bool           fq_in_dqlist;
129*5c2921b0SApple OSS Distributions 	fq_tfc_type_t  fq_tfc_type;
130*5c2921b0SApple OSS Distributions 	uint8_t        __fq_pad_uint8[4];
131*5c2921b0SApple OSS Distributions 	uint64_t       fq_min_qdelay; /* min queue delay for Codel */
132*5c2921b0SApple OSS Distributions 	uint64_t       fq_getqtime;    /* last dequeue time */
133*5c2921b0SApple OSS Distributions 	union {
134*5c2921b0SApple OSS Distributions 		uint64_t   fq_updatetime; /* next update interval */
135*5c2921b0SApple OSS Distributions 		/* empty list purge time (in nanoseconds) */
136*5c2921b0SApple OSS Distributions 		uint64_t   fq_empty_purge_time;
137*5c2921b0SApple OSS Distributions 	};
138*5c2921b0SApple OSS Distributions 	SLIST_ENTRY(flowq) fq_hashlink; /* for flow queue hash table */
139*5c2921b0SApple OSS Distributions 	/*
140*5c2921b0SApple OSS Distributions 	 * flow queue will only be on either one of the lists.
141*5c2921b0SApple OSS Distributions 	 */
142*5c2921b0SApple OSS Distributions 	union {
143*5c2921b0SApple OSS Distributions 		STAILQ_ENTRY(flowq) fq_actlink; /* for new/old flow queues */
144*5c2921b0SApple OSS Distributions 		/* entry on empty flow queue list */
145*5c2921b0SApple OSS Distributions 		TAILQ_ENTRY(flowq) fq_empty_link;
146*5c2921b0SApple OSS Distributions 	};
147*5c2921b0SApple OSS Distributions 	/* entry on dequeue flow list */
148*5c2921b0SApple OSS Distributions 	STAILQ_ENTRY(flowq) fq_dqlink;
149*5c2921b0SApple OSS Distributions 	/* temporary packet queue for dequeued packets */
150*5c2921b0SApple OSS Distributions 	classq_pkt_t   fq_dq_head;
151*5c2921b0SApple OSS Distributions 	classq_pkt_t   fq_dq_tail;
152*5c2921b0SApple OSS Distributions };
153*5c2921b0SApple OSS Distributions 
154*5c2921b0SApple OSS Distributions typedef struct flowq fq_t;
155*5c2921b0SApple OSS Distributions 
156*5c2921b0SApple OSS Distributions #define FQF_FLOW_STATE_MASK    (FQF_DELAY_HIGH | FQF_NEW_FLOW | \
157*5c2921b0SApple OSS Distributions     FQF_OLD_FLOW | FQF_FLOWCTL_ON | FQF_EMPTY_FLOW)
158*5c2921b0SApple OSS Distributions 
159*5c2921b0SApple OSS Distributions #define fq_mbufq        __fq_pktq_u.__mbufq
160*5c2921b0SApple OSS Distributions #if SKYWALK
161*5c2921b0SApple OSS Distributions #define fq_kpktq        __fq_pktq_u.__kpktq
162*5c2921b0SApple OSS Distributions #endif /* SKYWALK */
163*5c2921b0SApple OSS Distributions 
164*5c2921b0SApple OSS Distributions #if SKYWALK
165*5c2921b0SApple OSS Distributions #define fq_empty(_q, _ptype)    (((_ptype) == QP_MBUF) ?  \
166*5c2921b0SApple OSS Distributions     MBUFQ_EMPTY(&(_q)->fq_mbufq) : KPKTQ_EMPTY(&(_q)->fq_kpktq))
167*5c2921b0SApple OSS Distributions #else /* !SKYWALK */
168*5c2921b0SApple OSS Distributions #define fq_empty(_q, _ptype)    MBUFQ_EMPTY(&(_q)->fq_mbufq)
169*5c2921b0SApple OSS Distributions #endif /* !SKYWALK */
170*5c2921b0SApple OSS Distributions 
171*5c2921b0SApple OSS Distributions #if SKYWALK
172*5c2921b0SApple OSS Distributions #define fq_enqueue(_q, _h, _t, _c, _ptype) do {                         \
173*5c2921b0SApple OSS Distributions 	switch (_ptype) {                                               \
174*5c2921b0SApple OSS Distributions 	case QP_MBUF:                                                   \
175*5c2921b0SApple OSS Distributions 	        ASSERT((_h).cp_ptype == QP_MBUF);                       \
176*5c2921b0SApple OSS Distributions 	        ASSERT((_t).cp_ptype == QP_MBUF);                       \
177*5c2921b0SApple OSS Distributions 	        MBUFQ_ENQUEUE_MULTI(&(_q)->fq_mbufq, (_h).cp_mbuf,      \
178*5c2921b0SApple OSS Distributions 	            (_t).cp_mbuf);                                      \
179*5c2921b0SApple OSS Distributions 	        MBUFQ_ADD_CRUMB_MULTI(&(_q)->fq_mbufq, (_h).cp_mbuf,    \
180*5c2921b0SApple OSS Distributions 	            (_t).cp_mbuf, PKT_CRUMB_FQ_ENQUEUE);                \
181*5c2921b0SApple OSS Distributions 	        break;                                                  \
182*5c2921b0SApple OSS Distributions 	case QP_PACKET:                                                 \
183*5c2921b0SApple OSS Distributions 	        ASSERT((_h).cp_ptype == QP_PACKET);                     \
184*5c2921b0SApple OSS Distributions 	        ASSERT((_t).cp_ptype == QP_PACKET);                     \
185*5c2921b0SApple OSS Distributions 	        KPKTQ_ENQUEUE_MULTI(&(_q)->fq_kpktq, (_h).cp_kpkt,      \
186*5c2921b0SApple OSS Distributions 	            (_t).cp_kpkt, (_c));                                \
187*5c2921b0SApple OSS Distributions 	        break;                                                  \
188*5c2921b0SApple OSS Distributions 	default:                                                        \
189*5c2921b0SApple OSS Distributions 	        VERIFY(0);                                              \
190*5c2921b0SApple OSS Distributions 	        __builtin_unreachable();                                \
191*5c2921b0SApple OSS Distributions 	        break;                                                  \
192*5c2921b0SApple OSS Distributions 	}                                                               \
193*5c2921b0SApple OSS Distributions } while (0)
194*5c2921b0SApple OSS Distributions #else /* !SKYWALK */
195*5c2921b0SApple OSS Distributions #define fq_enqueue(_q, _h, _t, _c, _ptype) {                            \
196*5c2921b0SApple OSS Distributions     MBUFQ_ENQUEUE_MULTI(&(_q)->fq_mbufq, (_h).cp_mbuf, (_t).cp_mbuf);   \
197*5c2921b0SApple OSS Distributions     MBUFQ_ADD_CRUMB_MULTI(&(_q)->fq_mbufq, (_h).cp_mbuf,                \
198*5c2921b0SApple OSS Distributions 	    (_t).cp_mbuf, PKT_CRUMB_FQ_ENQUEUE);                        \
199*5c2921b0SApple OSS Distributions } while (0)
200*5c2921b0SApple OSS Distributions #endif /* !SKYWALK */
201*5c2921b0SApple OSS Distributions 
202*5c2921b0SApple OSS Distributions #if SKYWALK
203*5c2921b0SApple OSS Distributions #define fq_dequeue(_q, _p, _ptype) do {                                 \
204*5c2921b0SApple OSS Distributions 	switch (_ptype) {                                               \
205*5c2921b0SApple OSS Distributions 	case QP_MBUF: {                                                 \
206*5c2921b0SApple OSS Distributions 	        MBUFQ_DEQUEUE(&(_q)->fq_mbufq, (_p)->cp_mbuf);          \
207*5c2921b0SApple OSS Distributions 	        if (__probable((_p)->cp_mbuf != NULL)) {                \
208*5c2921b0SApple OSS Distributions 	                CLASSQ_PKT_INIT_MBUF((_p), (_p)->cp_mbuf);      \
209*5c2921b0SApple OSS Distributions 	                m_add_crumb((_p)->cp_mbuf,                      \
210*5c2921b0SApple OSS Distributions 	                    PKT_CRUMB_FQ_DEQUEUE);                      \
211*5c2921b0SApple OSS Distributions 	        }                                                       \
212*5c2921b0SApple OSS Distributions 	        break;                                                  \
213*5c2921b0SApple OSS Distributions 	}                                                               \
214*5c2921b0SApple OSS Distributions 	case QP_PACKET: {                                               \
215*5c2921b0SApple OSS Distributions 	        KPKTQ_DEQUEUE(&(_q)->fq_kpktq, (_p)->cp_kpkt);          \
216*5c2921b0SApple OSS Distributions 	        if (__probable((_p)->cp_kpkt != NULL)) {                \
217*5c2921b0SApple OSS Distributions 	                CLASSQ_PKT_INIT_PACKET((_p), (_p)->cp_kpkt);    \
218*5c2921b0SApple OSS Distributions 	        }                                                       \
219*5c2921b0SApple OSS Distributions 	        break;                                                  \
220*5c2921b0SApple OSS Distributions 	}                                                               \
221*5c2921b0SApple OSS Distributions 	default:                                                        \
222*5c2921b0SApple OSS Distributions 	        VERIFY(0);                                              \
223*5c2921b0SApple OSS Distributions 	        __builtin_unreachable();                                \
224*5c2921b0SApple OSS Distributions 	        break;                                                  \
225*5c2921b0SApple OSS Distributions 	}                                                               \
226*5c2921b0SApple OSS Distributions } while (0)
227*5c2921b0SApple OSS Distributions #else /* !SKYWALK */
228*5c2921b0SApple OSS Distributions #define fq_dequeue(_q, _p, _ptype) do {                                 \
229*5c2921b0SApple OSS Distributions 	MBUFQ_DEQUEUE(&(_q)->fq_mbufq, (_p)->cp_mbuf);                  \
230*5c2921b0SApple OSS Distributions 	if (__probable((_p)->cp_mbuf != NULL)) {                        \
231*5c2921b0SApple OSS Distributions 	        CLASSQ_PKT_INIT_MBUF((_p), (_p)->cp_mbuf);              \
232*5c2921b0SApple OSS Distributions 	        m_add_crumb((_p)->cp_mbuf, PKT_CRUMB_FQ_DEQUEUE);       \
233*5c2921b0SApple OSS Distributions 	}                                                               \
234*5c2921b0SApple OSS Distributions } while (0)
235*5c2921b0SApple OSS Distributions #endif /* !SKYWALK */
236*5c2921b0SApple OSS Distributions 
237*5c2921b0SApple OSS Distributions struct fq_codel_sched_data;
238*5c2921b0SApple OSS Distributions struct fq_if_classq;
239*5c2921b0SApple OSS Distributions 
240*5c2921b0SApple OSS Distributions /* Function definitions */
241*5c2921b0SApple OSS Distributions extern void fq_codel_init(void);
242*5c2921b0SApple OSS Distributions extern void fq_codel_reap_caches(boolean_t);
243*5c2921b0SApple OSS Distributions extern fq_t *fq_alloc(classq_pkt_type_t);
244*5c2921b0SApple OSS Distributions extern void fq_destroy(fq_t *, classq_pkt_type_t);
245*5c2921b0SApple OSS Distributions extern int fq_addq(struct fq_codel_sched_data *, fq_if_group_t *,
246*5c2921b0SApple OSS Distributions     pktsched_pkt_t *, struct fq_if_classq *);
247*5c2921b0SApple OSS Distributions extern void fq_getq_flow(struct fq_codel_sched_data *, fq_t *,
248*5c2921b0SApple OSS Distributions     pktsched_pkt_t *, uint64_t now);
249*5c2921b0SApple OSS Distributions extern void fq_codel_dequeue(fq_if_t *fqs, fq_t *fq,
250*5c2921b0SApple OSS Distributions     pktsched_pkt_t *pkt, uint64_t now);
251*5c2921b0SApple OSS Distributions extern void fq_getq_flow_internal(struct fq_codel_sched_data *,
252*5c2921b0SApple OSS Distributions     fq_t *, pktsched_pkt_t *);
253*5c2921b0SApple OSS Distributions extern void fq_head_drop(struct fq_codel_sched_data *, fq_t *);
254*5c2921b0SApple OSS Distributions 
255*5c2921b0SApple OSS Distributions #ifdef __cplusplus
256*5c2921b0SApple OSS Distributions }
257*5c2921b0SApple OSS Distributions #endif
258*5c2921b0SApple OSS Distributions #endif /* BSD_KERNEL_PRIVATE */
259*5c2921b0SApple OSS Distributions #endif /* PRIVATE */
260*5c2921b0SApple OSS Distributions #endif /* _NET_CLASSQ_CLASSQ_FQ_CODEL_H */
261