Crate xdpilone

Source
Expand description

Rust idiomatic bindings for the AF_XDP socket interface.

This library helps with creating suitable socket(s) from a memory allocation of chunks, sockets for access to all four rings, binding to a specific (ifname, queue_id), and for creating the memory mapping to interact with all these queues directly.

It does not interact with the packet filter / forwarding directly, nor any other aspect of bpf. You can send packets but you can not receive them. Please use another library for bpf and netlink interaction to configure the network device to route received frames to the RX ring.

The entrypoint to the library is an instance of crate::Umem.

Modules§

xdp
Bindings for XDP kernel-interface, including structs.

Structs§

BufIdx
An index to an XDP buffer.
DeviceQueue
One device queue associated with an XDP socket.
Errno
An error that has been read from errno.
IfInfo
A complete (cached) information about a socket.
ReadComplete
A reader from a completion queue.
ReadRx
A reader from an receive (RX) queue.
RingCons
A consumer ring.
RingProd
A producer ring.
RingRx
A receiver queue.
RingTx
A transmitter queue.
Socket
One prepared socket for a receive/transmit pair.
SocketConfig
Configuration for a created socket.
Umem
The basic Umem descriptor.
UmemChunk
A raw pointer to a specific chunk in a Umem.
UmemConfig
Static configuration describing a memory area to use for ring chunks.
User
An owner of receive/transmit queues.
WriteFill
A writer to a fill queue.
WriteTx
A writer to a transmission (TX) queue.