Queues
When discussing L2 behavior, I often talk about
queues for frames being received (ingress queues ) and transmitted
(egress queues
). Each queue has a pointer to the devices associated
with it, and to the skb_buff data structures that store
the ingress/egress buffers. Only a few specialized devices work without queues; an example
is the loopback device. The loopback device can dispense with queues because when you
transmit a packet out of the loopback device, the packet is immediately delivered (to the
local system) with no need for intermediate queuing. Moreover, since transmissions on the
loopback device cannot fail, there is no need to requeue the packet for another
transmission attempt.
Egress queues are associated directly to devices; Traffic Control (the Quality of Service, or QoS, layer) defines one queue for each device. As we will see in Chapter 11, the kernel keeps track of devices waiting to transmit frames, not the frames themselves. We will also see that not all devices actually use Traffic Control. The situation with ingress queues is a bit more complicated, as we'll see later.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access