1 #ifndef PCAPPP_DPDK_DEVICE_LIST 2 #define PCAPPP_DPDK_DEVICE_LIST 44 virtual bool run(uint32_t coreId) = 0;
50 virtual void stop() = 0;
74 static bool m_IsDpdkInitialized;
75 static uint32_t m_MBufPoolSizePerDevice;
76 static CoreMask m_CoreMask;
77 std::vector<DpdkDevice*> m_DpdkDeviceList;
78 std::vector<DpdkWorkerThread*> m_WorkerThreads;
82 inline bool isInitialized() {
return (m_IsInitialized && m_IsDpdkInitialized); }
83 bool initDpdkDevices(uint32_t mBufPoolSizePerDevice);
84 static bool verifyHugePagesAndDpdkDriver();
86 static int dpdkWorkerThreadStart(
void *ptr);
99 if (!instance.isInitialized())
100 instance.initDpdkDevices(DpdkDeviceList::m_MBufPoolSizePerDevice);
125 static bool initDpdk(CoreMask coreMask, uint32_t mBufPoolSizePerDevice, uint8_t masterCore = 0);
virtual bool run(uint32_t coreId)=0
bool startDpdkWorkerThreads(CoreMask coreMask, std::vector< DpdkWorkerThread *> &workerThreadsVec)
LogLevel
Definition: Logger.h:85
LoggerPP::LogLevel getDpdkLogLevel()
const std::vector< DpdkDevice * > & getDpdkDeviceList()
Definition: DpdkDeviceList.h:144
DpdkDevice * getDeviceByPort(int portId)
Definition: DpdkDeviceList.h:31
Definition: SystemUtils.h:32
virtual ~DpdkWorkerThread()
Definition: DpdkDeviceList.h:37
bool writeDpdkLogToFile(FILE *logFile)
DpdkDevice * getDeviceByPciAddress(const std::string &pciAddr)
void setDpdkLogLevel(LoggerPP::LogLevel logLevel)
Definition: DpdkDevice.h:334
void stopDpdkWorkerThreads()
static DpdkDeviceList & getInstance()
Definition: DpdkDeviceList.h:96
virtual uint32_t getCoreId()=0
Definition: DpdkDeviceList.h:70
static bool initDpdk(CoreMask coreMask, uint32_t mBufPoolSizePerDevice, uint8_t masterCore=0)
SystemCore getDpdkMasterCore()
The main namespace for the PcapPlusPlus lib.