Intel® IXP400 Software

Access-Layer Components: Queue Manager (IxQMgr) API

may be called from a client polling mechanism, which calls the dispatcher to read the queues status at regular intervals. In the first example, the dispatcher is called in the context of an interrupt and the dispatcher gets invoked when the queue status change.

A parameter passed to the ixQMgrDispatcherLoopRun() function determines whether the lower set of 32 queues, queues 0-31 or the upper set of 32 queues, queue 32-63 are serviced by the dispatcher each time ixQMgrDispatcherLoopRun() is called. The order in which queues are serviced depends on the priority specified by calling ixQMgrQDispatchPrioritySet().

Note: Application software does not need to access the queues directly. The underlying access-layer component software (for example, EthAcc, HssAcc, etc.) handles this. However, the application software does need to initialize the queue manager software using ixQmgrInit and set up the dispatcher operation.

18.9Dispatcher Modes

The Codelet/Customer code must first initialize the IxQMgr by making a call to ixQMgrInit(), which takes no parameters and returns success or failure. No other IxQMgr functions may be called by other access-layer components before this. After initialization, the queues must be configured before they can be used.

Note: The ixQMgrInit() function should only be called once for a system. Once the IxQMgr has been started all other access-layer components can register to use the services it provides without calling ixQMgrInit().

The access-layer provides the following services for the application by performing the following functions:

Perform Queue configuration

Set the watermark levels

Reads and writes entries to and from AQM

Provides register-notification callbacks for a queue

Set the priority of a dispatcher callback

Once the IxQMgr is initialized, the access component configures the queues. Queue configuration is done by setting up the attributes for respective queues. These attributes are typically set in the access components by using ixQMgrQConfig( ) and ixQMgrWatermarkSet( ) functions. Depending upon whether the queue is half full, nearly full, etc., the watermark level triggers the change of the status flag for a particular queue. The queue configuration and setting of the watermark levels and queue priority should be performed prior to enabling of the queue notification status flag. Once the queues are configured, the notification callback needs to be set or else it will go to a dummy callback. The Queue dispatcher loop can be started at any time following a ixQMgrInit(). However, the dispatcher function will service the callback only once the queue notification is enabled.

The IxQMgr governs the flow of traffic in Intel® IXP400 Software. Depending upon the OS, the application, and the performance required, there are three different ways the dispatcher can be called: Busy loop, event-, or timer-based interrupt. The dispatcher can be called either in context of an interrupt or through a busy loop (which might run as a low-priority task). In case of an interrupt- driven mechanism, the interrupt can be triggered either by a timer or upon generation of QM hardware interrupts (which are event-driven). There is no single way to determine the best

Programmer’s Guide

IXP400 Software Version 2.0

April 2005

 

Document Number: 252539, Revision: 007

269

Page 269
Image 269
Intel IXP400 manual Dispatcher Modes