Intel IXP400 Frozen Dessert Maker User Manual


 
Intel
®
IXP400 Software
Access-Layer Components: Ethernet Access (IxEthAcc) API
April 2005 IXP400 Software Version 2.0 Programmer’s Guide
138 Document Number: 252539, Revision: 007
9.5.3.1 Receive Flow
1. Proper NPE images must be downloaded to the NPEs and initialized.
2. The receiving port must be initialized.
3. Register a callback function for the port. This function will be called each time a frame is
received.
4. Preload free receive buffers for use by IxEthAcc.
5. After configuring the receiving port and pre-loading buffers, the receiving port is enabled,
allowing traffic to be received.
6. An Ethernet frame is received on the wire and placed in the IxQMgr Rx queue.
7. The callback function is called for each frame, being passed a pointer to that
IX_OSAL_MBUF. The callback function can now process and/or de-multiplex the incoming
frame(s).
8. The upper-level user or OS processes must recover the receive buffers once processing of the
frame is completed, and replenish the RxFree queue using IxEthAccPortRxFreeReplenish() as
needed.
Note: The process for multi-buffer receive callback is similar to what is described above, with the
exception that the multi-buffer callback should not be invoked for every frame. A polling dispatch
mechanism should be used.
Figure 51. Ethernet Receive Frame API Overview
1. IxNpeDlNpeInitAndStart (ImageID)
2. IxEthAccPortInit (portId)
3. IxEthAccPortRxDoneCallbackRegister
(portID, callbackfn, callbacktag)
4. IxEthAccPortRxFreeReplenish
(portID, ixp_buf *)
5. IxEthAccPortEnable (portId)
ixp_buf made available to Rx frame
IxEthAcc
Receive
8. free ixp_buf
7. (* IxEthAccPortRxCallback)
(callbacktag, ixp_buf *, portID)
Ethernet frame received
6.
Rx
Data Client
B2365-02