IXP1200 Network Processor Family ATM OC-3/12/Ethernet IP Router Example Design
Application Note 23
Modified on: 3/20/02,
3.3 IP-Router Microengine
The IP Router microengine consumes packets from the ATM receive microengine via a message
queue, and routes them to the appropriate Ethernet transmit packetq. In the IXP1200 software-CRC
configuration, this function is carried out by two threads residing on the A TM Receive micr oengine
rather than on a dedicated IP router microengine.

3.3.1 Structure

All threads are identical. In hardware-CRC configurations, four IP Router threads reside on the
dedicated IP-router microengine. In the software-CRC configuration, two IP Router threads reside
on the ATM Receive microengine.

3.3.2 High Level Algorithm

3.4 Ethernet Receive Microengine
The Ethernet Receive microengine is based on rx_ether100m.uc, an extended version of the
Ethernet receive threads from the Software Development Kits (SDK's) 16-port Ethernet example
design1. While the code looks quite different from that on the SDK, most of the changes required a
simple move to a more efficient structure, without changing the logical function of the
microengine. For example, the threads take advantage of updated APIs for the RFC1812 macros to
lower the overhead of RFC1812 support.
Semantically, there are only a few differences from the SDK Ethernet design.
IP lookup can return an ATM destination port, or an Ethernet destination port.
For ATM destinations, prepend the LLC/SNAP to the payload.
For ATM destinations, append the AAL5 trailer.
Figure 14. IP Router High Level Algorithm
while(1)
msgq_receive() packet from ATM RX engine
ip_filter() out SNMP, IGMP
ip_addr_validation() to discard packets from reserved addresses
ip_dbcast_check() to filter out packets from directed broadcast addresses
ip_proc()
ip_verify() check TTL and checksum
ip_modify() update TTL
ip_route_lookup()
port_enabled_check() to discard packets from disabled port
update Ethernet MAC Source Address with our own
#ifdef ATM_LOOPBACK //Allow hardware configurations with ATM outputs
//connected directly to ATM inputs
if(output port == ATM port)
over-ride ATM destination port with round-robin Ethernet port
#endif
packetq_send() packet to destination Ethernet port
1. The SDK (Softwa re Development Kit) 2.01 CD contains a number of earlier IXP1200 Ethernet example de sign s that have remained
relatively unchanged from previous releases of the SDK. The Eth ernet receive and transmit code in this example design reuses that code w ith
few modifications