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_tx.c File Reference

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_tx.h"
#include "adapter_api.h"
#include "adapter_efa_probe_control.h"
#include "cdi_os_api.h"
#include "endpoint_manager.h"
#include "internal.h"
#include "internal_utility.h"
#include "payload.h"

Macros

#define LEGACY_SEND_PING_COMMAND_FREQUENCY_MSEC   (3000)
 Legacy protocols before version 5 used 3000 for ping command frequency.
 

Functions

static bool EfaEnqueueSendProbePacket (ProbeEndpointState *probe_ptr)
 
static int ProcessSendCommandRetry (ProbeEndpointState *probe_ptr, const char *remote_ip_str, int remote_dest_port, ProbeCommand command)
 Process the state of command that can be resent multiple times, due to not receiving an ACK.
 
void ProbeTxEfaMessageFromEndpoint (void *param_ptr, Packet *packet_ptr, EndpointMessageType message_type)
 
void ProbeTxControlMessageFromEndpoint (void *param_ptr, Packet *packet_ptr)
 
bool ProbeTxControlProcessPacket (ProbeEndpointState *probe_ptr, const CdiDecodedProbeHeader *probe_hdr_ptr, uint64_t *wait_timeout_ms_ptr)
 
uint64_t ProbeTxControlProcessProbeState (ProbeEndpointState *probe_ptr)
 

Detailed Description

This file contains internal definitions and implementation used within the SDK to support functionality that is not part of the API.

Function Documentation

◆ EfaEnqueueSendProbePacket()

static bool EfaEnqueueSendProbePacket ( ProbeEndpointState * probe_ptr)
static

Send a probe packet using the EFA adapter interface to the endpoint associated with the probe connection. Only one packet is sent at a time, waiting for the packet's ACK before sending the next one. Probe doesn't send very many packets so no need to optimize and require additional DMA packet buffers.

Parameters
probe_ptrPointer to probe connection state data.
Returns
True is successful, otherwise false is returned.

◆ ProbeTxControlMessageFromEndpoint()

void ProbeTxControlMessageFromEndpoint ( void * param_ptr,
Packet * packet_ptr )

Process a control packet completion message from the transmitter probe control interface endpoint.

NOTE: This function is called from PollThread().

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

◆ ProbeTxControlProcessPacket()

bool ProbeTxControlProcessPacket ( ProbeEndpointState * probe_ptr,
const CdiDecodedProbeHeader * probe_hdr_ptr,
uint64_t * wait_timeout_ms_ptr )

Process control message for Tx connection.

NOTE: This function is called from ProbeControlThread().

Parameters
probe_ptrPointer to probe endpoint state data.
probe_hdr_ptrPointer to control message header.
wait_timeout_ms_ptrPointer to current wait timeout. This function may alter the contents of the value.
Returns
True if new probe state has been set, otherwise false is returned.

◆ ProbeTxControlProcessProbeState()

uint64_t ProbeTxControlProcessProbeState ( ProbeEndpointState * probe_ptr)

Called when the wait timeout period has expired. Time to process the current Tx probe state.

NOTE: This function is called from ProbeControlThread().

Parameters
probe_ptrPointer to probe endpoint state data.
Returns
Wait timeout value.

◆ ProbeTxEfaMessageFromEndpoint()

void ProbeTxEfaMessageFromEndpoint ( void * param_ptr,
Packet * packet_ptr,
EndpointMessageType message_type )

Process a probe packet completion message from the transmitter EFA endpoint.

NOTE: This function is called from Poll().

Parameters
param_ptrPointer to user parameter.
packet_ptrPointer to packet.
message_typeEndpoint message type.

◆ ProcessSendCommandRetry()

static int ProcessSendCommandRetry ( ProbeEndpointState * probe_ptr,
const char * remote_ip_str,
int remote_dest_port,
ProbeCommand command )
static

Process the state of command that can be resent multiple times, due to not receiving an ACK.

Parameters
probe_ptrPointer to probe endpoint state data.
remote_ip_strPointer to remote endpoint's IP string.
remote_dest_portRemote endpoint's destination port.
commandCommand to send.
Returns
Wait timeout in milliseconds.