Intel® IXP400 Software

Access-Layer Components: Queue Manager (IxQMgr) API

To use livelock prevention, only one queue can be set as type periodic. One or more queues may be set as type sporadic using the ixQMgrCallbackTypeSet() function. By default, all the other queues that are not set to be in either a periodic or a sporadic mode are set in IX_QMGR_TYPE_REALTIME_OTHER mode. The IX_QMGR_TYPE_REALTIME_OTHER represents the default behavior of the callback function associated with respective queues when the livelock prevention feature is not in use. In a Livelock implimentation, these “other” queues will not have their interrupts disabled during the servicing of the periodic queue.

The ixQMgrCallbackTypeSet() function should be used to assign IX_QMGR_TYPE_REALTIME_PERIODIC to one queue and IX_QMGR_TYPE_REALTIME_SPORADIC to queue(s) by passing a Queue-ID along with the desired queue type.

Livelock prevention is disabled by default. In order to enable the livelock option the IX_FEATURECTRL_ORIGB0_DISPATCHER must be disabled using the ixFeatureCtrlSwConfigurationWrite() function before the ixQMgrInit() and ixQMgrDispatcherLoopGet() functions are called.

Queue assignments are located at ixp400_xscale_sw\src\include\IxQueueAssignments.h. If Ethernet QoS features are used, the Rx Priority queues are assigned in ixp400_xscale_sw\src\include\IxEthDBQoS.h. Queue type assignments may be checked with the ixQMgrCallbackTypeGet() function.

When ixQMgrDispatcherLoopRunB0LLP() reads the interrupt register and sees that a periodic queue is to be serviced, all queues that are set to be sporadic have their notification disabled. This prevents sporadic queues from generating interrupts, which may stall a task resulting from the periodic queue callback (periodic task). The ixQMgrPeriodicDone() function should be called after the periodic task is completed to ensure that sporadic queues are re-enabled.

Note: Because livelock prevention enables and disables notifications for queues set as sporadic, users should not enable and disable sporadic queues notifications other than at startup / shutdown.

Note: Livelock prevention operates on lower interrupt register queues only. (lower queue group 0-31).

Note: The Livelock dispatcher does not work on A-0 stepping versions of the IXP42X product line.

The following is an example sequence to show how livelock would be used is to set the HSS queue to periodic and the Eth Rx queue to sporadic using the ixQMgrCallbackTypeSet() function. When codec processing (the periodic task) as a result of a HSS callback is finished, the ixQMgrPeriodicDone() function is called and Eth Rx is then serviced. This will ensure that any codec processing that is done as a result of HSS notifications is not interrupted by a burst in Eth Rx.

Use ixFeatureCtrlSwConfigurationWrite() to disable

IX_FEATURECTRL_ORIGB0_DISPATCHER.

Initialize the Queue Manager by using ixQMgrInit( ).

Make a call to ixQMgrDispatcherLoopGet() to get the appropriate dispatcher function for livelock functionality.

Initialize access-layer components, register the callback functions.

Programmer’s Guide

IXP400 Software Version 2.0

April 2005

 

Document Number: 252539, Revision: 007

273

Page 273
Image 273
Intel IXP400 manual Document Number 252539, Revision 273