/usr/src/linux-headers-5.15.0-190/include/net
NameSizeModeActions
9p/-0755rm
bluetooth/-0755rm
caif/-0755rm
iucv/-0755rm
netfilter/-0755rm
netns/-0755rm
nfc/-0755rm
phonet/-0755rm
sctp/-0755rm
tc_act/-0755rm
6lowpan.h102700644editdlrm
act_api.h87280644editdlrm
addrconf.h145940644editdlrm
af_ieee802154.h12200644editdlrm
af_rxrpc.h27980644editdlrm
af_unix.h33750644editdlrm
af_vsock.h75920644editdlrm
ah.h3820644editdlrm
arp.h21410644editdlrm
atmclip.h15150644editdlrm
ax25.h154430644editdlrm
ax88796.h14400644editdlrm
bareudp.h5720644editdlrm
bonding.h202630644editdlrm
bond_3ad.h97060644editdlrm
bond_alb.h62510644editdlrm
bond_options.h38760644editdlrm
bpf_sk_storage.h17800644editdlrm
busy_poll.h39590644editdlrm
calipso.h15900644editdlrm
cfg80211-wext.h18540644editdlrm
cfg80211.h3013170644editdlrm
cfg802154.h107790644editdlrm
checksum.h48690644editdlrm
cipso_ipv4.h75480644editdlrm
cls_cgroup.h20860644editdlrm
codel.h57820644editdlrm
codel_impl.h81670644editdlrm
codel_qdisc.h29730644editdlrm
compat.h25860644editdlrm
datalink.h6190644editdlrm
dcbevent.h7420644editdlrm
dcbnl.h43170644editdlrm
devlink.h635930644editdlrm
dsa.h362310644editdlrm
dsfield.h11470644editdlrm
dst.h151530644editdlrm
dst_cache.h30310644editdlrm
dst_metadata.h55210644editdlrm
dst_ops.h21250644editdlrm
erspan.h91800644editdlrm
esp.h11900644editdlrm
espintcp.h9660644editdlrm
ethoc.h3910644editdlrm
failover.h11780644editdlrm
fib_notifier.h13840644editdlrm
fib_rules.h64500644editdlrm
firewire.h6360644editdlrm
flow.h51190644editdlrm
flow_dissector.h110330644editdlrm
flow_offload.h159380644editdlrm
fou.h5490644editdlrm
fq.h25280644editdlrm
fq_impl.h80760644editdlrm
garp.h26780644editdlrm
genetlink.h138540644editdlrm
geneve.h18980644editdlrm
gen_stats.h28890644editdlrm
gre.h33690644editdlrm
gro.h7830644editdlrm
gro_cells.h4430644editdlrm
gtp.h6330644editdlrm
gue.h33130644editdlrm
hwbm.h9690644editdlrm
icmp.h19180644editdlrm
ieee80211_radiotap.h135180644editdlrm
ieee802154_netdev.h100950644editdlrm
ife.h10570644editdlrm
if_inet6.h66920644editdlrm
ila.h2910644editdlrm
inet6_connection_sock.h7650644editdlrm
inet6_hashtables.h42590644editdlrm
inetpeer.h33720644editdlrm
inet_common.h26140644editdlrm
inet_connection_sock.h116080644editdlrm
inet_ecn.h76250644editdlrm
inet_frag.h50460644editdlrm
inet_hashtables.h125320644editdlrm
inet_sock.h99940644editdlrm
inet_timewait_sock.h37350644editdlrm
ioam6.h12480644editdlrm
ip.h227590644editdlrm
ip6_checksum.h27700644editdlrm
ip6_fib.h162800644editdlrm
ip6_route.h102300644editdlrm
ip6_tunnel.h50960644editdlrm
ipcomp.h6590644editdlrm
ipconfig.h8110644editdlrm
ipv6.h359900644editdlrm
ipv6_frag.h33610644editdlrm
ipv6_stubs.h34820644editdlrm
ip_fib.h163460644editdlrm
ip_tunnels.h159490644editdlrm
ip_vs.h505880644editdlrm
iw_handler.h214130644editdlrm
kcm.h49610644editdlrm
l3mdev.h72020644editdlrm
lag.h4090644editdlrm
lapb.h49380644editdlrm
lib80211.h40170644editdlrm
llc.h45140644editdlrm
llc_conn.h41550644editdlrm
llc_c_ac.h95370644editdlrm
llc_c_ev.h109400644editdlrm
llc_c_st.h17620644editdlrm
llc_if.h22100644editdlrm
llc_pdu.h146970644editdlrm
llc_sap.h11080644editdlrm
llc_s_ac.h15910644editdlrm
llc_s_ev.h22550644editdlrm
llc_s_st.h9470644editdlrm
lwtunnel.h68060644editdlrm
mac80211.h2741200644editdlrm
mac802154.h152350644editdlrm
macsec.h70840644editdlrm
mctp.h61550644editdlrm
mctpdevice.h8410644editdlrm
mip6.h10160644editdlrm
mld.h29180644editdlrm
mpls.h9430644editdlrm
mpls_iptunnel.h4290644editdlrm
mptcp.h67760644editdlrm
mrp.h31190644editdlrm
ncsi.h19640644editdlrm
ndisc.h151500644editdlrm
neighbour.h160990644editdlrm
netevent.h10440644editdlrm
netlabel.h206760644editdlrm
netlink.h618920644editdlrm
netprio_cgroup.h10470644editdlrm
netrom.h78950644editdlrm
net_failover.h10230644editdlrm
net_namespace.h127950644editdlrm
net_ratelimit.h2200644editdlrm
nexthop.h125650644editdlrm
nl802154.h123840644editdlrm
nsh.h126020644editdlrm
p8022.h4470644editdlrm
page_pool.h86460644editdlrm
pie.h36950644editdlrm
ping.h29700644editdlrm
pkt_cls.h244310644editdlrm
pkt_sched.h60420644editdlrm
pptp.h5570644editdlrm
protocol.h39000644editdlrm
psample.h10830644editdlrm
psnap.h3510644editdlrm
raw.h21360644editdlrm
rawv6.h8540644editdlrm
red.h116000644editdlrm
regulatory.h109010644editdlrm
request_sock.h66600644editdlrm
rose.h78020644editdlrm
route.h113610644editdlrm
rpl.h8390644editdlrm
rsi_91x.h17100644editdlrm
rtnetlink.h76380644editdlrm
rtnh.h8590644editdlrm
sch_generic.h349910644editdlrm
scm.h38770644editdlrm
secure_seq.h8550644editdlrm
seg6.h22370644editdlrm
seg6_hmac.h14730644editdlrm
seg6_local.h6440644editdlrm
selftests.h5820644editdlrm
slhc_vj.h68310644editdlrm
smc.h25130644editdlrm
snmp.h52680644editdlrm
sock.h863510644editdlrm
sock_reuseport.h18730644editdlrm
Space.h7370644editdlrm
stp.h3830644editdlrm
strparser.h42500644editdlrm
switchdev.h146140644editdlrm
tcp.h753270644editdlrm
tcp_states.h12250644editdlrm
timewait_sock.h9250644editdlrm
tipc.h24050644editdlrm
tls.h214650644editdlrm
tls_toe.h30060644editdlrm
transp_v6.h19960644editdlrm
tso.h5660644editdlrm
tun_proto.h9880644editdlrm
udp.h170350644editdlrm
udplite.h37620644editdlrm
udp_tunnel.h127390644editdlrm
vsock_addr.h6620644editdlrm
vxlan.h144240644editdlrm
wext.h15100644editdlrm
x25.h97180644editdlrm
x25device.h3870644editdlrm
xdp.h88290644editdlrm
xdp_priv.h4460644editdlrm
xdp_sock.h20940644editdlrm
xdp_sock_drv.h56070644editdlrm
xfrm.h563040644editdlrm
xsk_buff_pool.h51380644editdlrm
Edit: /usr/src/linux-headers-5.15.0-190/include/net/codel.h (5782B)
#ifndef __NET_SCHED_CODEL_H #define __NET_SCHED_CODEL_H /* * Codel - The Controlled-Delay Active Queue Management algorithm * * Copyright (C) 2011-2012 Kathleen Nichols * Copyright (C) 2011-2012 Van Jacobson * Copyright (C) 2012 Michael D. Taht * Copyright (C) 2012,2015 Eric Dumazet * * 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 #include #include #include #include /* 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) 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 typedef u32 (*codel_skb_len_t)(const struct sk_buff *skb); typedef codel_time_t (*codel_skb_time_t)(const struct sk_buff *skb); typedef void (*codel_skb_drop_t)(struct sk_buff *skb, void *ctx); typedef struct sk_buff * (*codel_skb_dequeue_t)(struct codel_vars *vars, void *ctx); #endif