tc-bfifo
Limit packet queue size by bytes
SYNOPSIS
tc qdisc { add | change | replace | get } dev DEV { root | parent HANDLE } bfifo [ limit BYTES ]
PARAMETERS
dev DEV
Specifies the network device to which the queueing discipline should be attached. DEV is the device name, e.g., eth0.
root
Attaches the qdisc to the root of the device's traffic control tree.
parent HANDLE
Attaches the qdisc as a child of an existing class or qdisc identified by HANDLE. This allows for hierarchical traffic control setups.
limit BYTES
Sets the maximum size of the queue in bytes. If this limit is exceeded, incoming packets are dropped. This is the core parameter for bfifo.
DESCRIPTION
The tc-bfifo command configures a Byte-FIFO queueing discipline for traffic control in Linux. It is one of the simplest queueing disciplines available, operating on a First-In, First-Out (FIFO) principle. This means packets are processed in the exact order they arrive.
The primary characteristic of bfifo is that its capacity is defined by a byte limit. Once the total size of queued packets exceeds this specified limit, any new incoming packets are dropped until space becomes available. This is often referred to as "tail drop." It offers no advanced features like prioritization, fairness, or explicit bandwidth shaping. Its main use is for basic buffering and preventing excessive queue buildup beyond a certain byte threshold, making it suitable for simple links where only capacity limiting is required. It is an alternative to pfifo, which limits by number of packets rather than bytes.
CAVEATS
bfifo is an extremely simple queueing discipline. It provides no mechanism for prioritization, fairness, or explicit bandwidth control. It implements "tail drop," meaning packets are dropped from the end of the queue when the limit is reached, potentially leading to TCP global synchronization if many TCP flows share the same queue and drop packets simultaneously. For more sophisticated traffic management, other queueing disciplines like HTB or SFQ should be considered.
<I>BFIFO VS. PFIFO</I>
While both bfifo and pfifo are simple FIFO queueing disciplines, their key difference lies in how they measure their capacity. bfifo uses a byte limit, ensuring that the total size of queued data does not exceed a specified number of bytes. In contrast, pfifo uses a packet limit, restricting the number of packets in the queue. The choice between them depends on whether you want to control queue depth by the amount of data or by the number of individual packets.
HISTORY
The bfifo queueing discipline has been a fundamental part of the Linux traffic control system since its inception, integrated within the iproute2 suite of utilities. It provides one of the most basic and efficient buffering mechanisms, serving as a building block for understanding more complex queueing behaviors. Its primary role has remained consistent: a straightforward FIFO queue limited by byte capacity, essential for basic link capacity management.