PcapPlusPlus
21.05
|
#include <DpdkDevice.h>
Public Member Functions | |
DpdkDeviceConfiguration (uint16_t receiveDescriptorsNumber=128, uint16_t transmitDescriptorsNumber=512, uint16_t flushTxBufferTimeout=100, uint64_t rssHashFunction=RSS_IPV4|RSS_IPV6, uint8_t *rssKey=DpdkDevice::m_RSSKey, uint8_t rssKeyLength=40) | |
Public Attributes | |
uint16_t | receiveDescriptorsNumber |
uint16_t | transmitDescriptorsNumber |
uint16_t | flushTxBufferTimeout |
uint8_t * | rssKey |
uint8_t | rssKeyLength |
uint64_t | rssHashFunction |
A struct that contains user configurable parameters for opening a DpdkDevice. All of these parameters have default values so the user doesn't have to use these parameters or understand exactly what is their effect
|
inline |
A c'tor for this struct
[in] | receiveDescriptorsNumber | An optional parameter for defining the number of RX descriptors that will be allocated for each RX queue. Default value is 128 |
[in] | transmitDescriptorsNumber | An optional parameter for defining the number of TX descriptors that will be allocated for each TX queue. Default value is 512 |
[in] | flushTxBufferTimeout | An optional parameter for setting TX buffer timeout in usec. Default value is 100 usec |
[in] | rssHashFunction | This parameter enable to configure the types of packets to which the RSS hashing must be applied. The value provided here should be a mask composed of hash functions described in DpdkRssHashFunction enum. The default value is IPv4 and IPv6 |
[in] | rssKey | A pointer to an array holding the RSS key to use for hashing specific header of received packets. If not specified, there is a default key defined inside DpdkDevice |
[in] | rssKeyLength | The length in bytes of the array pointed by rssKey. Default value is the length of default rssKey |
uint16_t pcpp::DpdkDevice::DpdkDeviceConfiguration::flushTxBufferTimeout |
Set the TX buffer flush timeout in millisecond (only relevant if sending packets using DPDK TX buffer mechanism). A value of zero means no timeout
uint16_t pcpp::DpdkDevice::DpdkDeviceConfiguration::receiveDescriptorsNumber |
When configuring a DPDK RX queue, DPDK creates descriptors it will use for receiving packets from the network to this RX queue. This parameter enables to configure the number of descriptors that will be created for each RX queue
uint64_t pcpp::DpdkDevice::DpdkDeviceConfiguration::rssHashFunction |
This parameter enables to configure the types of packets to which the RSS hashing must be applied. The value is a mask composed of hash functions described in DpdkRssHashFunction enum. Supplying a value equal to zero disables the RSS feature. Supplying a value equal to -1 enables all hash functions supported by this PMD
uint8_t* pcpp::DpdkDevice::DpdkDeviceConfiguration::rssKey |
When configuring a DPDK device, DPDK supports to activate the Receive Side Scaling (RSS) feature to distribute traffic between the RX queues This parameter points to an array holding the RSS key to use for hashing specific header fields of received packets. The length of this array should be indicated by rssKeyLength below. Supplying a NULL value causes a default random hash key to be used by the device driver
uint8_t pcpp::DpdkDevice::DpdkDeviceConfiguration::rssKeyLength |
This parameter indicates the length in bytes of the array pointed by rssKey. This length will be checked in i40e only. Others assume 40 bytes to be used.
uint16_t pcpp::DpdkDevice::DpdkDeviceConfiguration::transmitDescriptorsNumber |
When configuring a DPDK TX queue, DPDK creates descriptors it will use for transmitting packets to the network through this TX queue. This parameter enables to configure the number of descriptors that will be created for each TX queue