48 virtual bool run(uint32_t coreId) = 0;
81 static bool m_IsDpdkInitialized;
82 static uint32_t m_MBufPoolSizePerDevice;
83 static uint16_t m_MBufDataSize;
84 static CoreMask m_CoreMask;
85 std::vector<DpdkDevice*> m_DpdkDeviceList;
86 std::vector<DpdkWorkerThread*> m_WorkerThreads;
90 bool isInitialized()
const
92 return (m_IsInitialized && m_IsDpdkInitialized);
94 bool initDpdkDevices(uint32_t mBufPoolSizePerDevice, uint16_t mMbufDataSize);
95 static bool verifyHugePagesAndDpdkDriver();
97 static int dpdkWorkerThreadStart(
void* ptr);
111 if (!instance.isInitialized())
112 instance.initDpdkDevices(DpdkDeviceList::m_MBufPoolSizePerDevice, DpdkDeviceList::m_MBufDataSize);
147 static bool initDpdk(CoreMask coreMask, uint32_t mBufPoolSizePerDevice, uint16_t mBufDataSize = 0,
148 uint8_t masterCore = 0, uint32_t initDpdkArgc = 0,
char** initDpdkArgv =
nullptr,
149 const std::string& appName =
"pcapplusplusapp",
bool verifyHugePagesAndDriver =
true);
170 return m_DpdkDeviceList;
Definition: DpdkDevice.h:179
Definition: DpdkDeviceList.h:76
SystemCore getDpdkMasterCore() const
void stopDpdkWorkerThreads()
const std::vector< DpdkDevice * > & getDpdkDeviceList() const
Definition: DpdkDeviceList.h:168
DpdkDevice * getDeviceByPort(int portId) const
bool startDpdkWorkerThreads(CoreMask coreMask, std::vector< DpdkWorkerThread * > &workerThreadsVec)
static DpdkDeviceList & getInstance()
Definition: DpdkDeviceList.h:108
static bool initDpdk(CoreMask coreMask, uint32_t mBufPoolSizePerDevice, uint16_t mBufDataSize=0, uint8_t masterCore=0, uint32_t initDpdkArgc=0, char **initDpdkArgv=nullptr, const std::string &appName="pcapplusplusapp", bool verifyHugePagesAndDriver=true)
Logger::LogLevel getDpdkLogLevel() const
DpdkDevice * getDeviceByPciAddress(const std::string &pciAddr) const
void setDpdkLogLevel(Logger::LogLevel logLevel)
bool writeDpdkLogToFile(FILE *logFile)
Definition: DpdkDeviceList.h:34
virtual uint32_t getCoreId() const =0
virtual bool run(uint32_t coreId)=0
virtual ~DpdkWorkerThread()
Definition: DpdkDeviceList.h:39
Definition: KniDeviceList.h:24
LogLevel
Definition: Logger.h:147
The main namespace for the PcapPlusPlus lib.
Definition: SystemUtils.h:27