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

No matter what approach you take, your program must preserve mutual exclusion of critical data and maintain the ordering of packets. As you learned in Chapter 5, maintaining critical data sections ensures mutual exclusive access to them. As one thread is updating data in memory, software must prevent another thread from trying to modify that data at the same time. In Chapter 5, mutual exclusion was discussed in the context of a single microengine. In many applications, where several micro- engines are used in parallel, software mechanisms need to preserve mutual exclusivity across all the microengines performing similar tasks.
Maintaining packet order is another challenge that the software model needs to manage. The network processor receive packets from the network in a certain order, and they need to exit the processor in the same order. One example is ATM AAL5 reassembly. When an IXP2XXX network processor receives individual ATM AAL5 cells, software reassembles them into one larger frame. The process must ensure that each cell is reassembled in the frame in the order that it was received. Another example is IP header compression where a packet s header is compressed to minimize packet length, especially where the header is long and the payload is relatively small, like in VoIP. In this example, to un- compress a header, software uses the header of the previous packet to determine the current packet s header. Not all...