CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
|
This file contains definitions and functions for the EFA Rx adapter. More...
#include "adapter_efa.h"
#include "endpoint_manager.h"
#include "internal_log.h"
#include "internal_tx.h"
#include "private.h"
#include "cdi_os_api.h"
Functions | |
static bool | PostRxBuffer (EfaEndpointState *endpoint_state_ptr, const struct iovec *msg_iov_ptr, bool more_to_post) |
static bool | Poll (EfaEndpointState *efa_endpoint_ptr) |
static bool | CreatePacketPool (EfaEndpointState *endpoint_state_ptr, int packet_size, int packet_count) |
static void | FreePacketPool (EfaEndpointState *endpoint_state_ptr) |
CdiReturnStatus | EfaRxEndpointOpen (EfaEndpointState *endpoint_state_ptr) |
CdiReturnStatus | EfaRxEndpointPoll (EfaEndpointState *endpoint_state_ptr) |
CdiReturnStatus | EfaRxEndpointReset (EfaEndpointState *endpoint_state_ptr) |
CdiReturnStatus | EfaRxEndpointClose (EfaEndpointState *endpoint_state_ptr) |
CdiReturnStatus | EfaRxEndpointRxBuffersFree (const AdapterEndpointHandle handle, const CdiSgList *sgl_ptr) |
CdiReturnStatus | EfaRxPacketPoolCreate (EfaEndpointState *endpoint_state_ptr) |
void | EfaRxPacketPoolFree (EfaEndpointState *endpoint_state_ptr) |
Variables | |
static const int | packet_buffer_alignment = 8 |
Align each receive buffer to start at an address evenly divisible by 8. | |
This file contains definitions and functions for the EFA Rx adapter.
|
static |
Allocates a hunk of memory, registers it with libfabric, and posts packet sized portions of the allocation as receive buffers.
endpoint_state_ptr | Pointer to endpoint. |
packet_size | The size of each packet. |
packet_count | How many packets to allocate. |
CdiReturnStatus EfaRxEndpointClose | ( | EfaEndpointState * | endpoint_ptr | ) |
CdiReturnStatus EfaRxEndpointOpen | ( | EfaEndpointState * | endpoint_ptr | ) |
CdiReturnStatus EfaRxEndpointPoll | ( | EfaEndpointState * | endpoint_ptr | ) |
CdiReturnStatus EfaRxEndpointReset | ( | EfaEndpointState * | endpoint_ptr | ) |
CdiReturnStatus EfaRxEndpointRxBuffersFree | ( | const AdapterEndpointHandle | handle, |
const CdiSgList * | sgl_ptr ) |
CdiReturnStatus EfaRxPacketPoolCreate | ( | EfaEndpointState * | endpoint_state_ptr | ) |
Create pool of Rx packet buffers for the endpoint.
endpoint_state_ptr | Pointer to endpoint. |
void EfaRxPacketPoolFree | ( | EfaEndpointState * | endpoint_ptr | ) |
Frees the previously allocated receive packet buffer pool for the endpoint.
endpoint_ptr | Pointer to EFA endpoint state data. |
|
static |
Frees the previously allocated receive packet buffer pool for the endpoint.
endpoint_state_ptr | Pointer to the endpoint whose receive packet buffer pool is to be freed. |
|
static |
Used to poll for any pending Rx completion events and process them.
efa_endpoint_ptr | Pointer to EFA endpoint state data. |
|
static |
Posts a Rx data buffer to the receive queue of the corresponding endpoint. Posted receives are searched in the order in which they were posted in order to match sends. Message boundaries are maintained. The order in which the receives complete is dependent on the endpoint type and protocol.
endpoint_state_ptr | Pointer to endpoint state data. |
msg_iov_ptr | An iovec structure with the address and size of the packet buffer to give to libfabric for use as a receive packet buffer. |
more_to_post | Set this to true if this function will be immediately called again to post another packet buffer. This allows libfabric to process packet buffers in an optimized fashion. |