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);
const std::vector< DpdkDevice * > & getDpdkDeviceList()
Definition: DpdkDeviceList.h:144
Definition: DpdkDeviceList.h:70
virtual bool run(uint32_t coreId)=0
The main namespace for the PcapPlusPlus lib.
DpdkDevice * getDeviceByPort(int portId)
Definition: SystemUtils.h:32
Definition: DpdkDeviceList.h:31
Definition: DpdkDevice.h:389
virtual ~DpdkWorkerThread()
Definition: DpdkDeviceList.h:37
bool writeDpdkLogToFile(FILE *logFile)
LogLevel
Definition: Logger.h:83
void setDpdkLogLevel(LoggerPP::LogLevel logLevel)
void stopDpdkWorkerThreads()
static DpdkDeviceList & getInstance()
Definition: DpdkDeviceList.h:96
LoggerPP::LogLevel getDpdkLogLevel()
virtual uint32_t getCoreId()=0
DpdkDevice * getDeviceByPciAddress(const PciAddress &pciAddr)
bool startDpdkWorkerThreads(CoreMask coreMask, std::vector< DpdkWorkerThread *> &workerThreadsVec)
static bool initDpdk(CoreMask coreMask, uint32_t mBufPoolSizePerDevice, uint8_t masterCore=0)
SystemCore getDpdkMasterCore()
Definition: DpdkDevice.h:302