Intel Internet Exchange Architecture and Applications: A Practical Guide to IXP2XXX Network Processors

The Pool of Threads (POTs) model is a more intuitive programming model that programmers of traditional processors may find more familiar. It implements what is commonly termed the run-to-completion model. Figure 7.6 illustrates the general concept.
With POTs, one program does most of the packet processing, from the time the packet is received to the time it is enqueued. After a packet is received, the packet finds an available thread from a free thread pool and assigns the packet to that thread. That thread can perform any number of software tasks on/for the packet, such as MPLS label insertion, IPv4/IPv6 forwarding, and NATing. This program relies on lower level blocks for packet reception, buffer management, queue management, and packet transmit, among other things. While shown as merely a driver in this diagram, the traffic scheduling tasks are usually very sophisticated algorithms. Designers usually implement their own for their unique applications. These lower layer blocks are analogous to OS services and drivers in more traditional systems.
POTs is implemented as shown in Figure 7.7. In this diagram, memory is used in the typical fashion, with DRAM storing the packet buffers, statistics database, forwarding info, and the like. SRAM is used to store queue descriptors, state metadata, freelists, Longest Prefix Match (LPM) tables, and similar information. When a packet is first received, it is...