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.h File Reference

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

#include "adapter_api.h"
#include "adapter_control_interface.h"
#include "private.h"
#include "protocol.h"

Go to the source code of this file.

Data Structures

struct  TxEndpointProbeState
 This defines a structure that contains all of the state information for the sending side of a single flow. More...
 
struct  RxEndpointProbeState
 This defines a structure that contains all of the state information for the receiving side of a single flow. More...
 
struct  ProbeEndpointState
 This defines a structure that contains all of the state information for the sending side of a single flow. Its contents are opaque to the calling program. More...
 
struct  ProbePacketWorkRequest
 Structure used to hold a transmit packet work request. The lifespan of a work request starts when a packet is queued to be sent and ends when a message is received that is has either been successfully sent or a failure has occurred. More...
 
struct  ControlCommand
 Structure used to hold a control command. More...
 

Typedefs

typedef struct ProbeEndpointState ProbeEndpointState
 Type used as the handle (pointer to an opaque structure) for a probe connection. Each handle represents a instance of a probe connection.
 
typedef ProbeEndpointStateProbeEndpointHandle
 Forward declaration to create pointer to probe connection state when used.
 

Enumerations

enum  ProbeState {
  kProbeStateIdle , kProbeStateSendReset , kProbeStateSendProtocolVersion , kProbeStateResetting ,
  kProbeStateResetDone , kProbeStateWaitForStart , kProbeStateEfaStart , kProbeStateEfaProbe ,
  kProbeStateEfaTxProbeAcks , kProbeStateEfaConnected , kProbeStateEfaConnectedPing , kProbeStateEfaReset ,
  kProbeStateDestroy
}
 This enumeration is used in the TxEndpointProbeState and RxEndpointProbeState structures to indicate the current probe state for an application connection. NOTE: Any changes made here MUST also be made to "probe_mode_key_array". More...
 
enum  ControlCommandType { kCommandTypeStateChange , kCommandTypeRxPacket }
 This enumeration is used to define the type of command specified in the ControlCommand structure. More...
 

Functions

CdiReturnStatus ProbeEndpointCreate (AdapterEndpointHandle app_adapter_endpoint_handle, CdiLogHandle log_handle, ProbeEndpointHandle *ret_handle_ptr)
 
CdiReturnStatus ProbeEndpointError (ProbeEndpointHandle handle)
 
void ProbeEndpointReset (ProbeEndpointHandle handle)
 
CdiReturnStatus ProbeEndpointResetDone (ProbeEndpointHandle handle)
 
CdiReturnStatus ProbeEndpointStart (ProbeEndpointHandle handle)
 
void ProbeEndpointStop (ProbeEndpointHandle handle)
 
void ProbeEndpointDestroy (ProbeEndpointHandle handle)
 

Detailed Description

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

Typedef Documentation

◆ ProbeEndpointState

typedef struct ProbeEndpointState ProbeEndpointState

Type used as the handle (pointer to an opaque structure) for a probe connection. Each handle represents a instance of a probe connection.

Forward declaration of structure to create pointers.

Enumeration Type Documentation

◆ ControlCommandType

This enumeration is used to define the type of command specified in the ControlCommand structure.

Enumerator
kCommandTypeStateChange 

Command contains a value from the ProbeState enumeration.

kCommandTypeRxPacket 

Command contains a packet SGL that was received using the control interface.

◆ ProbeState

enum ProbeState

This enumeration is used in the TxEndpointProbeState and RxEndpointProbeState structures to indicate the current probe state for an application connection. NOTE: Any changes made here MUST also be made to "probe_mode_key_array".

Enumerator
kProbeStateIdle 

Probe just started. Advance to kProbeStateSendReset.

kProbeStateSendReset 

Use the control interface to send the kProbeCommandReset command to reset the remote connection. Must receive an ACK from the remote to confirm that it received the command.

kProbeStateSendProtocolVersion 

After ACK from reset has been received by Tx, send protocol version to Rx.

kProbeStateResetting 

After the kProbeCommandReset command has been received, a request to reset the connection is sent to the Endpoint Manager. When the reset completes, probe state will advance to kProbeStateResetDone.

kProbeStateResetDone 

The Endpoint Manager has finished resetting the connection. When the control interface has confirmed that the remote endpoint is connected, probe state will advance to kProbeStateWaitForStart.

kProbeStateWaitForStart 

The Endpont Manager has been sent a request to start the endpoint. When it completes, probe state is set to kProbeStateEfaStart.

kProbeStateEfaStart 

Received notification from the Endpoint Manager that it is ok to start EFA connection. Probe state will advance to kProbeStateEfaProbe.

kProbeStateEfaProbe 

Use the EFA interface to send enough probe packets to the remote so SRD can establish the initial network flows. When EFA probe completes, probe state will advance to kProbeStateEfaConnected.

kProbeStateEfaTxProbeAcks 

The EFA Rx has received all the probe packets and now the TX is waiting to receive all the probe packet ACKs.

kProbeStateEfaConnected 

The EFA connection is ready for use by the application. We will send an occasional "ping" using to the remote Rx (server) connection using the control interface to ensure the Rx's connection has not been reset and to ensure the control interface is working.

kProbeStateEfaConnectedPing 

The EFA connection is ready and the transmitter has sent a ping. The transmitter is now waiting for an ACK in response. If the ACK is received within the expected timeout period, probe state will return to kProbeStateEfaConnected, otherwise it is changed to kProbeStateSendReset.

kProbeStateEfaReset 

Send a request to reset the connection to the Endpoint Manager and advance to the kProbeStateSendReset state.

kProbeStateDestroy 

Endpoint is being destroyed.

Function Documentation

◆ ProbeEndpointCreate()

CdiReturnStatus ProbeEndpointCreate ( AdapterEndpointHandle app_adapter_endpoint_handle,
CdiLogHandle log_handle,
ProbeEndpointHandle * ret_handle_ptr )

Create an instance of a new probe for the specifiec endpoint.

Parameters
app_adapter_endpoint_handleApplication adapter endpoint handle.
log_handleHandle of log related to the specified endpoint.
ret_handle_ptrPointer to returned probe endpoint handle.
Returns
CdiReturnStatus kCdiStatusOk if the operation was successful or a value that indicates the nature of the failure.

◆ ProbeEndpointDestroy()

void ProbeEndpointDestroy ( ProbeEndpointHandle handle)

Destroy a probe endpoint.

Parameters
handleHandle of the probe endpoint to destroy.

◆ ProbeEndpointError()

CdiReturnStatus ProbeEndpointError ( ProbeEndpointHandle handle)

Disables the EFA endpoint and puts the probe into connection reset state. The probe will then attempt to reset the remote connection and re-establish the connection. Once the connection has been re-established, the user-registered connection callback function will be invoked.

Parameters
handleHandle of probe related to the endpoint error.
Returns
CdiReturnStatus kCdiStatusOk if the operation was successful or a value that indicates the nature of the failure.

◆ ProbeEndpointReset()

void ProbeEndpointReset ( ProbeEndpointHandle handle)

Reset a probe endpoint.

Parameters
handleHandle of probe related to the endpoint.

◆ ProbeEndpointResetDone()

CdiReturnStatus ProbeEndpointResetDone ( ProbeEndpointHandle handle)

The Endpoint Manager is in the final process of completing a reset of the endpoint by calling CdiAdapterResetEndpoint(), which uses this function to notify probe that the endpoint reset is done.

Parameters
handleHandle of probe related to the endpoint.
Returns
CdiReturnStatus kCdiStatusOk if the operation was successful or a value that indicates the nature of the failure.

◆ ProbeEndpointStart()

CdiReturnStatus ProbeEndpointStart ( ProbeEndpointHandle handle)

The Endpoint Manager is in the final process of starting an endpoint by calling CdiAdapterStartEndpoint(), which uses this function to notify probe that the endpoint can be started.

Parameters
handleHandle of probe related to the endpoint.
Returns
CdiReturnStatus kCdiStatusOk if the operation was successful or a value that indicates the nature of the failure.

◆ ProbeEndpointStop()

void ProbeEndpointStop ( ProbeEndpointHandle handle)

Stop a probe endpoint and wait for its thread to exit.

Parameters
handleHandle of the probe endpoint to stop.