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;
76 static bool m_IsDpdkInitialized;
77 static uint32_t m_MBufPoolSizePerDevice;
78 static CoreMask m_CoreMask;
79 std::vector<DpdkDevice*> m_DpdkDeviceList;
80 std::vector<DpdkWorkerThread*> m_WorkerThreads;
84 bool isInitialized()
const {
return (m_IsInitialized && m_IsDpdkInitialized); }
85 bool initDpdkDevices(uint32_t mBufPoolSizePerDevice);
86 static bool verifyHugePagesAndDpdkDriver();
88 static int dpdkWorkerThreadStart(
void* ptr);
101 if (!instance.isInitialized())
102 instance.initDpdkDevices(DpdkDeviceList::m_MBufPoolSizePerDevice);
127 static bool initDpdk(CoreMask coreMask, uint32_t mBufPoolSizePerDevice, uint8_t masterCore = 0);
134 DpdkDevice* getDeviceByPort(
int portId)
const;
141 DpdkDevice* getDeviceByPciAddress(
const std::string& pciAddr)
const;
170 bool writeDpdkLogToFile(FILE* logFile);
190 bool startDpdkWorkerThreads(CoreMask coreMask, std::vector<DpdkWorkerThread*>& workerThreadsVec);
196 void stopDpdkWorkerThreads();
The main namespace for the PcapPlusPlus lib.
virtual ~DpdkWorkerThread()
Definition: DpdkDeviceList.h:37
Definition: SystemUtils.h:27
static DpdkDeviceList & getInstance()
Definition: DpdkDeviceList.h:98
LogLevel
Definition: Logger.h:91
Definition: DpdkDeviceList.h:31
Definition: DpdkDevice.h:164
virtual uint32_t getCoreId() const =0
virtual bool run(uint32_t coreId)=0
Definition: KniDeviceList.h:22
Definition: DpdkDeviceList.h:71
const std::vector< DpdkDevice * > & getDpdkDeviceList() const
Definition: DpdkDeviceList.h:146