CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
|
This header file contains definitions of types needed for the reordering of packets. More...
Go to the source code of this file.
Functions | |
bool | RxReorderPacketPayloadStateInit (CdiProtocolHandle protocol_handle, CdiPoolHandle payload_sgl_entry_pool_handle, CdiPoolHandle reorder_entries_pool_handle, RxPayloadState *payload_state_ptr, const CdiSgList *new_sglist_ptr, int initial_offset, int sequence_num) |
Adds initial entry to payload_state_ptr->reorder_list_ptr. | |
bool | RxReorderPacket (CdiProtocolHandle protocol_handle, CdiPoolHandle payload_sgl_entry_pool_handle, CdiPoolHandle reorder_entries_pool_handle, RxPayloadState *payload_state_ptr, const CdiSgList *new_sglist_ptr, int initial_offset, int sequence_num) |
Adds an entry to the payload sgl. Also checks for and maintains outstanding packets that are received out of order. If an SGL arrives that is out of order, it will be added to a doubly linked list (reorder list) of outstanding dangling lists. | |
void | RxReorderPacketFreeLists (CdiReorderList *reorder_list_ptr, CdiPoolHandle payload_sgl_entry_pool_handle, CdiPoolHandle reorder_entries_pool_handle) |
removes all lists and sgls used in processing the out of order packets | |
This header file contains definitions of types needed for the reordering of packets.
bool RxReorderPacket | ( | CdiProtocolHandle | protocol_handle, |
CdiPoolHandle | payload_sgl_entry_pool_handle, | ||
CdiPoolHandle | reorder_entries_pool_handle, | ||
RxPayloadState * | payload_state_ptr, | ||
const CdiSgList * | new_sglist_ptr, | ||
int | initial_offset, | ||
int | sequence_num ) |
Adds an entry to the payload sgl. Also checks for and maintains outstanding packets that are received out of order. If an SGL arrives that is out of order, it will be added to a doubly linked list (reorder list) of outstanding dangling lists.
Once all of the data for a payload is received, then the entries for payload_state_ptr->reorder_list_ptr->next_ptr and payload_state_ptr->reorder_list_ptr->prev_ptr will be NULL, otherwise there are dangling lists that have not been attached to the single payload list.
protocol_handle | Handle for protocol being used. |
payload_sgl_entry_pool_handle | Handle to memory pool of payload SGL entries. |
reorder_entries_pool_handle | Handle to memory pool of rx_reorder entries. |
payload_state_ptr | Current state of the payload, specifically a single rx_reorder entry. |
new_sglist_ptr | An SGL to be added to the end of the payload sgl. |
initial_offset | First SGL entry will have this offset applied |
sequence_num | The sequence number of this SGL list. |
void RxReorderPacketFreeLists | ( | CdiReorderList * | reorder_list_ptr, |
CdiPoolHandle | payload_sgl_entry_pool_handle, | ||
CdiPoolHandle | reorder_entries_pool_handle ) |
removes all lists and sgls used in processing the out of order packets
reorder_list_ptr | pointer to a single list entry to start the removal process |
payload_sgl_entry_pool_handle | handle to memory pool of sgls |
reorder_entries_pool_handle | handle to memory pool of rx reorder lists |
bool RxReorderPacketPayloadStateInit | ( | CdiProtocolHandle | protocol_handle, |
CdiPoolHandle | payload_sgl_entry_pool_handle, | ||
CdiPoolHandle | reorder_entries_pool_handle, | ||
RxPayloadState * | payload_state_ptr, | ||
const CdiSgList * | new_sglist_ptr, | ||
int | initial_offset, | ||
int | sequence_num ) |
Adds initial entry to payload_state_ptr->reorder_list_ptr.
protocol_handle | Handle for protocol being used. |
payload_sgl_entry_pool_handle | Handle to memory pool of payload SGL entries. |
reorder_entries_pool_handle | Handle to memory pool of rx_reorder entries. |
payload_state_ptr | Current state of the payload, specifically a single rx_reorder entry. |
new_sglist_ptr | An SGL to be added to the end of the payload sgl. |
initial_offset | First SGL entry will have this offset applied. |
sequence_num | The sequence number of this SGL list. |