XLIO
The NVIDIA® Accelerated IO
Receive Operations

Zero-copy receive buffer management. More...

Classes

struct  xlio_buf
 Buffer descriptor. More...
 

Functions

void xlio_socket_buf_free (xlio_socket_t sock, struct xlio_buf *buf)
 Free a receive buffer (socket-specific) More...
 
void xlio_poll_group_buf_free (xlio_poll_group_t group, struct xlio_buf *buf)
 Free a receive buffer (group-specific) More...
 

Detailed Description

Zero-copy receive buffer management.

The XLIO Ultra API provides zero-copy receive capabilities through a buffer management system. Received data is delivered via callbacks with buffer descriptors that must be returned to the system.

xlio_buf structure contains an uninitialized userdata field which can be used by the application to store any data during its ownership on the buffer. For example, the field can be used to organize a list without a container allocation, or to add a reference counter to the buffer.

Data Alignment Considerations

XLIO Ultra API does not guarantee alignment for zero-copy RX data. The data alignment depends on the underlying network headers and packet structure.

Function Documentation

◆ xlio_poll_group_buf_free()

void xlio_poll_group_buf_free ( xlio_poll_group_t  group,
struct xlio_buf buf 
)

Free a receive buffer (group-specific)

Returns a receive buffer to the system for reuse. This function allows to return a buffer outside of the original socket lifecycle.

Parameters
groupThe polling group
bufThe buffer descriptor to free
Note
The buffer must not be accessed after calling this function.

◆ xlio_socket_buf_free()

void xlio_socket_buf_free ( xlio_socket_t  sock,
struct xlio_buf buf 
)

Free a receive buffer (socket-specific)

Returns a receive buffer to the system for reuse. This function should be called for every buffer received via the RX callback.

Parameters
sockThe socket that received the buffer
bufThe buffer descriptor to free
Note
The buffer must not be accessed after calling this function.