|
XLIO
The NVIDIA® Accelerated IO
|
Functions for managing polling groups and event handling. More...
Classes | |
| struct | xlio_poll_group_attr |
| Polling group attributes. More... | |
Macros | |
| #define | XLIO_GROUP_FLAG_SAFE 0x1 |
| #define | XLIO_GROUP_FLAG_DIRTY 0x2 |
Typedefs | |
| typedef uintptr_t | xlio_poll_group_t |
| Polling group handle. More... | |
Functions | |
| int | xlio_poll_group_create (const struct xlio_poll_group_attr *attr, xlio_poll_group_t *group_out) |
| Create a new polling group. More... | |
| int | xlio_poll_group_destroy (xlio_poll_group_t group) |
| Destroy a polling group. More... | |
| int | xlio_poll_group_update (xlio_poll_group_t group, const struct xlio_poll_group_attr *attr) |
| Update polling group attributes. More... | |
| void | xlio_poll_group_poll (xlio_poll_group_t group) |
| Poll for events on a polling group. More... | |
Functions for managing polling groups and event handling.
Polling groups are the core event management mechanism in the XLIO Ultra API. They allow applications to register event callbacks and efficiently poll for network events across multiple sockets.
Polling group is a collection of sockets and resources required for their operation. Different polling groups can be used concurrently without serialization.
Polling groups provide loggical sockets organization for the following purposes:
Recommendations:
| #define XLIO_GROUP_FLAG_DIRTY 0x2 |
Group will keep dirty sockets to be flushed with xlio_poll_group_flush().
| #define XLIO_GROUP_FLAG_SAFE 0x1 |
Sockets and rings will be protected with locks regardless of XLIO configuration.
| typedef uintptr_t xlio_poll_group_t |
Polling group handle.
Opaque handle representing a polling group for event management.
| int xlio_poll_group_create | ( | const struct xlio_poll_group_attr * | attr, |
| xlio_poll_group_t * | group_out | ||
| ) |
Create a new polling group.
Creates a new polling group with the specified attributes. Event callbacks are registered per group, allowing applications to implement different handling logic for different types of connections.
| attr | Polling group attributes |
| group_out | Pointer to store the created group handle |
| int xlio_poll_group_destroy | ( | xlio_poll_group_t | group | ) |
Destroy a polling group.
Destroys the specified polling group and frees associated resources. All leftover sockets associated with this group are destroyed implicitly.
| group | The polling group to destroy |
| void xlio_poll_group_poll | ( | xlio_poll_group_t | group | ) |
Poll for events on a polling group.
This is the main event processing function. It polls hardware for events, executes TCP timers, and invokes registered callbacks. Most network events are processed from the context of this call.
| group | The polling group to poll |
| int xlio_poll_group_update | ( | xlio_poll_group_t | group, |
| const struct xlio_poll_group_attr * | attr | ||
| ) |
Update polling group attributes.
Updates the attributes of an existing polling group. This allows changing callback functions or flags without recreating the group.
| group | The polling group to update |
| attr | New attributes for the group |