"fq" qdisc

FQ - Fair Queue traffic policing

It is designed to achieve per flow pacing.

All packets belonging to a socket are considered as a 'flow'.

For non local packets (router workload), packet rxhash is used as fallback.

An application can specify a maximum pacing rate using the SO_MAX_PACING_RATE setsockopt call.

This packet scheduler adds delay between packets to respect rate limitation set by TCP stack.

A special FIFO queue is reserved for high priority packets ( TC_PRIO_CONTROL priority), such packets are always dequeued first.





Hard limit on the real queue size. When this limit is reached, new packets are dropped.
(Default is 10000 packets)


Hard limit on the maximum number of packets queued per flow.
Default value is 100. 


The credit per dequeue RR round, i.e. the amount of bytes a flow is allowed to dequeue at once.
A larger value means a longer time period before the next flow will be served.
Default is 2 * interface MTU bytes. 


The initial sending rate credit, i.e. the amount of bytes a new flow is allowed to dequeue initially.


Maximum sending rate of a flow. Default is unlimited.


The size of the hash table used for flow lookups.
Each bucket is assigned a red-black tree for efficient collision sorting. Default: 1024.





tc qdisc add dev eth0 root est 1sec 4sec fq ce_threshold 4ms

tc -s -d qdisc sh dev eth0