Figure 18-1 shows where traffic control is arranged in the Linux kernel. Traffic control in the incoming direction is handled by the functions from the file net/sch/sch_ingress.c before incoming packets are passed to higher protocol layers or forwarded over other network cards within the kernel.
Figure 18-1. Traffic control in the Linux kernel.
The largest part of traffic control in Linux occurs in outgoing direction. Here, we can use and interlink different elements for policing and traffic shaping.