info > CAKE(8)

📛 NAME

CAKE - Common Applications Kept Enhanced (CAKE)

🚀 Quick Reference

Use CaseCommandDescription
Basic egress shaping with Ethernet overheadtc qdisc add dev eth0 root cake bandwidth 100Mbit ethernetShape outbound to 100 Mbit/s, compensating for Ethernet framing
Ingress autorate (cellular)tc qdisc add dev eth0 ingress cake autorate-ingressLet CAKE estimate link capacity dynamically from incoming traffic
Set RTT for satellitetc qdisc add dev eth0 root cake bandwidth 1Mbit satelliteConfigure AQM for high-latency satellite link
Dual-srchost flow isolation (LAN egress)tc qdisc add dev eth0 root cake bandwidth 10Mbit dual-srchostPrevent one host from monopolising uplink regardless of flow count
Wash untrusted diffserv markingstc qdisc add dev eth0 root cake bandwidth 100Mbit washClear QoS bits (but not ECN) after priority queuing
Show real-time statisticstc -s qdisc show dev eth0Display per-tin stats, drops, delays, and flow counts

📋 SYNOPSIS

tc qdisc ... cake
  [ bandwidth RATE | unlimited* | autorate-ingress ]
  [ rtt TIME | datacentre | lan | metro | regional | internet* | oceanic
    | satellite | interplanetary ]
  [ besteffort | diffserv8 | diffserv4 | diffserv3* ]
  [ flowblind | srchost | dsthost | hosts | flows | dual-srchost | dual-dsthost
    | triple-isolate* ]
  [ nat | nonat* ]
  [ wash | nowash* ]
  [ split-gso* | no-split-gso ]
  [ ack-filter | ack-filter-aggressive | no-ack-filter* ]
  [ memlimit LIMIT ]
  [ fwmark MASK ]
  [ ptm | atm | noatm* ]
  [ overhead N | conservative | raw* ]
  [ mpu N ]
  [ ingress | egress* ]
  (* marks defaults)

📘 DESCRIPTION

CAKE (Common Applications Kept Enhanced) is a shaping‑capable queue discipline which uses both AQM and FQ. It combines COBALT (Codel + BLUE), a deficit‑mode shaper, and a variant of DRR++ for flow isolation. 8‑way set‑associative hashing virtually eliminates collisions. Simplified diffserv priority queuing is available, and overhead compensation for encapsulation schemes is tightly integrated.

All settings are optional; defaults are sensible for most deployments. Most people only need to set the bandwidth parameter, but reading the Overhead Compensation and Round Trip Time sections is strongly encouraged.

🔧 SHAPER PARAMETERS

CAKE uses a deficit‑mode shaper (no initial burst). It automatically bursts just enough to maintain the configured throughput.

📦 OVERHEAD COMPENSATION PARAMETERS

The packet size Linux sees may differ from the wire size. These options make CAKE internally treat each packet as larger, accounting for encapsulation overheads. Keywords exist for common link technologies.

📐 Manual Overhead Specification

⚡ Failsafe Overhead Keywords

Quick‑and‑dirty settings if you don’t want to read further.

📡 ADSL Overhead Keywords

All implicitly enable atm. Check your modem’s framing settings.

📶 VDSL2 Overhead Keywords

📺 DOCSIS Cable Overhead Keyword

🌐 Ethernet Overhead Keywords

⏱️ ROUND TRIP TIME PARAMETERS

AQM in CAKE (COBALT) responds to queue occupancy, but response speed must match actual RTT. Very short RTT presets can starve throughput; use metro for local LANs unless you have a custom kernel.

🔀 FLOW ISOLATION PARAMETERS

Packets from different flows are isolated in separate queues, each with its own AQM state. Set‑associative hashing minimises collisions. Choose fairness based on source, destination, 5‑tuple, or layered isolation.

🎚️ PRIORITY QUEUE PARAMETERS

Traffic is divided into “tins” based on Diffserv field. Each tin has independent flow‑isolation queues and is serviced via WRR with priority‑sharing thresholds.

🛠️ OTHER PARAMETERS

🎯 OVERRIDING CLASSIFICATION WITH TC FILTERS

CAKE allows overriding its internal classification via standard tc filters. Tin assignment uses skb→priority, and flow hashing uses classid.

🏷️ Tin override

The major number of the priority must match the qdisc handle; the minor is the tin index. Example: classify ICMP as ‘bulk’ (tin 1).

# tc qdisc replace dev eth0 handle 1: root cake diffserv3
# tc filter add dev eth0 parent 1: protocol ip prio 1 \
  u32 match icmp type 0 0 action skbedit priority 1:1

🔢 Flow hash override

Set the classid to override flow hashing. The major number is the host hash (used in host‑isolation modes), the minor is the flow hash (used in flows mode). Both can be set; missing ones are computed normally. Host isolation assigns a host ID to flow queues – the same flow cannot have multiple host IDs. Overriden host ID is used as both source and destination host.

# tc qdisc replace dev eth0 handle 1: root cake
# tc filter add dev eth0 parent 1: protocol ip prio 1 \
  u32 match icmp type 0 0 classid 0:1

💡 EXAMPLES

Setup and initial statistics:

# tc qdisc delete root dev eth0
# tc qdisc add root dev eth0 cake bandwidth 100Mbit ethernet
# tc -s qdisc show dev eth0
qdisc cake 1: root refcnt 2 bandwidth 100Mbit diffserv3 triple‑isolate rtt 100.0ms noatm overhead 38 mpu 84
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 0b of 5000000b
 capacity estimate: 100Mbit
 min/max network layer size:        65535 /       0
 min/max overhead‑adjusted size:    65535 /       0
 average network hdr offset:            0

                  Bulk  Best Effort        Voice
 thresh       6250Kbit      100Mbit       25Mbit
 target          5.0ms        5.0ms        5.0ms
 interval      100.0ms      100.0ms      100.0ms
 pk_delay          0us          0us          0us
 av_delay          0us          0us          0us
 sp_delay          0us          0us          0us
 pkts                0            0            0
 bytes               0            0            0
 way_inds            0            0            0
 way_miss            0            0            0
 way_cols            0            0            0
 drops               0            0            0
 marks               0            0            0
 ack_drop            0            0            0
 sp_flows            0            0            0
 bk_flows            0            0            0
 un_flows            0            0            0
 max_len             0            0            0
 quantum           300         1514          762

After some traffic:

# tc -s qdisc show dev eth0
qdisc cake 1: root refcnt 2 bandwidth 100Mbit diffserv3 triple‑isolate rtt 100.0ms noatm overhead 38 mpu 84
 Sent 44709231 bytes 31931 pkt (dropped 45, overlimits 93782 requeues 0)
 backlog 33308b 22p requeues 0
 memory used: 292352b of 5000000b
 capacity estimate: 100Mbit
 min/max network layer size:           28 /    1500
 min/max overhead‑adjusted size:       84 /    1538
 average network hdr offset:           14

                  Bulk  Best Effort        Voice
 thresh       6250Kbit      100Mbit       25Mbit
 target          5.0ms        5.0ms        5.0ms
 interval      100.0ms      100.0ms      100.0ms
 pk_delay        8.7ms        6.9ms        5.0ms
 av_delay        4.9ms        5.3ms        3.8ms
 sp_delay        727us        1.4ms        511us
 pkts             2590        21271         8137
 bytes         3081804     30302659     11426206
 way_inds            0           46            0
 way_miss            3           17            4
 way_cols            0            0            0
 drops              20           15           10
 marks               0            0            0
 ack_drop            0            0            0
 sp_flows            2            4            1
 bk_flows            1            2            1
 un_flows            0            0            0
 max_len          1514         1514         1514
 quantum           300         1514          762

🔗 SEE ALSO

tc(8), tc‑codel(8), tc‑fq_codel(8), tc‑htb(8)

✍️ AUTHORS

CAKE principal author: Jonathan Morton. Contributors: Tony Ambardar, Kevin Darbyshire‑Bryant, Toke Høiland‑Jørgensen, Sebastian Moeller, Ryan Mounce, Dean Scarff, Nils Andreas Svee, Dave Taht.

Manual page: Loganaden Velvindron. Corrections to: <netdev AT vger.ker‑nel.org>.

CAKE(8)
📛 NAME 🚀 Quick Reference 📋 SYNOPSIS 📘 DESCRIPTION 🔧 SHAPER PARAMETERS 📦 OVERHEAD COMPENSATION PARAMETERS
📐 Manual Overhead Specification ⚡ Failsafe Overhead Keywords 📡 ADSL Overhead Keywords 📶 VDSL2 Overhead Keywords 📺 DOCSIS Cable Overhead Keyword 🌐 Ethernet Overhead Keywords
⏱️ ROUND TRIP TIME PARAMETERS 🔀 FLOW ISOLATION PARAMETERS 🎚️ PRIORITY QUEUE PARAMETERS 🛠️ OTHER PARAMETERS 🎯 OVERRIDING CLASSIFICATION WITH TC FILTERS
🏷️ Tin override 🔢 Flow hash override
💡 EXAMPLES 🔗 SEE ALSO ✍️ AUTHORS

Generated by phpman v4.9.22-1-g1b0fcb4 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-05 06:01 @216.73.216.52
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format

^_top_^