INtime SDK Help
INtime SDK v7.1 > About INtime > Networking and I/O > Multiprocess HPE > mhpeAllocateReceiveBufferSet

Allocate a receive buffer set
Attaches a set of receive buffers to the designated RX endpoint for use by the DMA engine to Ethernet frames. This call should be made only once at initialization time and number of receive buffers should not be changed during active reception of frames.
The receive buffer set must be allocated by mhpeAllocateReceiveBufferSet to make the application compatible across different Network Devices.
The buffer_count field of the HPERXBUFFERSET structure should be initialized to the number of elements in the set. Each element of the buffer set should be initialized so that the ptr and size fields of each HPEBUFFER element are initialized to point to each memory buffer to be used for receive frames. The other fields are for internal use.
The DMA engine will use the receive buffers cyclically. Before any receive buffer can be reused for a received frame a call to hpeGetReceiveBuffer must be made referring to that buffer.

HPESTATUS mhpeAllocateReceiveBufferSet(
    MHPEHANDLE      ephandle,
MHPERXBUFFERSET **rx_buffer_set,
uint32_t buffer_count,
uint32_t buffer_size


A handle for an RX endpoint.
If non-null, set the receive buffer belongs to.
Number of buffers in the buffer set.
Size of each buffer in the set.

Return Values

A HPESTATUS value indicating the success or failure of the operation.


The operation completed successfully.
The handle given is not a handle for an open HPE interface.
The rx_buffer_set parameter is not a valid pointer.
The rx_buffer_set.buffer_count field is zero, or too big for the size of the buffer allocated, or the field is not compatible with the requirements of the hardware.
The Ethernet receiver was active when the call was made and it was not possible to attach the buffer set.
One of:
The number of buffers to be attached exceeds the maximum number of receive descriptors at the device.
The number of receive descriptors can be set when the driver is loaded.
The interface was not able to accept the receive buffer because of hardware alignment constraints.


Versions Defined in Include Link to
INtime 7.1 intime/rt/include/mhpeif.h mhpeif.h mhpeif.lib
See Also