The Big Picture
Figure 16-11 shows the key routines that the bridging code uses to process ingress and egress frames (both data frames and BPDUs).

Figure 16-11. The big picture
In particular, note that:
There are as many hooks as there are at the IP layer (see Figure 18-1 in Chapter 18). One more hook in
br_handle_frame(NF_BR_BROUTING), not shown in the figure, is used by ebtables and is described in the section "Data Frames Versus BPDUs."Ingress data frames may go through
netif_receive_skbtwice.netif_receive_skbis described in Chapter 10. See also the section "Processing Data Frames," later in this chapter.Ingress frames are passed by
netif_receive_skbto the bridging subsystem when a call tohandle_bridgeindicates it is necessary, or to the upper-layer protocol handlers otherwise (as described in Chapter 13).Ingress frames may be dropped by the bridging code, for example, because the port is disabled.
Ingress data frames are dropped by
br_forwardwhen the receiving port has been blocked by the STP. Egress frames do not need to be transmitted out of any port bybr_deliverwhen the destination address is local to the host. In both cases, unneeded transmissions are filtered byshould_deliver.Egress data frames go through
dev_queue_xmittwice.dev_queue_xmitis described in Chapter 11. See also the section "Transmitting on a Bridge Device" later in this chapter.The
br_floodfunction ...
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