CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
adapter_efa_probe_control.h File Reference

The declarations in this header file correspond to the definitions in adapter_efa_probe_control.c. More...

#include "adapter_api.h"
#include "private.h"

Go to the source code of this file.

Functions

bool ProbeControlEfaConnectionStart (ProbeEndpointState *probe_ptr)
 
void ProbeControlEfaConnectionQueueReset (ProbeEndpointState *probe_ptr, const char *error_msg_str)
 
void ProbeControlEfaConnectionEnableApplication (ProbeEndpointState *probe_ptr)
 
void ProbeControlQueueStateChange (ProbeEndpointState *probe_ptr, ProbeState probe_state)
 
ProbePacketWorkRequestProbeControlWorkRequestGet (CdiPoolHandle work_request_pool_handle)
 
void ProbeControlWorkRequestPacketSizeSet (ProbePacketWorkRequest *work_request_ptr, int packet_size)
 
CdiReturnStatus ProbeControlSendCommand (ProbeEndpointState *probe_ptr, ProbeCommand command, bool requires_ack)
 
CdiReturnStatus ProbeControlSendAck (ProbeEndpointState *probe_ptr, ProbeCommand ack_command, uint16_t ack_probe_packet_num)
 
void ProbeControlMessageFromBidirectionalEndpoint (void *param_ptr, Packet *packet_ptr, EndpointMessageType message_type)
 
CDI_THREAD ProbeControlThread (void *ptr)
 

Detailed Description

The declarations in this header file correspond to the definitions in adapter_efa_probe_control.c.

Function Documentation

◆ ProbeControlEfaConnectionEnableApplication()

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().

Parameters
probe_ptrPointer to probe endpoint state data.

◆ ProbeControlEfaConnectionQueueReset()

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().

Parameters
probe_ptrPointer to probe endpoint state data.
error_msg_strPointer to optional error message string. Use NULL if no message.

◆ ProbeControlEfaConnectionStart()

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().

Parameters
probe_ptrPointer to probe endpoint state data.
Returns
bool True if successful, otherwise false is returned.

◆ ProbeControlMessageFromBidirectionalEndpoint()

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().

Parameters
param_ptrPointer to user parameter.
packet_ptrPointer to packet containing the control message.
message_typeEndpoint message type.

◆ ProbeControlQueueStateChange()

void ProbeControlQueueStateChange ( ProbeEndpointState * probe_ptr,
ProbeState probe_state )

Post a state change control command to FIFO used by ProbeControlThread().

Parameters
probe_ptrPointer to probe endpoint state data.
probe_stateProbe state to use.

◆ ProbeControlSendAck()

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.

Parameters
probe_ptrPointer to probe endpoint state data.
ack_commandCommand to send ACK for.
ack_probe_packet_numPacket number that was received in the command being ACKed.
Returns
kCdiStatusOk if successful, otherwise a value that indicates the nature of the failure is returned.

◆ ProbeControlSendCommand()

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.

Parameters
probe_ptrPointer to probe endpoint state data.
commandCommand to send.
requires_ackTrue if the command requires an ACK in response, otherwise false.
Returns
kCdiStatusOk if successful, otherwise a value that indicates the nature of the failure is returned.

◆ ProbeControlThread()

CDI_THREAD ProbeControlThread ( void * ptr)

Thread used to run the probe.

Parameters
ptrPointer to probe endpoint state data (ProbeEndpointState*).
Returns
The return code is not used.

◆ ProbeControlWorkRequestGet()

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.

Parameters
work_request_pool_handleHandle of work request memory pool.
Returns
Pointer to work request. NULL is returned if the function failed.

◆ ProbeControlWorkRequestPacketSizeSet()

void ProbeControlWorkRequestPacketSizeSet ( ProbePacketWorkRequest * work_request_ptr,
int packet_size )

Set packet size of a work request.

Parameters
work_request_ptrPointer to work request.
packet_sizeSize of packet in bytes.