CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
|
Structure used to hold adapter connection state. More...
#include <adapter_api.h>
Data Fields | ||
CdiListEntry | list_entry | |
Allow these structures to live in a list in the Adapter. | ||
CdiAdapterState * | adapter_state_ptr | |
Pointer back to the adapter that is being used by this connection. | ||
volatile CdiConnectionStatus | connection_status_code | |
Current state of this endpoint. NOTE: Made volatile, since it is written to and read by different threads. The reader uses the value within a loop, so we don't want the value to be cached and held in a register. | ||
CdiLogHandle | log_handle | |
Handle (a pointer) to the log associated with the connection used by this endpoint. | ||
EndpointDirection | direction | |
The direction that this endpoint supports. | ||
RxAdapterConnectionState | rx_state | |
Valid if direction supports receive. | ||
union { | ||
AdapterDataConnectionState data_state | ||
Valid if PollThreadState.data_type = kEndpointTypeData. Data connection specific state data. | ||
AdapterControlConnectionState control_state | ||
Valid if PollThreadState.data_type = kEndpointTypeControl. Control interface connection specific state data. | ||
}; | ||
PollState | poll_state | |
State of poll operation for this adapter connection (start, running or stopped). | ||
bool | can_transmit | |
True if connection can transmit. | ||
bool | can_receive | |
True if connection can receive. | ||
ThreadUtilizationState | load_state | |
Used for computing the CPU utilization of the poll thread for the connection. | ||
int | port_number | |
Port number related to this connection. | ||
CdiSignalType | tx_poll_do_work_signal | |
Valid if direction supports transmit. Tx Signal/flag used to notify PollThread() that it can sleep. This signal is set whenever a Tx payload transaction begins. Probe also sets the signal in ProbeControlEfaConnectionStart(). It is cleared after all the Tx packets for the payload have been sent, ACKs received and the Tx payload queue is empty. See PollThread(). It also is cleared whenever an adapter endpoint is reset. See CdiAdapterResetEndpoint(). | ||
PollThreadState * | poll_thread_state_ptr | |
Pointer to poll thread state data associated with this connection. | ||
CdiSignalType | shutdown_signal | |
Signal used to shutdown adapter connection threads. | ||
bool | tx_header_buffer_is_hugepages | |
If true, tx_header_buffer_allocated_ptr is using hugepages, otherwise it is using heap memory. | ||
uint64_t | tx_header_buffer_allocated_size | |
Size in bytes of Tx payload buffer allocated. Pointer to allocated buffer is in tx_buffer_allocated_ptr. | ||
void * | tx_header_buffer_allocated_ptr | |
Pointer to start of the allocated transmit buffers used by Tx probe packets, Tx headers and Tx extra headers. Total allocated size is in tx_buffer_allocated_size. | ||
CdiPoolHandle | tx_header_pool_handle | |
Valid if direction supports transmit. Memory pool of Tx headers for packets (TxPacketHeader). | ||
CdiPoolHandle | tx_extra_header_pool_handle | |
Valid if direction supports transmit. Memory pool of Tx extra headers for packets (TxExtraPacketHeader). | ||
ControlInterfaceHandle | control_interface_handle | |
Handle of control interface for the connection. | ||
CdiCsID | endpoint_lock | |
Lock used to protect access to endpoint resources. | ||
void * | type_specific_ptr | |
Adapter specific connection data. | ||
Structure used to hold adapter connection state.