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

This header file contains definitions used to define the build configuration of the CDI SDK's implementation. More...

Go to the source code of this file.

Macros

#define HD_TO_4K_FACTOR   (4)
 Enable to debug packet sequences. NOTE: This generates a lot of debug output.
 
#define NO_GROW_COUNT   (0)
 This is used for pools that will not grow when they become empty.
 
#define NO_GROW_SIZE   (0)
 This is used for pools that will not grow when they become empty.
 
#define MAX_RX_OUT_OF_ORDER   (128)
 Maximum number of out of order packets that can be received.
 
#define MAX_RX_OUT_OF_ORDER_GROW   (8)
 Maximum number out of order packets buffer can be increased by.
 
#define MAX_ERROR_STRING_LENGTH   (1024)
 Maximum length of error string message.
 
#define MAX_IP_STRING_LENGTH   (64)
 Maximum IP string length.
 
#define MAX_IPV6_GID_LENGTH   (32)
 Maximum EFA device GID length. Contains GID + QPN (see efa_ep_addr).
 
#define MAX_IPV6_ADDRESS_STRING_LENGTH   (64)
 Maximum IPV6 address string length.
 
#define MAX_POOL_NAME_LENGTH   (64)
 Maximum length of memory pool name that is stored internally in pool.c.
 
#define MAX_FIFO_NAME_LENGTH   (64)
 Maximum length of the FIFO name that is stored internally in fifo.c.
 
#define MAX_PAYLOADS_PER_CONNECTION   (100)
 Maximum number of payloads for a single connection.
 
#define MAX_TX_PACKET_WORK_REQUESTS_PER_CONNECTION   (3000*HD_TO_4K_FACTOR)
 Maximum number of Tx packet work requests per connection.
 
#define TX_AVM_PACKET_HEADER_POOL_SIZE_PER_CONNECTION   (100)
 Number of Tx AVM packet header pool entries available for a Tx connection. The pool is used to hold user-specified AVM configuration data that is associated with a payload. The memory allocated must be part of the DMA Tx memory region.
 
#define TX_PACKET_SGL_ENTRY_SIZE_PER_CONNECTION   (3000*HD_TO_4K_FACTOR)
 Initial number of SGL entries in a tx payload.
 
#define TX_PACKET_SGL_ENTRY_SIZE_PER_CONNECTION_GROW   (500)
 Number of entries the tx payload SGL list may be increased by.
 
#define MAX_TX_PACKETS_PER_CONNECTION   (3000*HD_TO_4K_FACTOR)
 Maximum number of transmit packets per payload. Additional objects are needed due to the asynchronous nature of the API. Multiple payload transmissions may overlap.
 
#define TX_PACKET_POOL_SIZE_GROW   (100)
 Number of entries the tx packet queue may be increased by.
 
#define MAX_TX_PACKET_BATCHES_PER_CONNECTION   (12*HD_TO_4K_FACTOR)
 Maximum number of batches of transmit packets allowed to send to an endpoint. Transmit packets are sent in ever increasingly sized batches so the number of batches is approximately log[base2](packets).
 
#define TX_PACKET_SEND_QUEUE_SIZE_GROW   (10)
 Number of entries the tx packet queue may be increased by.
 
#define MAX_TX_SGL_PACKET_ENTRIES   (4)
 Maximum number of SGL entries for a single transmit packet.
 
#define SIMULTANEOUS_TX_PACKET_LIMIT   (50)
 Maximum number of packets that can be simultaneously queued for transmission without receiving a corresponding completion event (ACK or error).
 
#define MAX_TX_BULK_COMPLETION_QUEUE_MESSAGES   (SIMULTANEOUS_TX_PACKET_LIMIT)
 Maximum number of completion queue messages to process in a single Tx poll call.
 
#define MAX_RX_BULK_COMPLETION_QUEUE_MESSAGES   (50)
 Maximum number of completion queue messages to process in a single Rx poll call.
 
#define MAX_RX_PACKETS_PER_CONNECTION   (10000)
 Initial number of rx packets in a connection.
 
#define MAX_RX_PACKETS_PER_CONNECTION_GROW   (500)
 Number of entries the rx packet connection list may be increased by.
 
#define RX_SOCKET_BUFFER_SIZE   (1000)
 Initial number of rx sockets.
 
#define RX_SOCKET_BUFFER_SIZE_GROW   (100)
 Number of entries the rx socket list may be increased by.
 
#define MAX_ENDPOINT_COMMAND_QUEUE_SIZE   (10)
 Size of the endpoint command queue used by the Endpoint Manager.
 
#define MAX_POOL_GROW_COUNT   (5)
 Maximum number of times a pool may grow in size before an error occurs.
 
#define MAX_QUEUE_GROW_COUNT   (5)
 Maximum number of times a queue may grow in size before an error occurs.
 
#define MAX_MSG_PREFIX_SIZE   (22 * 8)
 The space reserved for the libfabric message prefix in our packet header. This must be set to be equal or larger than the largest prefix size needed by the EFA provider. It must be a multiple of 8. See https://ofiwg.github.io/libfabric/v1.13.0/man/fi_msg.3.html#notes.
 
#define EFA_TX_PACKET_CACHE_SIZE   (16)
 Number of Tx packets to cache before notifying libfabric to ring the NIC's doorbell.
 
#define EFA_RX_PACKET_BUFFER_CACHE_SIZE   (16)
 Number of Rx buffer posts to cache before notifying libfabric to ring the NIC's doorbell.
 
#define EFA_CQ_READ_SIZE   (50)
 Number of read completion queue entries. Current libfabric default is 50.
 
#define PROBE_RX_PACKET_BUFFERS_PER_CONNECTION   (100)
 Number of probe Rx packet buffers to reserve per connection.
 
#define MAX_PROBE_CONTROL_COMMANDS_PER_CONNECTION   (20)
 Maximum number of control interface commands per connection.
 
#define CONTROL_INTERFACE_TX_BUFFER_SIZE_BYTES   (4096)
 Size of control interface transfer buffer size in bytes.
 
#define RX_RESET_COMMAND_MAX_RETRIES   (3)
 This value is used by the receiver to define how many times a reset command is sent without receiving any responses before destroying the Rx endpoint.
 
#define SEND_RESET_COMMAND_FREQUENCY_MSEC   (2000)
 Defines how often a reset command is sent to the remote target using the control interface. The value is in milliseconds.
 
#define ENDPOINT_MANAGER_COMPLETION_TIMEOUT_MSEC   (1000)
 Once a command has been sent to the Endpoint Manager, this defines how long to wait before it completes.
 
#define TX_CONNECTION_DELAY_MSEC   (1000)
 After probe packet ACKs have been received, this is how long to wait before changing to the connected state. The value is in milliseconds.
 
#define SEND_PING_COMMAND_FREQUENCY_MSEC   (5000)
 Once a connection has been established, this defines how often the transmitter sends a ping to command to the receiver using the control interface. The value is in milliseconds.
 
#define TX_COMMAND_MAX_RETRIES   (40)
 This value is used by the transmitter to define how many times a command is sent without receiving an ACK reply before going into connection reset mode.
 
#define TX_COMMAND_ACK_TIMEOUT_MSEC   (500)
 This value is used by the transmitter to define how long it waits for an ACK response to a command that it sent. If the timeout expires, the same command will be sent up to the amount specified by TX_COMMAND_MAX_RETRIES. Once the specified number of attempts has been exhausted, the transmitter will go into connection reset mode. The value is in milliseconds.
 
#define RX_PING_MONITOR_TIMEOUT_MSEC   (5000 + (SEND_PING_COMMAND_FREQUENCY_MSEC*3))
 Defines how long the receiver waits for a ping command from the remote target before changing to connection reset mode. The value is in milliseconds. This should be long enough to avoid false disconnects due to a few TX ping packets getting dropped.
 
#define EFA_PROBE_PACKET_BUFFER_COUNT   (CDI_MAX_SIMULTANEOUS_CONNECTIONS*CDI_MAX_ENDPOINTS_PER_CONNECTION)
 Defines the number of EFA interface Tx probe packet buffers to allocate in DMA memory. Each probe endpoint uses one packet buffer, so this value sets the maximum number of endpoints that can simultaneously be probing. The memory region is reserved as part EFA adapter initialization. It is internally added by the SDK to the size specified by CdiAdapterData.tx_buffer_size_bytes.
 
#define EFA_PROBE_PACKET_DATA_SIZE   (1024)
 Defines the EFA interface probe packet data size.
 
#define EFA_PROBE_PACKET_COUNT   (1000)
 Defines the number of EFA interface probe packets that must be successfully transmitted before advancing to the connected mode.
 
#define EFA_TX_PROBE_ACK_TIMEOUT   (100)
 Defines how long the transmitter should wait for all the probe packet ACKs to be received after the transmitter has received the kProbeCommandConnected command from the receiver.
 
#define EFA_TX_PROBE_ACK_MAX_RETRIES   (5)
 Defines how many times to retry EFA_TX_PROBE_ACK_TIMEOUT before going into connection reset mode.
 
#define EFA_PROBE_MONITOR_TIMEOUT_MSEC   (3000)
 Defines how long to wait for the EFA interface probe to complete before changing to connection reset mode. The value is in milliseconds.
 
#define EFA_PROBE_PACKET_DATA_PATTERN   (0x41)
 The byte pattern used for the data portion of EFA probe packets.
 
#define DEFAULT_TIMEOUT_MSEC   (1000)
 The default timeout value used by ProbeControlThread(). The value is in milliseconds.
 
#define RX_LINEAR_BUFFER_COUNT   (5)
 
#define SYSTEM_MONITORING_SLEEP_TIME_MS   (400)
 The number of milliseconds that system monitoring thread sleeps for before checking anything.
 
#define SYSTEM_MONITORING_SLEEP_TIME_TOLERANCE_MS   (SYSTEM_MONITORING_SLEEP_TIME_MS + 200)
 The maximum number of milliseconds that system monitoring thread should have slept for before waking up.
 
#define CLOUDWATCH_METRICS_ENABLED
 
#define CLOUDWATCH_DEFAULT_NAMESPACE_STRING   ("CloudDigitalInterface")
 Default CloudWatch namespace to use.
 
#define MAX_CLOUDWATCH_STRING_LENGTH   (256)
 Maximum string length used to represent strings specific to CloudWatch (ie. namespace, region and dimension domain name).
 
#define CLOUDWATCH_STATS_FIFO_DEPTH   (1000)
 The maximum depth of the CloudWatch statistics FIFO.
 
#define METRICS_GATHERING_SERVICE_ENABLED
 This macro enables sending metrics to the AWS CDI metrics gathering service.
 

Detailed Description

This header file contains definitions used to define the build configuration of the CDI SDK's implementation.

Macro Definition Documentation

◆ CLOUDWATCH_METRICS_ENABLED

#define CLOUDWATCH_METRICS_ENABLED

When defined, publishing metrics to CloudWatch can be enabled through the API. This macro must also be defined to use the metrics gathering service.

◆ HD_TO_4K_FACTOR

#define HD_TO_4K_FACTOR   (4)

Enable to debug packet sequences. NOTE: This generates a lot of debug output.

Enable to debug poll thread sleep time. NOTE: This generates a lot of debug output.

Enable to debug Tx packet SGL entry pool free item count.

This is an example of how to use the queue debug function. It enables queue debugging of the tx_packet_queue_handle in adapter.c. NOTE: This feature is currently only available in a DEBUG build.

Enable additional debug logging of the control_work_request_pool_handle pool used in adapter_efa_probe.c. NOTE: This feature is currently only available in a DEBUG build.

Options to enable debug output for logic defined in rx_reorder.c.

Option to enable compiling and debug output for logic defined in t_digest.c.

Dump Tx SGL and related SGL entries for each packet.

Dump Rx raw SGL entries as part of RxPollFreeBuffer().

Log Rx payload SGL entry free counts used in RxPollFreeBuffer().

After a connection has been established, disable all connection probe monitoring. This allows breakpoints and other delays to occur without causing the probe to reset the connection.

Enable the define below to set the libfabric log level. Default is no logging.

Multiplication factor used to increase buffer sizes from HD to 4K payloads.

◆ RX_LINEAR_BUFFER_COUNT

#define RX_LINEAR_BUFFER_COUNT   (5)

The number of linear receive buffers allocated per connection opened with rx_buffer_type set to kCdiLinearBuffer. The application program cannot hold on to more than this number of buffers before returning them through the CdiCoreRxFreeBuffer() function.