Skip to content

Libxdp function xsk_socket__create

Definition

Creates an AF_XDP socket with exclusive ownership of a umem.

Returns

0 on success, or a negative error in case of failure:

-EINVAL if arguments are invalid

-EFAULT if memory address is invalid

-ENOMEM if no data space available

-ENOPROTOOPT if option is not supported by the protocol

Usage

int xsk_socket__create(struct xsk_socket **xsk,
               const char *ifname, __u32 queue_id,
               struct xsk_umem *umem,
               struct xsk_ring_cons *rx,
               struct xsk_ring_prod *tx,
               const struct xsk_socket_config *config);

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome