Chapter 11. Frame TransmissionTransmission is the term used for frames that leave the system, either because they were sent by the system or because they are being forwarded. In this chapter, we will cover the main tasks involved during the frame transmission data path:
Much about transmission is symmetric to the reception process we discussed in Chapter 10: NET_TX_SOFTIRQ is the transmission counterpart of the NET_RX_SOFTIRQ softirq, net_tx_action is the counterpart of net_rx_action, and so on. Thus, if you have studied the earlier chapter, you should find it easy to follow this one. Figure 11-1 compares the logic behind scheduling a device for reception and scheduling a device for transmission. Here are some more similarities:
dev_queue_xmit plays the same role for the egress path that netif_rx plays for the ingress path: each transfers one frame between the driver's buffer and the kernel's queue. The net_tx_action function is called both when there are devices waiting to transmit something and to do housekeeping with the buffers that are not needed anymore. Just as there are queues for ingress traffic, there are queues for egress traffic. The egress queues , handled by Traffic Control (the QoS layer), are actually much more complex than the ingress ones: while the latter are just ordinary First In, First Outs (FIFOs), the former can be hierarchical, represented by trees of queues. Even though Traffic Control has support for ingress queueing too, it's used more for policing and management reasons rather than real queuing: Traffic Control does not use real queues for ingress traffic, but only classifies and applies actions. Figure 11-1. Scheduling a device: (a) for reception (RX); (b) for transmission (TX)![]() |