1 /* $NetBSD: altq_blue.c,v 1.23 2011/11/19 22:51:18 tls Exp $ */ 2 /* $KAME: altq_blue.c,v 1.15 2005/04/13 03:44:24 suz Exp $ */ 3 4 /* 5 * Copyright (C) 1997-2002 6 * Sony Computer Science Laboratories Inc. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 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. 16 * 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 27 * SUCH DAMAGE. 28 * 29 */ 30 /* 31 * Copyright (c) 1990-1994 Regents of the University of California. 32 * All rights reserved. 33 * 34 * Redistribution and use in source and binary forms, with or without 35 * modification, are permitted provided that the following conditions 36 * are met: 37 * 1. Redistributions of source code must retain the above copyright 38 * notice, this list of conditions and the following disclaimer. 39 * 2. Redistributions in binary form must reproduce the above copyright 40 * notice, this list of conditions and the following disclaimer in the 41 * documentation and/or other materials provided with the distribution. 42 * 3. All advertising materials mentioning features or use of this software 43 * must display the following acknowledgement: 44 * This product includes software developed by the Computer Systems 45 * Engineering Group at Lawrence Berkeley Laboratory. 46 * 4. Neither the name of the University nor of the Laboratory may be used 47 * to endorse or promote products derived from this software without 48 * specific prior written permission. 49 * 50 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 51 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 52 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 53 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 54 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 55 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 56 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 57 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 58 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 59 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 60 * SUCH DAMAGE. 61 */ 62 63 #include <sys/cdefs.h> 64 __KERNEL_RCSID(0, "$NetBSD: altq_blue.c,v 1.23 2011/11/19 22:51:18 tls Exp $"); 65 66 #ifdef _KERNEL_OPT 67 #include "opt_altq.h" 68 #include "opt_inet.h" 69 #endif 70 71 #ifdef ALTQ_BLUE /* blue is enabled by ALTQ_BLUE option in opt_altq.h */ 72 73 #include <sys/param.h> 74 #include <sys/malloc.h> 75 #include <sys/mbuf.h> 76 #include <sys/socket.h> 77 #include <sys/sockio.h> 78 #include <sys/systm.h> 79 #include <sys/proc.h> 80 #include <sys/errno.h> 81 #include <sys/kernel.h> 82 #include <sys/kauth.h> 83 #include <sys/cprng.h> 84 85 #include <net/if.h> 86 #include <net/if_types.h> 87 #include <netinet/in.h> 88 #include <netinet/in_systm.h> 89 #include <netinet/ip.h> 90 #ifdef INET6 91 #include <netinet/ip6.h> 92 #endif 93 94 #include <altq/altq.h> 95 #include <altq/altq_conf.h> 96 #include <altq/altq_blue.h> 97 98 #ifdef ALTQ3_COMPAT 99 /* 100 * Blue is proposed and implemented by Wu-chang Feng <wuchang@eecs.umich.edu>. 101 * more information on Blue is available from 102 * http://www.eecs.umich.edu/~wuchang/blue/ 103 */ 104 105 /* fixed-point uses 12-bit decimal places */ 106 #define FP_SHIFT 12 /* fixed-point shift */ 107 108 #define BLUE_LIMIT 200 /* default max queue lenght */ 109 #define BLUE_STATS /* collect statistics */ 110 111 /* blue_list keeps all blue_state_t's allocated. */ 112 static blue_queue_t *blue_list = NULL; 113 114 /* internal function prototypes */ 115 static int blue_enqueue(struct ifaltq *, struct mbuf *, struct altq_pktattr *); 116 static struct mbuf *blue_dequeue(struct ifaltq *, int); 117 static int drop_early(blue_t *); 118 static int mark_ecn(struct mbuf *, struct altq_pktattr *, int); 119 static int blue_detach(blue_queue_t *); 120 static int blue_request(struct ifaltq *, int, void *); 121 122 /* 123 * blue device interface 124 */ 125 altqdev_decl(blue); 126 127 int 128 blueopen(dev_t dev, int flag, int fmt, 129 struct lwp *l) 130 { 131 /* everything will be done when the queueing scheme is attached. */ 132 return 0; 133 } 134 135 int 136 blueclose(dev_t dev, int flag, int fmt, 137 struct lwp *l) 138 { 139 blue_queue_t *rqp; 140 int err, error = 0; 141 142 while ((rqp = blue_list) != NULL) { 143 /* destroy all */ 144 err = blue_detach(rqp); 145 if (err != 0 && error == 0) 146 error = err; 147 } 148 149 return error; 150 } 151 152 int 153 blueioctl(dev_t dev, ioctlcmd_t cmd, void *addr, int flag, 154 struct lwp *l) 155 { 156 blue_queue_t *rqp; 157 struct blue_interface *ifacep; 158 struct ifnet *ifp; 159 int error = 0; 160 161 /* check super-user privilege */ 162 switch (cmd) { 163 case BLUE_GETSTATS: 164 break; 165 default: 166 #if (__FreeBSD_version > 400000) 167 if ((error = suser(p)) != 0) 168 return (error); 169 #else 170 if ((error = kauth_authorize_network(l->l_cred, 171 KAUTH_NETWORK_ALTQ, KAUTH_REQ_NETWORK_ALTQ_BLUE, NULL, 172 NULL, NULL)) != 0) 173 return (error); 174 #endif 175 break; 176 } 177 178 switch (cmd) { 179 180 case BLUE_ENABLE: 181 ifacep = (struct blue_interface *)addr; 182 if ((rqp = altq_lookup(ifacep->blue_ifname, ALTQT_BLUE)) == NULL) { 183 error = EBADF; 184 break; 185 } 186 error = altq_enable(rqp->rq_ifq); 187 break; 188 189 case BLUE_DISABLE: 190 ifacep = (struct blue_interface *)addr; 191 if ((rqp = altq_lookup(ifacep->blue_ifname, ALTQT_BLUE)) == NULL) { 192 error = EBADF; 193 break; 194 } 195 error = altq_disable(rqp->rq_ifq); 196 break; 197 198 case BLUE_IF_ATTACH: 199 ifp = ifunit(((struct blue_interface *)addr)->blue_ifname); 200 if (ifp == NULL) { 201 error = ENXIO; 202 break; 203 } 204 205 /* allocate and initialize blue_state_t */ 206 rqp = malloc(sizeof(blue_queue_t), M_DEVBUF, M_WAITOK|M_ZERO); 207 if (rqp == NULL) { 208 error = ENOMEM; 209 break; 210 } 211 212 rqp->rq_q = malloc(sizeof(class_queue_t), M_DEVBUF, 213 M_WAITOK|M_ZERO); 214 if (rqp->rq_q == NULL) { 215 free(rqp, M_DEVBUF); 216 error = ENOMEM; 217 break; 218 } 219 220 rqp->rq_blue = malloc(sizeof(blue_t), M_DEVBUF, 221 M_WAITOK|M_ZERO); 222 if (rqp->rq_blue == NULL) { 223 free(rqp->rq_q, M_DEVBUF); 224 free(rqp, M_DEVBUF); 225 error = ENOMEM; 226 break; 227 } 228 229 rqp->rq_ifq = &ifp->if_snd; 230 qtail(rqp->rq_q) = NULL; 231 qlen(rqp->rq_q) = 0; 232 qlimit(rqp->rq_q) = BLUE_LIMIT; 233 234 /* default packet time: 1000 bytes / 10Mbps * 8 * 1000000 */ 235 blue_init(rqp->rq_blue, 0, 800, 1000, 50000); 236 237 /* 238 * set BLUE to this ifnet structure. 239 */ 240 error = altq_attach(rqp->rq_ifq, ALTQT_BLUE, rqp, 241 blue_enqueue, blue_dequeue, blue_request, 242 NULL, NULL); 243 if (error) { 244 free(rqp->rq_blue, M_DEVBUF); 245 free(rqp->rq_q, M_DEVBUF); 246 free(rqp, M_DEVBUF); 247 break; 248 } 249 250 /* add this state to the blue list */ 251 rqp->rq_next = blue_list; 252 blue_list = rqp; 253 break; 254 255 case BLUE_IF_DETACH: 256 ifacep = (struct blue_interface *)addr; 257 if ((rqp = altq_lookup(ifacep->blue_ifname, ALTQT_BLUE)) == NULL) { 258 error = EBADF; 259 break; 260 } 261 error = blue_detach(rqp); 262 break; 263 264 case BLUE_GETSTATS: 265 do { 266 struct blue_stats *q_stats; 267 blue_t *rp; 268 269 q_stats = (struct blue_stats *)addr; 270 if ((rqp = altq_lookup(q_stats->iface.blue_ifname, 271 ALTQT_BLUE)) == NULL) { 272 error = EBADF; 273 break; 274 } 275 276 q_stats->q_len = qlen(rqp->rq_q); 277 q_stats->q_limit = qlimit(rqp->rq_q); 278 279 rp = rqp->rq_blue; 280 q_stats->q_pmark = rp->blue_pmark; 281 q_stats->xmit_packets = rp->blue_stats.xmit_packets; 282 q_stats->xmit_bytes = rp->blue_stats.xmit_bytes; 283 q_stats->drop_packets = rp->blue_stats.drop_packets; 284 q_stats->drop_bytes = rp->blue_stats.drop_bytes; 285 q_stats->drop_forced = rp->blue_stats.drop_forced; 286 q_stats->drop_unforced = rp->blue_stats.drop_unforced; 287 q_stats->marked_packets = rp->blue_stats.marked_packets; 288 289 } while (/*CONSTCOND*/ 0); 290 break; 291 292 case BLUE_CONFIG: 293 do { 294 struct blue_conf *fc; 295 int limit; 296 297 fc = (struct blue_conf *)addr; 298 if ((rqp = altq_lookup(fc->iface.blue_ifname, 299 ALTQT_BLUE)) == NULL) { 300 error = EBADF; 301 break; 302 } 303 limit = fc->blue_limit; 304 qlimit(rqp->rq_q) = limit; 305 fc->blue_limit = limit; /* write back the new value */ 306 if (fc->blue_pkttime > 0) 307 rqp->rq_blue->blue_pkttime = fc->blue_pkttime; 308 if (fc->blue_max_pmark > 0) 309 rqp->rq_blue->blue_max_pmark = fc->blue_max_pmark; 310 if (fc->blue_hold_time > 0) 311 rqp->rq_blue->blue_hold_time = fc->blue_hold_time; 312 rqp->rq_blue->blue_flags = fc->blue_flags; 313 314 blue_init(rqp->rq_blue, rqp->rq_blue->blue_flags, 315 rqp->rq_blue->blue_pkttime, 316 rqp->rq_blue->blue_max_pmark, 317 rqp->rq_blue->blue_hold_time); 318 } while (/*CONSTCOND*/ 0); 319 break; 320 321 default: 322 error = EINVAL; 323 break; 324 } 325 return error; 326 } 327 328 static int 329 blue_detach(blue_queue_t *rqp) 330 { 331 blue_queue_t *tmp; 332 int error = 0; 333 334 if (ALTQ_IS_ENABLED(rqp->rq_ifq)) 335 altq_disable(rqp->rq_ifq); 336 337 if ((error = altq_detach(rqp->rq_ifq))) 338 return (error); 339 340 if (blue_list == rqp) 341 blue_list = rqp->rq_next; 342 else { 343 for (tmp = blue_list; tmp != NULL; tmp = tmp->rq_next) 344 if (tmp->rq_next == rqp) { 345 tmp->rq_next = rqp->rq_next; 346 break; 347 } 348 if (tmp == NULL) 349 printf("blue_detach: no state found in blue_list!\n"); 350 } 351 352 free(rqp->rq_q, M_DEVBUF); 353 free(rqp->rq_blue, M_DEVBUF); 354 free(rqp, M_DEVBUF); 355 return (error); 356 } 357 358 /* 359 * blue support routines 360 */ 361 362 int 363 blue_init(blue_t *rp, int flags, int pkttime, int blue_max_pmark, 364 int blue_hold_time) 365 { 366 int npkts_per_sec; 367 368 rp->blue_idle = 1; 369 rp->blue_flags = flags; 370 rp->blue_pkttime = pkttime; 371 rp->blue_max_pmark = blue_max_pmark; 372 rp->blue_hold_time = blue_hold_time; 373 if (pkttime == 0) 374 rp->blue_pkttime = 1; 375 376 /* when the link is very slow, adjust blue parameters */ 377 npkts_per_sec = 1000000 / rp->blue_pkttime; 378 if (npkts_per_sec < 50) { 379 } 380 else if (npkts_per_sec < 300) { 381 } 382 383 microtime(&rp->blue_last); 384 return (0); 385 } 386 387 /* 388 * enqueue routine: 389 * 390 * returns: 0 when successfully queued. 391 * ENOBUFS when drop occurs. 392 */ 393 static int 394 blue_enqueue(struct ifaltq *ifq, struct mbuf *m, struct altq_pktattr *pktattr) 395 { 396 blue_queue_t *rqp = (blue_queue_t *)ifq->altq_disc; 397 int error = 0; 398 399 if (blue_addq(rqp->rq_blue, rqp->rq_q, m, pktattr) == 0) 400 ifq->ifq_len++; 401 else 402 error = ENOBUFS; 403 return error; 404 } 405 406 #define DTYPE_NODROP 0 /* no drop */ 407 #define DTYPE_FORCED 1 /* a "forced" drop */ 408 #define DTYPE_EARLY 2 /* an "unforced" (early) drop */ 409 410 int 411 blue_addq(blue_t *rp, class_queue_t *q, struct mbuf *m, 412 struct altq_pktattr *pktattr) 413 { 414 int droptype; 415 416 /* 417 * if we were idle, this is an enqueue onto an empty queue 418 * and we should decrement marking probability 419 * 420 */ 421 if (rp->blue_idle) { 422 struct timeval now; 423 int t; 424 rp->blue_idle = 0; 425 microtime(&now); 426 t = (now.tv_sec - rp->blue_last.tv_sec); 427 if ( t > 1) { 428 rp->blue_pmark = 1; 429 microtime(&rp->blue_last); 430 } else { 431 t = t * 1000000 + (now.tv_usec - rp->blue_last.tv_usec); 432 if (t > rp->blue_hold_time) { 433 rp->blue_pmark--; 434 if (rp->blue_pmark < 0) rp->blue_pmark = 0; 435 microtime(&rp->blue_last); 436 } 437 } 438 } 439 440 /* see if we drop early */ 441 droptype = DTYPE_NODROP; 442 if (drop_early(rp) && qlen(q) > 1) { 443 /* mark or drop by blue */ 444 if ((rp->blue_flags & BLUEF_ECN) && 445 mark_ecn(m, pktattr, rp->blue_flags)) { 446 /* successfully marked. do not drop. */ 447 #ifdef BLUE_STATS 448 rp->blue_stats.marked_packets++; 449 #endif 450 } else { 451 /* unforced drop by blue */ 452 droptype = DTYPE_EARLY; 453 } 454 } 455 456 /* 457 * if the queue length hits the hard limit, it's a forced drop. 458 */ 459 if (droptype == DTYPE_NODROP && qlen(q) >= qlimit(q)) 460 droptype = DTYPE_FORCED; 461 462 /* if successful or forced drop, enqueue this packet. */ 463 if (droptype != DTYPE_EARLY) 464 _addq(q, m); 465 466 if (droptype != DTYPE_NODROP) { 467 if (droptype == DTYPE_EARLY) { 468 /* drop the incoming packet */ 469 #ifdef BLUE_STATS 470 rp->blue_stats.drop_unforced++; 471 #endif 472 } else { 473 struct timeval now; 474 int t; 475 /* forced drop, select a victim packet in the queue. */ 476 m = _getq_random(q); 477 microtime(&now); 478 t = (now.tv_sec - rp->blue_last.tv_sec); 479 t = t * 1000000 + (now.tv_usec - rp->blue_last.tv_usec); 480 if (t > rp->blue_hold_time) { 481 rp->blue_pmark += rp->blue_max_pmark >> 3; 482 if (rp->blue_pmark > rp->blue_max_pmark) 483 rp->blue_pmark = rp->blue_max_pmark; 484 microtime(&rp->blue_last); 485 } 486 #ifdef BLUE_STATS 487 rp->blue_stats.drop_forced++; 488 #endif 489 } 490 #ifdef BLUE_STATS 491 rp->blue_stats.drop_packets++; 492 rp->blue_stats.drop_bytes += m->m_pkthdr.len; 493 #endif 494 m_freem(m); 495 return (-1); 496 } 497 /* successfully queued */ 498 return (0); 499 } 500 501 /* 502 * early-drop probability is kept in blue_pmark 503 * 504 */ 505 static int 506 drop_early(blue_t *rp) 507 { 508 if ((cprng_fast32() % rp->blue_max_pmark) < rp->blue_pmark) { 509 /* drop or mark */ 510 return (1); 511 } 512 /* no drop/mark */ 513 return (0); 514 } 515 516 /* 517 * try to mark CE bit to the packet. 518 * returns 1 if successfully marked, 0 otherwise. 519 */ 520 static int 521 mark_ecn(struct mbuf *m, struct altq_pktattr *pktattr, int flags) 522 { 523 struct mbuf *m0; 524 525 if (pktattr == NULL || 526 (pktattr->pattr_af != AF_INET && pktattr->pattr_af != AF_INET6)) 527 return (0); 528 529 /* verify that pattr_hdr is within the mbuf data */ 530 for (m0 = m; m0 != NULL; m0 = m0->m_next) 531 if (((char *)pktattr->pattr_hdr >= m0->m_data) && 532 ((char *)pktattr->pattr_hdr < m0->m_data + m0->m_len)) 533 break; 534 if (m0 == NULL) { 535 /* ick, pattr_hdr is stale */ 536 pktattr->pattr_af = AF_UNSPEC; 537 return (0); 538 } 539 540 switch (pktattr->pattr_af) { 541 case AF_INET: 542 if (flags & BLUEF_ECN4) { 543 struct ip *ip = (struct ip *)pktattr->pattr_hdr; 544 u_int8_t otos; 545 int sum; 546 547 if (ip->ip_v != 4) 548 return (0); /* version mismatch! */ 549 if ((ip->ip_tos & IPTOS_ECN_MASK) == IPTOS_ECN_NOTECT) 550 return (0); /* not-ECT */ 551 if ((ip->ip_tos & IPTOS_ECN_MASK) == IPTOS_ECN_CE) 552 return (1); /* already marked */ 553 554 /* 555 * ecn-capable but not marked, 556 * mark CE and update checksum 557 */ 558 otos = ip->ip_tos; 559 ip->ip_tos |= IPTOS_ECN_CE; 560 /* 561 * update checksum (from RFC1624) 562 * HC' = ~(~HC + ~m + m') 563 */ 564 sum = ~ntohs(ip->ip_sum) & 0xffff; 565 sum += (~otos & 0xffff) + ip->ip_tos; 566 sum = (sum >> 16) + (sum & 0xffff); 567 sum += (sum >> 16); /* add carry */ 568 ip->ip_sum = htons(~sum & 0xffff); 569 return (1); 570 } 571 break; 572 #ifdef INET6 573 case AF_INET6: 574 if (flags & BLUEF_ECN6) { 575 struct ip6_hdr *ip6 = (struct ip6_hdr *)pktattr->pattr_hdr; 576 u_int32_t flowlabel; 577 578 flowlabel = ntohl(ip6->ip6_flow); 579 if ((flowlabel >> 28) != 6) 580 return (0); /* version mismatch! */ 581 if ((flowlabel & (IPTOS_ECN_MASK << 20)) == 582 (IPTOS_ECN_NOTECT << 20)) 583 return (0); /* not-ECT */ 584 if ((flowlabel & (IPTOS_ECN_MASK << 20)) == 585 (IPTOS_ECN_CE << 20)) 586 return (1); /* already marked */ 587 /* 588 * ecn-capable but not marked, mark CE 589 */ 590 flowlabel |= (IPTOS_ECN_CE << 20); 591 ip6->ip6_flow = htonl(flowlabel); 592 return (1); 593 } 594 break; 595 #endif /* INET6 */ 596 } 597 598 /* not marked */ 599 return (0); 600 } 601 602 /* 603 * dequeue routine: 604 * must be called in splnet. 605 * 606 * returns: mbuf dequeued. 607 * NULL when no packet is available in the queue. 608 */ 609 610 static struct mbuf * 611 blue_dequeue(struct ifaltq * ifq, int op) 612 { 613 blue_queue_t *rqp = (blue_queue_t *)ifq->altq_disc; 614 struct mbuf *m = NULL; 615 616 if (op == ALTDQ_POLL) 617 return (qhead(rqp->rq_q)); 618 619 m = blue_getq(rqp->rq_blue, rqp->rq_q); 620 if (m != NULL) 621 ifq->ifq_len--; 622 return m; 623 } 624 625 struct mbuf * 626 blue_getq(blue_t *rp, class_queue_t *q) 627 { 628 struct mbuf *m; 629 630 if ((m = _getq(q)) == NULL) { 631 if (rp->blue_idle == 0) { 632 rp->blue_idle = 1; 633 microtime(&rp->blue_last); 634 } 635 return NULL; 636 } 637 638 rp->blue_idle = 0; 639 #ifdef BLUE_STATS 640 rp->blue_stats.xmit_packets++; 641 rp->blue_stats.xmit_bytes += m->m_pkthdr.len; 642 #endif 643 return (m); 644 } 645 646 static int 647 blue_request(struct ifaltq *ifq, int req, void *arg) 648 { 649 blue_queue_t *rqp = (blue_queue_t *)ifq->altq_disc; 650 651 switch (req) { 652 case ALTRQ_PURGE: 653 _flushq(rqp->rq_q); 654 if (ALTQ_IS_ENABLED(ifq)) 655 ifq->ifq_len = 0; 656 break; 657 } 658 return (0); 659 } 660 661 662 #ifdef KLD_MODULE 663 664 static struct altqsw blue_sw = 665 {"blue", blueopen, blueclose, blueioctl}; 666 667 ALTQ_MODULE(altq_blue, ALTQT_BLUE, &blue_sw); 668 669 #endif /* KLD_MODULE */ 670 671 #endif /* ALTQ3_COMPAT */ 672 #endif /* ALTQ_BLUE */ 673