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