PcapPlusPlus
Next
|
#include <XdpDevice.h>
Public Types | |
enum | AttachMode { SkbMode = 1 , DriverMode = 2 , AutoMode = 3 } |
Public Member Functions | |
XdpDeviceConfiguration (AttachMode attachMode=AutoMode, uint16_t umemNumFrames=0, uint16_t umemFrameSize=0, uint32_t fillRingSize=0, uint32_t completionRingSize=0, uint32_t rxSize=0, uint32_t txSize=0, uint16_t rxTxBatchSize=0) | |
Public Attributes | |
AttachMode | attachMode |
uint16_t | umemNumFrames |
uint16_t | umemFrameSize |
uint32_t | fillRingSize |
uint32_t | completionRingSize |
uint32_t | rxSize |
uint32_t | txSize |
uint16_t | rxTxBatchSize |
A struct containing the configuration parameters available for opening an XDP device
AF_XDP operation mode
|
inlineexplicit |
A c'tor for this struct. Each parameter has a default value described below.
[in] | attachMode | AF_XDP operation mode. The default value is auto mode |
[in] | umemNumFrames | Number of UMEM frames to allocate. The default value is 4096 |
[in] | umemFrameSize | The size of each UMEM frame. The default value is equal to getpagesize() |
[in] | fillRingSize | The size of the fill ring used by the AF_XDP socket. The default value is 4096 |
[in] | completionRingSize | The size of the completion ring used by the AF_XDP socket. The default value is 2048 |
[in] | rxSize | The size of the RX ring used by the AF_XDP socket. The default value is 2048 |
[in] | txSize | The size of the TX ring used by the AF_XDP socket. The default value is 2048 |
[in] | rxTxBatchSize | The max number of packets to be received or sent in one batch. The default value is 64 |
AttachMode pcpp::XdpDevice::XdpDeviceConfiguration::attachMode |
AF_XDP operation mode
uint32_t pcpp::XdpDevice::XdpDeviceConfiguration::completionRingSize |
The size of the completion ring used by the AF_XDP socket. This size should be a power of two and less or equal to the total number of UMEM frames
uint32_t pcpp::XdpDevice::XdpDeviceConfiguration::fillRingSize |
The size of the fill ring used by the AF_XDP socket. This size should be a power of two and less or equal to the total number of UMEM frames
uint32_t pcpp::XdpDevice::XdpDeviceConfiguration::rxSize |
The size of the RX ring used by the AF_XDP socket. This size should be a power of two and less or equal to the total number of UMEM frames
uint16_t pcpp::XdpDevice::XdpDeviceConfiguration::rxTxBatchSize |
The max number of packets to be received or sent in one batch
uint32_t pcpp::XdpDevice::XdpDeviceConfiguration::txSize |
The size of the TX ring used by the AF_XDP socket. This size should be a power of two and less or equal to the total number of UMEM frames
uint16_t pcpp::XdpDevice::XdpDeviceConfiguration::umemFrameSize |
UMEM is a region of virtual contiguous memory, divided into equal-sized frames. This parameter determines the frame size that will be allocated. NOTE: the frame size should be equal to the memory page size (use getpagesize() to determine this size)
uint16_t pcpp::XdpDevice::XdpDeviceConfiguration::umemNumFrames |
UMEM is a region of virtual contiguous memory, divided into equal-sized frames. This parameter determines the number of frames that will be allocated as pert of the UMEM.