1 #ifndef PCAPPP_DPDK_DEVICE_LIST 2 #define PCAPPP_DPDK_DEVICE_LIST 44 virtual bool run(uint32_t coreId) = 0;
51 virtual void stop() = 0;
77 static bool m_IsDpdkInitialized;
78 static uint32_t m_MBufPoolSizePerDevice;
79 static CoreMask m_CoreMask;
80 std::vector<DpdkDevice*> m_DpdkDeviceList;
81 std::vector<DpdkWorkerThread*> m_WorkerThreads;
85 bool isInitialized()
const {
return (m_IsInitialized && m_IsDpdkInitialized); }
86 bool initDpdkDevices(uint32_t mBufPoolSizePerDevice);
87 static bool verifyHugePagesAndDpdkDriver();
89 static int dpdkWorkerThreadStart(
void* ptr);
102 if (!instance.isInitialized())
103 instance.initDpdkDevices(DpdkDeviceList::m_MBufPoolSizePerDevice);
130 static bool initDpdk(CoreMask coreMask, uint32_t mBufPoolSizePerDevice, uint8_t masterCore = 0, uint32_t initDpdkArgc = 0,
char **initDpdkArgv = NULL);
137 DpdkDevice* getDeviceByPort(
int portId)
const;
144 DpdkDevice* getDeviceByPciAddress(
const std::string& pciAddr)
const;
173 bool writeDpdkLogToFile(FILE* logFile);
193 bool startDpdkWorkerThreads(CoreMask coreMask, std::vector<DpdkWorkerThread*>& workerThreadsVec);
199 void stopDpdkWorkerThreads();
The main namespace for the PcapPlusPlus lib.
LogLevel
Definition: Logger.h:110
virtual ~DpdkWorkerThread()
Definition: DpdkDeviceList.h:37
Definition: SystemUtils.h:27
static DpdkDeviceList & getInstance()
Definition: DpdkDeviceList.h:99
Definition: DpdkDeviceList.h:31
Definition: DpdkDevice.h:167
virtual uint32_t getCoreId() const =0
virtual bool run(uint32_t coreId)=0
Definition: KniDeviceList.h:22
Definition: DpdkDeviceList.h:72
const std::vector< DpdkDevice * > & getDpdkDeviceList() const
Definition: DpdkDeviceList.h:149