1 #ifndef __NET_SCHED_CODEL_QDISC_H 1 2 #define __NET_SCHED_CODEL_QDISC_H 3 4 /* 5 * Codel - The Controlled-Delay Active Queue M 6 * 7 * Copyright (C) 2011-2012 Kathleen Nichols < 8 * Copyright (C) 2011-2012 Van Jacobson <van@ 9 * Copyright (C) 2012 Michael D. Taht <dave.t 10 * Copyright (C) 2012,2015 Eric Dumazet <edum 11 * 12 * Redistribution and use in source and binary 13 * modification, are permitted provided that t 14 * are met: 15 * 1. Redistributions of source code must reta 16 * notice, this list of conditions, and the 17 * without modification. 18 * 2. Redistributions in binary form must repr 19 * notice, this list of conditions and the 20 * documentation and/or other materials pro 21 * 3. The names of the authors may not be used 22 * derived from this software without speci 23 * 24 * Alternatively, provided that this notice is 25 * software may be distributed under the terms 26 * Public License ("GPL") version 2, in which 27 * GPL apply INSTEAD OF those given above. 28 * 29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 30 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTI 31 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCH 32 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 33 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIR 34 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGE 35 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, S 38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE PO 40 * DAMAGE. 41 * 42 */ 43 44 /* Controlling Queue Delay (CoDel) algorithm 45 * ========================================= 46 * Source : Kathleen Nichols and Van Jacobson 47 * http://queue.acm.org/detail.cfm?id=2209336 48 * 49 * Implemented on linux by Dave Taht and Eric 50 */ 51 52 #include <net/codel.h> 53 #include <net/pkt_sched.h> 54 55 /* Qdiscs using codel plugin must use codel_sk 56 struct codel_skb_cb { 57 codel_time_t enqueue_time; 58 unsigned int mem_usage; 59 }; 60 61 static struct codel_skb_cb *get_codel_cb(const 62 { 63 qdisc_cb_private_validate(skb, sizeof( 64 return (struct codel_skb_cb *)qdisc_sk 65 } 66 67 static codel_time_t codel_get_enqueue_time(con 68 { 69 return get_codel_cb(skb)->enqueue_time 70 } 71 72 static void codel_set_enqueue_time(struct sk_b 73 { 74 get_codel_cb(skb)->enqueue_time = code 75 } 76 77 #endif 78
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.