Intel® IXP400 Software

Buffer Management

Table 1. Internal IX_MBUF Field Format (Sheet 2 of 2)

20

24

28

0

1

2

3

 

 

 

 

ix_rsvd

ix_pktlen

ix_priv(Reserved)

A 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.

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

32-bit pointer to the next buffer in a

 

Parameter type: IX_MBUF *

Yes, where buffer chaining is

chain (linked list) of buffers. NULL

Return type: IX_MBUF *

supported.

entry marks end of chain.

Description: Returns a 32-bit pointer to the

 

 

 

next buffer in the packet

 

 

 

 

 

IX_OSAL_MBUF_NEXT_PKT_IN_CHAIN_

 

 

PTR

32-bit pointer to the next packet in a

 

Parameter type: IX_MBUF *

 

chain (linked list) of packets. NULL

No. Packet chaining is not supported

Return type: IX_MBUF *

entry marks end of chain. Each

by IXP400 Software.

Description: Returns a 32-bit pointer to the

packet in the chain may consist of a

 

chain of buffers.

 

first buffer in the next packet in the packet

 

 

 

chain

 

 

 

 

 

IX_OSAL_MBUF_MDATA

32-bit pointer to the data section of a

 

Parameter type: IX_MBUF *

Yes. But does not get modified by the

buffer. The data section typically

Return type: char *

contains the payload of a network

access-layer

Description: Returns a pointer to the first

buffer.

 

byte of the buffer data

 

 

 

 

 

IX_OSAL_MBUF_MLEN

 

 

Parameter type: IX_MBUF *

Lengths (octets) of valid data in the

Yes.

Return type: int

data section of the buffer.

Description: Returns the number of octets of

 

 

 

valid data in the data section of the buffer

 

 

 

 

 

IX_OSAL_MBUF_TYPE

 

 

Parameter type: IX_MBUF *

Buffer type

Yes, by some components.

Return type: unsigned char

Description: Returns the type field of the

 

 

buffer

 

 

 

 

 

Programmer’s Guide

IXP400 Software Version 2.0

April 2005

 

Document Number: 252539, Revision: 007

45

Page 45
Image 45
Intel IXP400 manual Internal Ixmbuf Field Format Sheet 2, Ixmbuf Field Details Sheet 1