Intel® IXP400 Software

Access-Layer Components: HSS-Access (IxHssAcc) API

An IXP_BUF pool should be created for packetized service by calling function

IX_OSAL_MBUF_POOL_INIT() of the IxOsBuffMgt API with the IXP_BUF size and number of IXP_BUF needed. For example:

IxHssAccCodeletMbufPool **poolIdPtr;

UINT32 numPoolMbufs;

UINT32 poolMbufSize;

*poolIdPtr = IX_OSAL_MBUF_POOL_INIT(numPoolMbufs, poolMbufSize, "HssAcc Codelet Pool");

AIXP_BUF can be obtained from the pool by calling IX_OSAL_MBUF_POOL_GET(). This Buffer pool is shared by the Tx and Rx processes.

For Rx, before the packetized service is enabled, the Rx buffer queue in IxHssAcc has to be replenished. This can be done by calling ixHssAccPktPortRxFreeReplenish().

When packetized service starts, it is the client’s responsibility to ensure there is always an adequate supply of IXP_BUFs for the receive direction. This can be achieved in two ways. A call-back function can be registered with IxHssAcc to be called back when the free IXP_BUFs queue is running low. This call back function is registered with the IxHssAcc packetized service when ixHssAccPktPortConnect() is called. Alternatively, the client can use its own timer to regularly supply buffers to the queue.

The client also provides a receive call-back function to accept packets received through the HSS. After the data in the IXP_BUF is processed, IX_OSAL_MBUF_POOL_PUT_CHAIN() can be called to put the Rx buffer back into the IXP_BUF pool. The Rx packetized data flow is shown in Figure 67 on page 213.

April 2005

IXP400 Software Version 2.0

Programmer’s Guide

212

Document Number: 252539, Revision: 007

 

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