XLIO
The NVIDIA® Accelerated IO
Transmit Operations

High-performance data transmission functions. More...

Classes

struct  xlio_socket_send_attr
 Send operation attributes. More...
 

Macros

#define XLIO_SOCKET_SEND_FLAG_FLUSH   0x1
 
#define XLIO_SOCKET_SEND_FLAG_INLINE   0x2
 

Functions

int xlio_socket_send (xlio_socket_t sock, const void *data, size_t len, const struct xlio_socket_send_attr *attr)
 Send data on a socket. More...
 
int xlio_socket_sendv (xlio_socket_t sock, const struct iovec *iov, unsigned iovcnt, const struct xlio_socket_send_attr *attr)
 Send vectored data on a socket. More...
 
void xlio_poll_group_flush (xlio_poll_group_t group)
 Flush all dirty sockets in a polling group. More...
 
void xlio_socket_flush (xlio_socket_t sock)
 Flush pending data on a socket. More...
 

Detailed Description

High-performance data transmission functions.

The XLIO Ultra API provides efficient transmission capabilities with zero-copy support and flexible batching options.

TX Flow Properties

TX Flow Limitations

Macro Definition Documentation

◆ XLIO_SOCKET_SEND_FLAG_FLUSH

#define XLIO_SOCKET_SEND_FLAG_FLUSH   0x1

Flush socket after queueing the data.

◆ XLIO_SOCKET_SEND_FLAG_INLINE

#define XLIO_SOCKET_SEND_FLAG_INLINE   0x2

Copy user data to the internal buffers instead of taking ownership.

Function Documentation

◆ xlio_poll_group_flush()

void xlio_poll_group_flush ( xlio_poll_group_t  group)

Flush all dirty sockets in a polling group.

For polling groups created with XLIO_GROUP_FLAG_DIRTY, this function flushes all sockets that have pending data to send. This provides batch flushing capabilities for improved performance.

Parameters
groupThe polling group to flush
Note
This function should only be used with groups that have the XLIO_GROUP_FLAG_DIRTY flag set.

◆ xlio_socket_flush()

void xlio_socket_flush ( xlio_socket_t  sock)

Flush pending data on a socket.

Forces transmission of any data queued on the socket. XLIO aggregates data by default for efficiency and user logic simplification.

This function doesn't guarantee immediate transmission, because TCP algorithms and congestion/flow control may affect transmission.

Parameters
sockThe socket to flush
Note
Avoid using this function with sockets in XLIO_GROUP_FLAG_DIRTY groups. Use xlio_poll_group_flush() instead for better performance for such groups.

◆ xlio_socket_send()

int xlio_socket_send ( xlio_socket_t  sock,
const void *  data,
size_t  len,
const struct xlio_socket_send_attr attr 
)

Send data on a socket.

Sends data on the specified socket using zero-copy by default. The operation is non-blocking and accepts all data unless memory allocation fails.

Parameters
sockThe socket to send data on
dataPointer to the data to send
lenLength of the data
attrSend attributes controlling the operation
Returns
0 on success, -1 on error (errno is set)
Error Codes:
  • ENOMEM: Insufficient memory (recoverable by retrying later)
  • Other errors are generally not recoverable
Note
For zero-copy operation, the memory must be registered with the InfiniBand protection domain obtained from xlio_socket_get_pd().
See also
xlio_socket_send_attr

◆ xlio_socket_sendv()

int xlio_socket_sendv ( xlio_socket_t  sock,
const struct iovec *  iov,
unsigned  iovcnt,
const struct xlio_socket_send_attr attr 
)

Send vectored data on a socket.

Sends data from multiple buffers (scatter-gather) on the specified socket.

Parameters
sockThe socket to send data on
iovArray of iovec structures describing the data buffers
iovcntNumber of iovec structures
attrSend attributes controlling the operation
Returns
0 on success, -1 on error (errno is set)
See also
xlio_socket_send()