|
CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
|
This file contains internal definitions and implementation used within the SDK to support functionality that is not part of the API. More...
#include "adapter_efa.h"#include "adapter_efa_probe_control.h"#include "adapter_api.h"#include "adapter_efa_probe_rx.h"#include "adapter_efa_probe_tx.h"#include "cdi_os_api.h"#include "endpoint_manager.h"#include "internal_utility.h"#include "protocol.h"This file contains internal definitions and implementation used within the SDK to support functionality that is not part of the API.
|
static |
Initialize the command packet header of a control interface packet.
| probe_ptr | Pointer to probe endpoint state data. |
| command | Probe command to use. |
| decoded_hdr_ptr | Pointer to decoded header data. On entry, the union data must already be set. |
| work_request_ptr | Pointer to work request state data. |
| void ProbeControlEfaConnectionEnableApplication | ( | ProbeEndpointState * | probe_ptr | ) |
Call this when EFA probe has successfully completed. It will enable the application connection.
NOTE: This function is called from PollThread().
| probe_ptr | Pointer to probe endpoint state data. |
| void ProbeControlEfaConnectionQueueReset | ( | ProbeEndpointState * | probe_ptr, |
| const char * | error_msg_str ) |
Queue a reset of the EFA connection to the endpoint manager. Also, notify the application that the connection state has changed.
NOTE: This function is called from ProbeControlThread().
| probe_ptr | Pointer to probe endpoint state data. |
| error_msg_str | Pointer to optional error message string. Use NULL if no message. |
| bool ProbeControlEfaConnectionStart | ( | ProbeEndpointState * | probe_ptr | ) |
Start the EFA connection for use for probing.
NOTE: For a Tx connection, the remote GID must be valid before calling this function. See remote_ipv6_gid_array in EfaTxEndpointStart().
NOTE: We don't want to update the application's connection state until after the EFA probe has completed. EFA probe must use this function to start the probe.
NOTE: This function is called from ProbeControlThread().
| probe_ptr | Pointer to probe endpoint state data. |
| void ProbeControlMessageFromBidirectionalEndpoint | ( | void * | param_ptr, |
| Packet * | packet_ptr, | ||
| EndpointMessageType | message_type ) |
Process a control packet message from a probe control interface bidirectional endpoint.
NOTE: This function is called from PollThread().
| param_ptr | Pointer to user parameter. |
| packet_ptr | Pointer to packet containing the control message. |
| message_type | Endpoint message type. |
| void ProbeControlQueueStateChange | ( | ProbeEndpointState * | probe_ptr, |
| ProbeState | probe_state ) |
Post a state change control command to FIFO used by ProbeControlThread().
| probe_ptr | Pointer to probe endpoint state data. |
| probe_state | Probe state to use. |
| CdiReturnStatus ProbeControlSendAck | ( | ProbeEndpointState * | probe_ptr, |
| ProbeCommand | ack_command, | ||
| uint16_t | ack_probe_packet_num ) |
Send an ACK to an endpoint using the adapter control interface.
| probe_ptr | Pointer to probe endpoint state data. |
| ack_command | Command to send ACK for. |
| ack_probe_packet_num | Packet number that was received in the command being ACKed. |
| CdiReturnStatus ProbeControlSendCommand | ( | ProbeEndpointState * | probe_ptr, |
| ProbeCommand | command, | ||
| bool | requires_ack ) |
Send a command using the control interface to an endpoint associated with the probe connection.
| probe_ptr | Pointer to probe endpoint state data. |
| command | Command to send. |
| requires_ack | True if the command requires an ACK in response, otherwise false. |
| CDI_THREAD ProbeControlThread | ( | void * | ptr | ) |
Thread used to run the probe.
| ptr | Pointer to probe endpoint state data (ProbeEndpointState*). |
| ProbePacketWorkRequest * ProbeControlWorkRequestGet | ( | CdiPoolHandle | work_request_pool_handle | ) |
Get a control interface work request from the work request memory pool. The work request is used to send a command to an endpoint using the control interface.
| work_request_pool_handle | Handle of work request memory pool. |
| void ProbeControlWorkRequestPacketSizeSet | ( | ProbePacketWorkRequest * | work_request_ptr, |
| int | packet_size ) |
Set packet size of a work request.
| work_request_ptr | Pointer to work request. |
| packet_size | Size of packet in bytes. |
|
static |
Process a received control packet.
NOTE: This function is called from ProbeControlThread().
| probe_ptr | Pointer to probe endpoint state data. |
| control_command_ptr | Pointer to control packet to process. |
| wait_timeout_ms_ptr | Pointer to current wait timeout. This function may alter the contents of the value depending on the command contained within the control packet. |