CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
internal_tx.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------------------------
2// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
3// This file is part of the AWS CDI-SDK, licensed under the BSD 2-Clause "Simplified" License.
4// License details at: https://github.com/aws/aws-cdi-sdk/blob/mainline/LICENSE
5// -------------------------------------------------------------------------------------------
6
13#ifndef CDI_INTERNAL_TX_H__
14#define CDI_INTERNAL_TX_H__
15
16#include "adapter_api.h"
17#include "private.h"
18#include "cdi_core_api.h"
19#include "cdi_raw_api.h"
20
21//*********************************************************************************************************************
22//***************************************** START OF DEFINITIONS AND TYPES ********************************************
23//*********************************************************************************************************************
24
29typedef struct {
30 uint8_t header[MAX_MSG_PREFIX_SIZE + sizeof(CdiRawPacketHeader)];
32
37typedef struct {
38 uint8_t header[MAX_MSG_PREFIX_SIZE + sizeof(CdiRawExtraPacketHeader)];
40
66
67//*********************************************************************************************************************
68//******************************************* START OF PUBLIC FUNCTIONS ***********************************************
69//*********************************************************************************************************************
70
73 CdiCallback tx_cb_ptr, CdiConnectionHandle* ret_handle_ptr);
74
77 CdiConnectionHandle* ret_handle_ptr);
78
81 CdiEndpointHandle* ret_handle_ptr);
82
84CdiReturnStatus TxPayloadInternal(CdiEndpointState* endpoint_ptr, const CdiCoreTxPayloadConfig* core_payload_config_ptr,
85 const CdiSgList* sgl_ptr, int max_latency_microsecs, int extra_data_size,
86 uint8_t* extra_data_ptr);
87
94
97
104
113void TxPacketWorkRequestComplete(void* param_ptr, Packet* packet_ptr, EndpointMessageType message_type);
114
121void TxInvokeAppPayloadCallback(CdiConnectionState* con_state_ptr, AppPayloadCallbackData* app_cb_data_ptr);
122
130
131#endif // CDI_INTERNAL_TX_H__
The declarations in this header file correspond to the definitions in adapter.c.
EndpointMessageType
Definition adapter_api.h:93
This file declares the public API data types, structures and functions that comprise the CDI low-leve...
CdiReturnStatus
Values used for API function return codes.
Definition cdi_core_api.h:189
This file declares the public API data types, structures and functions that comprise the CDI Raw payl...
CdiConnectionProtocolType
This enumeration is used in the CdiConnectionState structure to indicate what connection layer is bei...
Definition cdi_utility_api.h:71
#define MAX_MSG_PREFIX_SIZE
The space reserved for the libfabric message prefix in our packet header. This must be set to be equa...
Definition configuration.h:163
CdiReturnStatus TxStreamEndpointCreateInternal(CdiConnectionHandle handle, CdiTxConfigDataStream *stream_config_ptr, CdiEndpointHandle *ret_handle_ptr)
Definition internal_tx.c:725
void TxInvokeAppPayloadCallback(CdiConnectionState *con_state_ptr, AppPayloadCallbackData *app_cb_data_ptr)
Definition internal_tx.c:1005
void TxConnectionDestroyInternal(CdiConnectionHandle con_handle)
Definition internal_tx.c:900
void TxPacketWorkRequestComplete(void *param_ptr, Packet *packet_ptr, EndpointMessageType message_type)
Definition internal_tx.c:950
void TxPayloadThreadFlushResources(CdiEndpointState *endpoint_ptr)
Definition internal_tx.c:819
CdiReturnStatus TxCreateInternal(CdiConnectionProtocolType protocol_type, CdiTxConfigData *config_data_ptr, CdiCallback tx_cb_ptr, CdiConnectionHandle *ret_handle_ptr)
Definition internal_tx.c:705
void TxEndpointDestroy(CdiEndpointHandle handle)
Definition internal_tx.c:942
CdiReturnStatus TxConnectionThreadJoin(CdiConnectionHandle con_handle)
Definition internal_tx.c:887
CdiReturnStatus TxStreamConnectionCreateInternal(CdiTxConfigData *config_data_ptr, CdiCallback tx_cb_ptr, CdiConnectionHandle *ret_handle_ptr)
Definition internal_tx.c:719
CdiReturnStatus TxPayloadInternal(CdiEndpointState *endpoint_ptr, const CdiCoreTxPayloadConfig *core_payload_config_ptr, const CdiSgList *sgl_ptr, int max_latency_microsecs, int extra_data_size, uint8_t *extra_data_ptr)
Definition internal_tx.c:733
struct CdiRawExtraPacketHeader CdiRawExtraPacketHeader
Forward reference of structure to create pointers later.
Definition payload.h:70
struct CdiRawPacketHeader CdiRawPacketHeader
Forward reference of structure to create pointers later.
Definition payload.h:68
This header file contains definitions of types and the one global variable used internally by the SDK...
void(* CdiCallback)(const void *param_ptr)
Generic type used to pass Tx/Rx callbacks to internal functions.
Definition private.h:164
This defines a structure that contains all of the data required to use the application registered pay...
Definition private.h:106
Structure definition behind the connection handles shared with the user's application program....
Definition private.h:371
A structure used to configure a transmit payload.
Definition cdi_core_api.h:351
Structure definition behind the connection handles shared with the user's application program....
Definition private.h:330
This structure represents the current state of a memory pool.
Definition pool.c:46
This structure defines a scatter-gather list (SGL) which is used to represent an array of data compri...
Definition cdi_core_api.h:728
Stream configuration data used by the CdiAvmTxStreamEndpointCreate() API function.
Definition cdi_avm_api.h:212
Configuration data used by one of the Cdi...TxCreate() API functions.
Definition cdi_core_api.h:624
Definition adapter_api.h:42
Structure used to hold Tx packet headers that contain extra data. Must reside in the DMA Tx memory re...
Definition internal_tx.h:37
Structure used to hold Tx packet headers. Must reside in the DMA Tx memory region,...
Definition internal_tx.h:29
Structure used to hold a transmit packet work request. The lifespan of a work request starts when a p...
Definition internal_tx.h:46
TxPayloadState * payload_state_ptr
Pointer to Tx payload state structure.
Definition internal_tx.h:47
uint16_t packet_payload_size
Size of payload, not including the packet header.
Definition internal_tx.h:49
TxExtraPacketHeader * extra_header_ptr
Pointer to data for the packet header that contains extra data. It uses entry zero in the packet SGL....
Definition internal_tx.h:63
uint16_t payload_num
Packet payload number.
Definition internal_tx.h:48
TxPacketHeader * header_ptr
Pointer to data for the packet header. It uses entry zero in the packet SGL. NOTE: Must point to a bu...
Definition internal_tx.h:60
void * union_ptr
Definition internal_tx.h:57
Packet packet
The top level packet structure for the data in this work request.
Definition internal_tx.h:50
CdiPoolHandle header_pool_handle
Handle of pool associated with header pointer in structure below. If non-null then header pointer is ...
Definition internal_tx.h:55
This defines a structure that contains all of the state information for sending a single payload.
Definition private.h:141