Intel® IXP400 Software
Buffer Management
Programmer’s Guide IXP400 Software Version 2.0 April 2005
Document Number: 252539, Revision: 007 45A set of macros are provided for the IXP400 software to access each of the fields in the buffer structure. Each macro takes a single parameter – a pointer to the buffer itself. Each macro returns the value stored in the field. More detail on the field, their usage, and the macros are detailed in the table below.Note: The data pointer IX_OSAL_MBUF_MDATA could be aligned on a 16 bit boundary to help align an IP header on a 32 bit boundary.
20 ix_rsvd
24 ix_pktlen
28 ix_priv(Reserved)
Table 1. Internal IX_MBUF Field Format (Sheet 2 of 2)
0123
Table 2. IX_MBUF Field Details (Sheet 1 of 2)
Field / MACRO Purpose Used by Access-Layer?
IX_OSAL_MBUF_NEXT_BUFFER_IN_PK
T_PTR
Parameter type: IX_MBUF *
Return type: IX_MBUF *
Description: Returns a 32-bit pointer to the
next buffer in the packet
32-bit pointer to the next buffer in a
chain (linked list) of buffers. NULL
entry marks end of chain.
Yes, where buffer chaining is
supported.
IX_OSAL_MBUF_NEXT_PKT_IN_CHAIN_
PTR
Parameter type: IX_MBUF *
Return type: IX_MBUF *
Description: Returns a 32-bit pointer to the
first buffer in the next packet in the packet
chain
32-bit pointer to the next packet in a
chain (linked list) of packets. NULL
entry marks end of chain. Each
packet in the chain may consist of a
chain of buffers.
No. Packet chaining is not supported
by IXP400 Software.
IX_OSAL_MBUF_MDATA
Parameter type: IX_MBUF *
Return type: char *
Description: Returns a pointer to the first
byte of the buffer data
32-bit pointer to the data section of a
buffer. The data section typically
contains the payload of a network
buffer.
Yes. But does not get modified by the
access-layer
IX_OSAL_MBUF_MLEN
Parameter type: IX_MBUF *
Return type: int
Description: Returns the number of octets of
valid data in the data section of the buffer
Lengths (octets) of valid data in the
data section of the buffer. Yes.
IX_OSAL_MBUF_TYPE
Parameter type: IX_MBUF *
Return type: unsigned char
Description: Returns the type field of the
buffer
Buffer type Yes, by some components.