Intel IXP1200 Sequence Numbers sequence.uc, System Limit on Packet Buffers, Sequencehandle Usage

Page 41

IXP1200 Network Processor Family ATM OC-3/12/Ethernet IP Router Example Design

4.4.3System Limit on Packet Buffers

Several factors are involved in the number of packet buffers the system can support:

The Ethernet transmitter uses packetqs (packetq.uc), and the implementation of packetqs can address only 16,000 different buffers.

DRAM capacity used = 2KB/buffer * number of buffers. Therefore, for 16,000 buffers, 32MB of DRAM is consumed, which is half the memory capacity of most baseboards. (DRAM capacity used by packet buffers can be crunched by reducing the buffer size to just fit a 1500 byte MTU. (2KB is overkill for this, but a handy power of 2), as well as enhancing the design to also supporting small data buffers to hold small packets).

SRAM capacity used = 16B * number of buffers. Therefore, for 16,000 buffers only 256KB of SRAM is used, vs. an 8MB SRAM capacity.

4.5Sequence Numbers - sequence.uc

Intra-microengine register-based sequence numbers are supplied by sequence.uc, and are used extensively throughout the ATM portion of this design. This example employs a single- microengine fast port receiver and so unlike other designs, it has no use for the global hardware enqueue sequence number registers. ATM Receive has intersecting sequence numbers to de-couple RFIFO receive order, VC cache/table lookup, and msgq_send(). ATM Transmit has sequence numbers to decouple cell within a PDU order from TFIFO validate order. On the IXP1200 software CRC microengine, sequence numbers are used to maintain PDU order within a VC.

sequence.uc contains the following API calls:

API Call

Description

 

 

sequence_init(SEQUENCE_HANDLE)

Initialize global state for the sequence number.

 

 

sequence_enter(SEQUENCE_HANDLE)

Increment absolute enter sequence number, and return that

number in a relative GPR.

 

 

 

sequence_wait(SEQUENCE_HANDLE)

Wait until exit sequence number is equal to mine.

 

 

sequence_exit(SEQUENCE_HANDLE)

Increment exit sequence number and continue.

 

 

4.5.1SEQUENCE_HANDLE Usage

All sequence.uc calls use the same parameters. For convenience, a handle is typically defined and used for all of the calls, as shown in the example below.

Parameter

Description

 

 

in_my_seq

Relative GPR to hold sequence number for this thread.

 

 

in_enter

Absolute GPR to hold ENTER sequence for all threads.

 

 

in_enter_inc

A register containing the value 1, or the constant 1. Register gives highest

performance.

 

 

 

io_exit

Absolute GPR to hold the EXIT sequence for all threads.

 

 

in_exit_inc

A register containing the value 1, or the constant 1 Register gives highest

performance.

 

 

 

NUM_BITS

Number of bits in the sequence number. Must be a power of 2, from 1 to 32

inclusive. 32 is highest performance.

 

 

 

Application Note

41

Modified on: 3/20/02,

Image 41
Contents IXP1200 Network Processor Family Application Note Contents Virtual Circuit Lookup Table Cache Limitations Figures Scope of Example Design IntroductionPurpose of ATM Example Design Background Configuration DescriptionSupported / Not Implemented Functions Ethernet, IP and AAL5 Protocol ProcessingSAR Frame and PDU Length vs. IP Packet LengthFrame and PDU Length vs. IP Packet Length Expected Ethernet Transmit BandwidthSoftware Execution EnvironmentDeveloper’s Workbench ATM Data Stream Dialog Box Hardware System OverviewSystem Programming Model System Programming Model StrongARM Core SoftwareATM TX Software PartitioningLookup Tables VC Lookup Data FlowATM to Ethernet Data Flow ATM to Ethernet Processing Steps IP Lookup TableEthernet to ATM Data Flow StrongARM Core InitializationMicroengine Initialization Microengine Functional BlocksATM Receive Microengine StructureOC-12 Port OC-3 Ports High Level AlgorithmATM Transmit High Level Algorithm ATM Transmit MicroengineEthernet Receive Microengine IP-Router MicroengineEthernet Receive High Level Algorithm Ethernet Transmit MicroengineEthernet Receive Structure CRC-32 Hardware Checking on Receive CRC-32 Calculations using IXP1240/1250 HardwareEthernet Transmit Structure First Cell of a PDU in Rfifo and in Dram Bytes Big Endian DiagramTransmit Alignment CRC-32 Hardware Generation on TransmitFunctional Differences between Checker and Generator CRC-32 Checker and Generator Microengines Soft-CRCVirtual Circuit Lookup Table atmvctable.uc Software Subsystems & Data StructuresCRC-32 Checker and Generator High Level Algorithm CRC-32 ComputationVctablehashed Structure Primary VC Table Vctablelinear StructureVC Table Entry VC Table Management API atmutils.cCell data11 Entry Description Entry DescriptionBuffer Offset Buffer Index 1.2 OC-3 Configuration VC Cache Function 1.1 OC-12 ConfigurationVirtual Circuit Lookup Table Cache VC Cache StructureVC Cache API IP Lookup TableIP Table Function IP Table StructureRoutetableinit IP Table Management APIMtuchange AtmrouteaddRtentinfo EnetrouteaddRoutedelete Rthelp2 3 4 5 6 7 8 Sram Buffer Descriptors and Dram Data BuffersATM Header Entry Description Sram Buffer Descriptor FormatNext BD Last Quad Queue Index 2 3 4 5 6 7 8 Bytes Dram Data Buffer Format2 3 4 Enet SrcAdrSystem Limit on Packet Buffers Sequence Numbers sequence.ucSequencehandle Usage API Call DescriptionUsage Model Message Queues msgq.ucExample Step Sequence Operation Bakery Line AnalogyMsgqinitqueue Msgqhandle ParametersMsgqinitregs MsgqsendRamoption MsgqreceiveFeature Description 1.1 FeaturesBuffer Descriptor Queues bdq.uc BDQ Management MacrosCount CountersUse of the Counter Subsystem Global ParametersCounter Base Address Counter IndexCounter Flags Global Counter Enable and Flags#define Statement Description Counter Group DescriptionPortcounterinc Counters.uc CounterresetCounterinc Intotaldiscards Portcounterinc AlgorithmCountersprint Counters.c CountersinitAtmtxcrcbadbd Global $transfer Register Name Manager xfer.ucMutexvectorinit Mutex VectorsMutexvectorenter MutexvectorexitProjectconfig.h Project Configuration / Modifying the Example DesignInter-Thread Signalling Switching Between Hardware Configurations Testing EnvironmentsSystemconfig.h Extending the Example Design Simulation Support Scripts, etcLimitations Acronyms & Definitions Document ConventionsByte 10 11 12 13 14 15 16 ... BytesTitle Description Related Documents