XSK / AF_XDP functions and objects¶
These are all the functions, objects and methods related to AF_XDP / XSK.
-
newXSK(options)¶ New in version 1.9.0.
This function creates a new
XskSocketobject, tied to a network interface and queue, to acceptXSK/AF_XDPpacket from the Linux kernel. The returned object can be passed as a parameter toaddLocal()to use XSK forUDPpackets between clients and dnsdist. It can also be passed tonewServerto use XSK forUDPpackets between dnsdist a backend.Parameters: options (table) – A table with key: value pairs with listen options. Options:
ifName: str - The name of the network interface this object will be tied to.NIC_queue_id: int - The queue of the network interface this object will be tied to.frameNums: int - The number ofUMEMframes to allocate for this socket. More frames mean that a higher number of packets can be processed at the same time. 65535 is a good choice for maximum performance.xskMapPath: str - The path of the BPF map used to communicate with the kernel space XDP program, usually/sys/fs/bpf/dnsdist/xskmap.
-
class
XskSocket¶ New in version 1.9.0.
Represents a
XSK/AF_XDPsocket tied to a specific network interface and queue. This object can be created vianewXSK()and passed toaddLocal()to use XSK forUDPpackets between clients and dnsdist. It can also be passed tonewServer()to use XSK forUDPpackets between dnsdist a backend.-
:getMetrics() → str¶ Returns a string containing
XSK/AF_XDPmetrics for this object, as reported by the Linux kernel.
-