Interrupt Context Switching
Interrupt context switching is much faster than process switching. The increase in speed is largely due to the fact that the ip_input process is rarely called. Interrupt context switching instead interrupts the process currently running on the router to switch the packet. Interrupt context switching usually bypasses the RIB, and works with parallel tables, which are built more efficiently (the details of these tables differ according to the switching path in use). You also save a considerable amount of time because the processor no longer has to wait for a process to complete.
The general steps for interrupt context switching are shown in Figure 15-3.
Interrupt context switching is a broad description that encompasses various switching pathsâfast switching, optimum switching, and CEFâand includes the following steps:
The interface processor detects a packet and moves the packet into input/output memory.
The interface processor generates a receive interrupt. During this time, the central processor (CPU) determines the packet type (IP) and begins to switch the packet.
The processor searches the route cache for the following information and uses it to rewrite the packetâs MAC header:
Is the destination reachable?
What should the output interface be?
What is the next hop?
What should the MAC addresses be converted to?
The packet is copied to either the transmit queue or the output queue of the outbound interface. The receive interrupt is ended, and the originally ...
Get Network Warrior, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.