ALTQ(4)

πŸ’– ALTQ(4) β€” alternate queuing of network packets πŸ’–

okay bestie, sit down, hydrate, because we're about to talk about how your kernel decides who goes first when packets are trying to leave the house. this is ALTQ, a Kernel Interfaces Manual situation, and honestly? it's giving traffic cop but make it fashion. 🚦✨


🌸 NAME 🌸

ALTQ β€” alternate queuing of network packets

like, literally. queuing. of network packets. but alternately. πŸ¦‹


✨ SYNOPSIS ✨

options ALTQ

options ALTQ_CBQ
options ALTQ_CODEL
options ALTQ_RED
options ALTQ_RIO
options ALTQ_HFSC
options ALTQ_CDNR
options ALTQ_PRIQ
options ALTQ_FAIRQ

these go in your kernel config, bestie. no cap. πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

so the ALTQ system is a framework β€” a whole framework, main character energy β€” that provides several disciplines for queuing outgoing network packets. πŸ“€ how does it do that? by making modifications to the interface packet queues. the details live over in altq(9) if you're the kind of girl who reads the deep lore. πŸ‘‘

the user interface for ALTQ is implemented by the pfctl(8) utility, so pls pls pls go read the pfctl(8) and pf.conf(5) man pages if you want the complete description of what ALTQ can do and how to actually use it. that's where the fun stuff is, i'm just the intro. πŸ™ˆ


🧚 Kernel Options 🧚

these are the options in the kernel configuration file that are related to ALTQ operation. write them down, babes:

  • ALTQ β€” Enable ALTQ. yes queen, turn it on.
  • ALTQ_CBQ β€” Build the β€œClass Based Queuing” discipline.
  • ALTQ_CODEL β€” Build the β€œControlled Delay” discipline.
  • ALTQ_RED β€” Build the β€œRandom Early Detection” extension.
  • ALTQ_RIO β€” Build β€œRandom Early Drop” for input and output.
  • ALTQ_HFSC β€” Build the β€œHierarchical Packet Scheduler” discipline.
  • ALTQ_CDNR β€” Build the traffic conditioner. > ⚠️ heads up: this option is meaningless at the moment, because the conditioner is not used by any of the available disciplines or consumers. it's literally just vibing there. πŸ’€
  • ALTQ_PRIQ β€” Build the β€œPriority Queuing” discipline.
  • ALTQ_FAIRQ β€” Build the β€œFair Queuing” discipline.
  • ALTQ_NOPCC β€” Required if the TSC is unusable.
  • ALTQ_DEBUG β€” Enable additional debugging facilities.
🫢 IMPORTANT: note that ALTQ-disciplines cannot be loaded as kernel modules. 😭 in order to use a certain discipline you have to build it into a custom kernel. yes, a whole custom kernel. it's a commitment, but she's worth it. the pf(4) interface β€” which is required for the configuration process of ALTQ β€” can be loaded as a module though, so at least there's that. ✨

🌈 SUPPORTED DEVICES 🌈

the driver modifications described in altq(9) are required to use a certain network card with ALTQ. and they have been applied to the following hardware drivers, in this exact order, don't @ me:

ae(4), age(4), alc(4), ale(4), an(4), aue(4), axe(4), bce(4), bfe(4), bge(4), bxe(4), cas(4), cxgbe(4), dc(4), de(4), ed(4), em(4), ep(4), epair(4), et(4), fxp(4), gem(4), hme(4), igb(4), ixgbe(4), jme(4), le(4), liquidio(4), msk(4), mxge(4), my(4), nfe(4), nge(4), npe(4), qlxgb(4), re(4), rl(4), sf(4), sge(4), sis(4), sk(4), ste(4), stge(4), ti(4), txp(4), udav(4), vge(4), vr(4), vte(4), and xl(4).

a whole lineup. iconic behavior. πŸ‘‘

the ndis(4) framework also has support for ALTQ, and thus all encapsulated drivers. πŸ¦‹

and the tun(4) and ng_iface(4) pseudo drivers also do support ALTQ. so yes, the fake ones are invited to the party too. πŸŽ‰


πŸ‘€ SEE ALSO πŸ‘€

pf(4), pf.conf(5), ipfw(8), pfctl(8), altq(9)

go read them. all of them. it's called ✨research✨. πŸ’…


πŸ“œ HISTORY πŸ“œ

the ALTQ system first appeared in March 1997 and found home in the KAME project (http://www.kame.net). she's been around. it was imported to FreeBSD in 5.3. a true elder stateswoman of packet queuing. 🫢


okay that's the whole page bestie, you're officially educated πŸ’– this one came to you from Debian, dated March 20, 2018, and it lives under the name ALTQ(4). now go build that custom kernel and slay. πŸŒŸπŸ’…πŸŽ€

πŸ“¦ where this page comes from