Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
linux-headers-4.4.0-210 /
include /
net /
Delete
Unzip
Name
Size
Permission
Date
Action
9p
[ DIR ]
drwxr-xr-x
2021-04-21 07:33
bluetooth
[ DIR ]
drwxr-xr-x
2021-04-21 07:33
caif
[ DIR ]
drwxr-xr-x
2021-04-21 07:33
irda
[ DIR ]
drwxr-xr-x
2021-04-21 07:33
iucv
[ DIR ]
drwxr-xr-x
2021-04-21 07:33
netfilter
[ DIR ]
drwxr-xr-x
2021-04-21 07:33
netns
[ DIR ]
drwxr-xr-x
2021-04-21 07:33
nfc
[ DIR ]
drwxr-xr-x
2021-04-21 07:33
phonet
[ DIR ]
drwxr-xr-x
2021-04-21 07:33
sctp
[ DIR ]
drwxr-xr-x
2021-04-21 07:33
tc_act
[ DIR ]
drwxr-xr-x
2021-04-21 07:33
6lowpan.h
7.53
KB
-rw-r--r--
2016-01-11 00:01
Space.h
1.12
KB
-rw-r--r--
2016-01-11 00:01
act_api.h
4.21
KB
-rw-r--r--
2016-01-11 00:01
addrconf.h
11.59
KB
-rw-r--r--
2021-04-16 11:57
af_ieee802154.h
1.55
KB
-rw-r--r--
2016-01-11 00:01
af_rxrpc.h
1.82
KB
-rw-r--r--
2016-01-11 00:01
af_unix.h
2.12
KB
-rw-r--r--
2021-04-16 11:57
af_vsock.h
6.16
KB
-rw-r--r--
2021-04-16 11:57
ah.h
343
B
-rw-r--r--
2016-01-11 00:01
arp.h
1.96
KB
-rw-r--r--
2021-04-16 11:57
atmclip.h
1.44
KB
-rw-r--r--
2016-01-11 00:01
ax25.h
14.72
KB
-rw-r--r--
2021-04-16 11:57
ax88796.h
998
B
-rw-r--r--
2016-01-11 00:01
bond_3ad.h
9.73
KB
-rw-r--r--
2016-01-11 00:01
bond_alb.h
6.6
KB
-rw-r--r--
2016-01-11 00:01
bond_options.h
3.82
KB
-rw-r--r--
2016-01-11 00:01
bonding.h
18.67
KB
-rw-r--r--
2021-04-16 11:57
busy_poll.h
3.98
KB
-rw-r--r--
2021-04-16 11:57
cfg80211-wext.h
1.95
KB
-rw-r--r--
2016-01-11 00:01
cfg80211.h
188.01
KB
-rw-r--r--
2021-04-16 11:57
cfg802154.h
10.59
KB
-rw-r--r--
2016-01-11 00:01
checksum.h
4.53
KB
-rw-r--r--
2016-01-11 00:01
cipso_ipv4.h
8.17
KB
-rw-r--r--
2021-04-16 11:57
cls_cgroup.h
2.03
KB
-rw-r--r--
2016-01-11 00:01
codel.h
11.37
KB
-rw-r--r--
2021-04-16 11:57
compat.h
2
KB
-rw-r--r--
2016-01-11 00:01
datalink.h
580
B
-rw-r--r--
2016-01-11 00:01
dcbevent.h
1.26
KB
-rw-r--r--
2016-01-11 00:01
dcbnl.h
4.2
KB
-rw-r--r--
2016-01-11 00:01
dn.h
7
KB
-rw-r--r--
2016-01-11 00:01
dn_dev.h
5.32
KB
-rw-r--r--
2016-01-11 00:01
dn_fib.h
3.91
KB
-rw-r--r--
2016-01-11 00:01
dn_neigh.h
929
B
-rw-r--r--
2016-01-11 00:01
dn_nsp.h
5.87
KB
-rw-r--r--
2016-01-11 00:01
dn_route.h
4.36
KB
-rw-r--r--
2016-01-11 00:01
dsa.h
8.93
KB
-rw-r--r--
2016-01-11 00:01
dsfield.h
1.07
KB
-rw-r--r--
2016-01-11 00:01
dst.h
13.68
KB
-rw-r--r--
2021-04-16 11:57
dst_cache.h
2.49
KB
-rw-r--r--
2021-04-16 11:57
dst_metadata.h
3.61
KB
-rw-r--r--
2021-04-16 11:57
dst_ops.h
2.03
KB
-rw-r--r--
2021-04-16 11:57
esp.h
225
B
-rw-r--r--
2016-01-11 00:01
ethoc.h
538
B
-rw-r--r--
2016-01-11 00:01
fib_rules.h
3.03
KB
-rw-r--r--
2021-04-16 11:57
firewire.h
597
B
-rw-r--r--
2016-01-11 00:01
flow.h
6.78
KB
-rw-r--r--
2016-01-11 00:01
flow_dissector.h
5.15
KB
-rw-r--r--
2021-04-16 11:57
flowcache.h
561
B
-rw-r--r--
2016-01-11 00:01
fou.h
499
B
-rw-r--r--
2016-01-11 00:01
garp.h
2.58
KB
-rw-r--r--
2016-01-11 00:01
gen_stats.h
2.13
KB
-rw-r--r--
2016-01-11 00:01
genetlink.h
12.89
KB
-rw-r--r--
2021-04-16 11:57
geneve.h
1.82
KB
-rw-r--r--
2021-04-16 11:57
gre.h
661
B
-rw-r--r--
2016-01-11 00:01
gro_cells.h
2.08
KB
-rw-r--r--
2021-04-16 11:57
gue.h
3.19
KB
-rw-r--r--
2016-01-11 00:01
icmp.h
1.73
KB
-rw-r--r--
2021-04-16 11:57
ieee80211_radiotap.h
12.22
KB
-rw-r--r--
2016-01-11 00:01
ieee802154_netdev.h
9.13
KB
-rw-r--r--
2016-01-11 00:01
if_inet6.h
6.07
KB
-rw-r--r--
2016-01-11 00:01
inet6_connection_sock.h
1.1
KB
-rw-r--r--
2016-01-11 00:01
inet6_hashtables.h
3.25
KB
-rw-r--r--
2016-01-11 00:01
inet_common.h
1.6
KB
-rw-r--r--
2016-01-11 00:01
inet_connection_sock.h
10.41
KB
-rw-r--r--
2021-04-16 11:57
inet_ecn.h
6.08
KB
-rw-r--r--
2021-04-16 11:57
inet_frag.h
3.98
KB
-rw-r--r--
2021-04-16 11:57
inet_hashtables.h
12.02
KB
-rw-r--r--
2016-01-11 00:01
inet_sock.h
7.87
KB
-rw-r--r--
2021-04-16 11:57
inet_timewait_sock.h
4.16
KB
-rw-r--r--
2021-04-16 11:57
inetpeer.h
3.46
KB
-rw-r--r--
2021-04-16 11:57
ip.h
17.59
KB
-rw-r--r--
2021-04-16 11:57
ip6_checksum.h
2.91
KB
-rw-r--r--
2016-01-11 00:01
ip6_fib.h
7.28
KB
-rw-r--r--
2021-04-16 11:57
ip6_route.h
6.32
KB
-rw-r--r--
2021-04-16 11:57
ip6_tunnel.h
3
KB
-rw-r--r--
2021-04-16 11:57
ip_fib.h
9.48
KB
-rw-r--r--
2021-04-16 11:57
ip_tunnels.h
10.58
KB
-rw-r--r--
2021-04-16 11:57
ip_vs.h
46.15
KB
-rw-r--r--
2021-04-16 11:57
ipcomp.h
620
B
-rw-r--r--
2016-01-11 00:01
ipconfig.h
772
B
-rw-r--r--
2016-01-11 00:01
ipv6.h
28.29
KB
-rw-r--r--
2021-04-16 11:57
ipx.h
4.32
KB
-rw-r--r--
2016-01-11 00:01
iw_handler.h
22.21
KB
-rw-r--r--
2021-04-16 11:57
l3mdev.h
5.18
KB
-rw-r--r--
2021-04-16 11:57
lapb.h
4.69
KB
-rw-r--r--
2016-01-11 00:01
lib80211.h
3.88
KB
-rw-r--r--
2016-01-11 00:01
llc.h
4.38
KB
-rw-r--r--
2021-04-16 11:57
llc_c_ac.h
9.34
KB
-rw-r--r--
2016-01-11 00:01
llc_c_ev.h
10.68
KB
-rw-r--r--
2016-01-11 00:01
llc_c_st.h
1.72
KB
-rw-r--r--
2016-01-11 00:01
llc_conn.h
4.06
KB
-rw-r--r--
2021-04-16 11:57
llc_if.h
2.16
KB
-rw-r--r--
2016-01-11 00:01
llc_pdu.h
14.08
KB
-rw-r--r--
2016-01-11 00:01
llc_s_ac.h
1.55
KB
-rw-r--r--
2016-01-11 00:01
llc_s_ev.h
2.2
KB
-rw-r--r--
2016-01-11 00:01
llc_s_st.h
947
B
-rw-r--r--
2016-01-11 00:01
llc_sap.h
1.08
KB
-rw-r--r--
2016-01-11 00:01
lwtunnel.h
4.07
KB
-rw-r--r--
2016-01-11 00:01
mac80211.h
213.51
KB
-rw-r--r--
2021-04-16 11:57
mac802154.h
12.1
KB
-rw-r--r--
2016-01-11 00:01
mip6.h
1.58
KB
-rw-r--r--
2016-01-11 00:01
mld.h
2.76
KB
-rw-r--r--
2016-01-11 00:01
mpls.h
1.14
KB
-rw-r--r--
2016-01-11 00:01
mpls_iptunnel.h
815
B
-rw-r--r--
2016-01-11 00:01
mrp.h
2.99
KB
-rw-r--r--
2016-01-11 00:01
ndisc.h
5.75
KB
-rw-r--r--
2021-04-16 11:57
neighbour.h
14.62
KB
-rw-r--r--
2021-04-16 11:57
net_namespace.h
9.26
KB
-rw-r--r--
2021-04-16 11:57
net_ratelimit.h
181
B
-rw-r--r--
2016-01-11 00:01
netevent.h
739
B
-rw-r--r--
2016-01-11 00:01
netlabel.h
17.25
KB
-rw-r--r--
2016-01-11 00:01
netlink.h
36.53
KB
-rw-r--r--
2021-04-16 11:57
netprio_cgroup.h
1.08
KB
-rw-r--r--
2016-01-11 00:01
netrom.h
7.61
KB
-rw-r--r--
2016-01-11 00:01
nexthop.h
826
B
-rw-r--r--
2021-04-16 11:57
nl802154.h
11.89
KB
-rw-r--r--
2016-01-11 00:01
p8022.h
408
B
-rw-r--r--
2016-01-11 00:01
ping.h
3.52
KB
-rw-r--r--
2016-01-11 00:01
pkt_cls.h
9.61
KB
-rw-r--r--
2021-04-16 11:57
pkt_sched.h
3.77
KB
-rw-r--r--
2016-01-11 00:01
protocol.h
4.09
KB
-rw-r--r--
2016-01-11 00:01
psnap.h
312
B
-rw-r--r--
2016-01-11 00:01
raw.h
1.84
KB
-rw-r--r--
2016-01-11 00:01
rawv6.h
543
B
-rw-r--r--
2016-01-11 00:01
red.h
10.3
KB
-rw-r--r--
2021-04-16 11:57
regulatory.h
10.12
KB
-rw-r--r--
2021-04-16 11:57
request_sock.h
6.38
KB
-rw-r--r--
2016-01-11 00:01
rose.h
7.59
KB
-rw-r--r--
2016-01-11 00:01
route.h
9.51
KB
-rw-r--r--
2021-04-16 11:57
rtnetlink.h
5.37
KB
-rw-r--r--
2016-01-11 00:01
sch_generic.h
20.26
KB
-rw-r--r--
2021-04-16 11:57
scm.h
3.44
KB
-rw-r--r--
2021-04-16 11:57
secure_seq.h
677
B
-rw-r--r--
2016-01-11 00:01
slhc_vj.h
6.67
KB
-rw-r--r--
2021-04-16 11:57
snmp.h
5.75
KB
-rw-r--r--
2016-01-11 00:01
sock.h
66.2
KB
-rw-r--r--
2021-04-16 11:57
stp.h
344
B
-rw-r--r--
2016-01-11 00:01
switchdev.h
8.81
KB
-rw-r--r--
2021-04-16 11:57
tcp.h
55.29
KB
-rw-r--r--
2021-04-16 11:57
tcp_memcontrol.h
254
B
-rw-r--r--
2016-01-11 00:01
tcp_states.h
1.26
KB
-rw-r--r--
2016-01-11 00:01
timewait_sock.h
1.11
KB
-rw-r--r--
2016-01-11 00:01
transp_v6.h
1.83
KB
-rw-r--r--
2016-01-11 00:01
tso.h
446
B
-rw-r--r--
2016-01-11 00:01
udp.h
9.77
KB
-rw-r--r--
2016-01-11 00:01
udp_tunnel.h
3.24
KB
-rw-r--r--
2016-01-11 00:01
udplite.h
3.77
KB
-rw-r--r--
2021-04-16 11:57
vsock_addr.h
1.05
KB
-rw-r--r--
2016-01-11 00:01
vxlan.h
6.99
KB
-rw-r--r--
2021-04-16 11:57
wext.h
1.47
KB
-rw-r--r--
2016-01-11 00:01
wimax.h
19.97
KB
-rw-r--r--
2016-01-11 00:01
x25.h
9.35
KB
-rw-r--r--
2021-04-16 11:57
x25device.h
348
B
-rw-r--r--
2016-01-11 00:01
xfrm.h
49.64
KB
-rw-r--r--
2021-04-16 11:57
Save
Rename
#ifndef __NET_SCHED_CODEL_H #define __NET_SCHED_CODEL_H /* * Codel - The Controlled-Delay Active Queue Management algorithm * * Copyright (C) 2011-2012 Kathleen Nichols <nichols@pollere.com> * Copyright (C) 2011-2012 Van Jacobson <van@pollere.net> * Copyright (C) 2012 Michael D. Taht <dave.taht@bufferbloat.net> * Copyright (C) 2012,2015 Eric Dumazet <edumazet@google.com> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions, and the following disclaimer, * without modification. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The names of the authors may not be used to endorse or promote products * derived from this software without specific prior written permission. * * Alternatively, provided that this notice is retained in full, this * software may be distributed under the terms of the GNU General * Public License ("GPL") version 2, in which case the provisions of the * GPL apply INSTEAD OF those given above. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * */ #include <linux/types.h> #include <linux/ktime.h> #include <linux/skbuff.h> #include <net/pkt_sched.h> #include <net/inet_ecn.h> /* Controlling Queue Delay (CoDel) algorithm * ========================================= * Source : Kathleen Nichols and Van Jacobson * http://queue.acm.org/detail.cfm?id=2209336 * * Implemented on linux by Dave Taht and Eric Dumazet */ /* CoDel uses a 1024 nsec clock, encoded in u32 * This gives a range of 2199 seconds, because of signed compares */ typedef u32 codel_time_t; typedef s32 codel_tdiff_t; #define CODEL_SHIFT 10 #define MS2TIME(a) ((a * NSEC_PER_MSEC) >> CODEL_SHIFT) static inline codel_time_t codel_get_time(void) { u64 ns = ktime_get_ns(); return ns >> CODEL_SHIFT; } /* Dealing with timer wrapping, according to RFC 1982, as desc in wikipedia: * https://en.wikipedia.org/wiki/Serial_number_arithmetic#General_Solution * codel_time_after(a,b) returns true if the time a is after time b. */ #define codel_time_after(a, b) \ (typecheck(codel_time_t, a) && \ typecheck(codel_time_t, b) && \ ((s32)((a) - (b)) > 0)) #define codel_time_before(a, b) codel_time_after(b, a) #define codel_time_after_eq(a, b) \ (typecheck(codel_time_t, a) && \ typecheck(codel_time_t, b) && \ ((s32)((a) - (b)) >= 0)) #define codel_time_before_eq(a, b) codel_time_after_eq(b, a) /* Qdiscs using codel plugin must use codel_skb_cb in their own cb[] */ struct codel_skb_cb { codel_time_t enqueue_time; }; static struct codel_skb_cb *get_codel_cb(const struct sk_buff *skb) { qdisc_cb_private_validate(skb, sizeof(struct codel_skb_cb)); return (struct codel_skb_cb *)qdisc_skb_cb(skb)->data; } static codel_time_t codel_get_enqueue_time(const struct sk_buff *skb) { return get_codel_cb(skb)->enqueue_time; } static void codel_set_enqueue_time(struct sk_buff *skb) { get_codel_cb(skb)->enqueue_time = codel_get_time(); } static inline u32 codel_time_to_us(codel_time_t val) { u64 valns = ((u64)val << CODEL_SHIFT); do_div(valns, NSEC_PER_USEC); return (u32)valns; } /** * struct codel_params - contains codel parameters * @target: target queue size (in time units) * @ce_threshold: threshold for marking packets with ECN CE * @interval: width of moving time window * @mtu: device mtu, or minimal queue backlog in bytes. * @ecn: is Explicit Congestion Notification enabled */ struct codel_params { codel_time_t target; codel_time_t ce_threshold; codel_time_t interval; u32 mtu; bool ecn; }; /** * struct codel_vars - contains codel variables * @count: how many drops we've done since the last time we * entered dropping state * @lastcount: count at entry to dropping state * @dropping: set to true if in dropping state * @rec_inv_sqrt: reciprocal value of sqrt(count) >> 1 * @first_above_time: when we went (or will go) continuously above target * for interval * @drop_next: time to drop next packet, or when we dropped last * @ldelay: sojourn time of last dequeued packet */ struct codel_vars { u32 count; u32 lastcount; bool dropping; u16 rec_inv_sqrt; codel_time_t first_above_time; codel_time_t drop_next; codel_time_t ldelay; }; #define REC_INV_SQRT_BITS (8 * sizeof(u16)) /* or sizeof_in_bits(rec_inv_sqrt) */ /* needed shift to get a Q0.32 number from rec_inv_sqrt */ #define REC_INV_SQRT_SHIFT (32 - REC_INV_SQRT_BITS) /** * struct codel_stats - contains codel shared variables and stats * @maxpacket: largest packet we've seen so far * @drop_count: temp count of dropped packets in dequeue() * @drop_len: bytes of dropped packets in dequeue() * ecn_mark: number of packets we ECN marked instead of dropping * ce_mark: number of packets CE marked because sojourn time was above ce_threshold */ struct codel_stats { u32 maxpacket; u32 drop_count; u32 drop_len; u32 ecn_mark; u32 ce_mark; }; #define CODEL_DISABLED_THRESHOLD INT_MAX static void codel_params_init(struct codel_params *params, const struct Qdisc *sch) { params->interval = MS2TIME(100); params->target = MS2TIME(5); params->mtu = psched_mtu(qdisc_dev(sch)); params->ce_threshold = CODEL_DISABLED_THRESHOLD; params->ecn = false; } static void codel_vars_init(struct codel_vars *vars) { memset(vars, 0, sizeof(*vars)); } static void codel_stats_init(struct codel_stats *stats) { stats->maxpacket = 0; } /* * http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Iterative_methods_for_reciprocal_square_roots * new_invsqrt = (invsqrt / 2) * (3 - count * invsqrt^2) * * Here, invsqrt is a fixed point number (< 1.0), 32bit mantissa, aka Q0.32 */ static void codel_Newton_step(struct codel_vars *vars) { u32 invsqrt = ((u32)vars->rec_inv_sqrt) << REC_INV_SQRT_SHIFT; u32 invsqrt2 = ((u64)invsqrt * invsqrt) >> 32; u64 val = (3LL << 32) - ((u64)vars->count * invsqrt2); val >>= 2; /* avoid overflow in following multiply */ val = (val * invsqrt) >> (32 - 2 + 1); vars->rec_inv_sqrt = val >> REC_INV_SQRT_SHIFT; } /* * CoDel control_law is t + interval/sqrt(count) * We maintain in rec_inv_sqrt the reciprocal value of sqrt(count) to avoid * both sqrt() and divide operation. */ static codel_time_t codel_control_law(codel_time_t t, codel_time_t interval, u32 rec_inv_sqrt) { return t + reciprocal_scale(interval, rec_inv_sqrt << REC_INV_SQRT_SHIFT); } static bool codel_should_drop(const struct sk_buff *skb, struct Qdisc *sch, struct codel_vars *vars, struct codel_params *params, struct codel_stats *stats, codel_time_t now) { bool ok_to_drop; if (!skb) { vars->first_above_time = 0; return false; } vars->ldelay = now - codel_get_enqueue_time(skb); sch->qstats.backlog -= qdisc_pkt_len(skb); if (unlikely(qdisc_pkt_len(skb) > stats->maxpacket)) stats->maxpacket = qdisc_pkt_len(skb); if (codel_time_before(vars->ldelay, params->target) || sch->qstats.backlog <= params->mtu) { /* went below - stay below for at least interval */ vars->first_above_time = 0; return false; } ok_to_drop = false; if (vars->first_above_time == 0) { /* just went above from below. If we stay above * for at least interval we'll say it's ok to drop */ vars->first_above_time = now + params->interval; } else if (codel_time_after(now, vars->first_above_time)) { ok_to_drop = true; } return ok_to_drop; } typedef struct sk_buff * (*codel_skb_dequeue_t)(struct codel_vars *vars, struct Qdisc *sch); static struct sk_buff *codel_dequeue(struct Qdisc *sch, struct codel_params *params, struct codel_vars *vars, struct codel_stats *stats, codel_skb_dequeue_t dequeue_func) { struct sk_buff *skb = dequeue_func(vars, sch); codel_time_t now; bool drop; if (!skb) { vars->dropping = false; return skb; } now = codel_get_time(); drop = codel_should_drop(skb, sch, vars, params, stats, now); if (vars->dropping) { if (!drop) { /* sojourn time below target - leave dropping state */ vars->dropping = false; } else if (codel_time_after_eq(now, vars->drop_next)) { /* It's time for the next drop. Drop the current * packet and dequeue the next. The dequeue might * take us out of dropping state. * If not, schedule the next drop. * A large backlog might result in drop rates so high * that the next drop should happen now, * hence the while loop. */ while (vars->dropping && codel_time_after_eq(now, vars->drop_next)) { vars->count++; /* dont care of possible wrap * since there is no more divide */ codel_Newton_step(vars); if (params->ecn && INET_ECN_set_ce(skb)) { stats->ecn_mark++; vars->drop_next = codel_control_law(vars->drop_next, params->interval, vars->rec_inv_sqrt); goto end; } stats->drop_len += qdisc_pkt_len(skb); qdisc_drop(skb, sch); stats->drop_count++; skb = dequeue_func(vars, sch); if (!codel_should_drop(skb, sch, vars, params, stats, now)) { /* leave dropping state */ vars->dropping = false; } else { /* and schedule the next drop */ vars->drop_next = codel_control_law(vars->drop_next, params->interval, vars->rec_inv_sqrt); } } } } else if (drop) { u32 delta; if (params->ecn && INET_ECN_set_ce(skb)) { stats->ecn_mark++; } else { stats->drop_len += qdisc_pkt_len(skb); qdisc_drop(skb, sch); stats->drop_count++; skb = dequeue_func(vars, sch); drop = codel_should_drop(skb, sch, vars, params, stats, now); } vars->dropping = true; /* if min went above target close to when we last went below it * assume that the drop rate that controlled the queue on the * last cycle is a good starting point to control it now. */ delta = vars->count - vars->lastcount; if (delta > 1 && codel_time_before(now - vars->drop_next, 16 * params->interval)) { vars->count = delta; /* we dont care if rec_inv_sqrt approximation * is not very precise : * Next Newton steps will correct it quadratically. */ codel_Newton_step(vars); } else { vars->count = 1; vars->rec_inv_sqrt = ~0U >> REC_INV_SQRT_SHIFT; } vars->lastcount = vars->count; vars->drop_next = codel_control_law(now, params->interval, vars->rec_inv_sqrt); } end: if (skb && codel_time_after(vars->ldelay, params->ce_threshold) && INET_ECN_set_ce(skb)) stats->ce_mark++; return skb; } #endif