File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ add_library(ipfixprobe-input-dpdk MODULE
1616 ../parser/parser.cpp
1717 ../parser/parser.hpp
1818)
19+ option (DPDK_PCAP_ENABLED "Enable dpdk pcap (dpdk-dumpcap)" OFF )
20+
21+ if (DPDK_PCAP_ENABLED)
22+ target_compile_definitions (ipfixprobe-input-dpdk PRIVATE DPDK_PCAP_ENABLED )
23+ endif ()
1924
2025set_target_properties (ipfixprobe-input-dpdk PROPERTIES
2126 CXX_VISIBILITY_PRESET hidden
Original file line number Diff line number Diff line change 3434#include < rte_errno.h>
3535#include < rte_version.h>
3636#include < unistd.h>
37+ #ifdef DPDK_DUMP_ENABLED
38+ #include < rte_pdump.h>
39+ #endif
3740
3841namespace ipxp {
3942
@@ -107,6 +110,8 @@ void DpdkDevice::recognizeDriver()
107110 }
108111 std::cerr << " \t Detected HW timestamp capability: " << (m_supportedHWTimestamp ? " yes" : " no" )
109112 << std::endl;
113+
114+
110115}
111116
112117void DpdkDevice::registerRxTimestamp ()
@@ -273,6 +278,13 @@ void DpdkDevice::enablePort()
273278 }
274279
275280 std::cerr << " DPDK input at port " << m_portID << " started." << std::endl;
281+
282+ #ifdef DPDK_DUMP_ENABLED
283+ rte_pdump_init (); // Initialize packet dump framework
284+ if (rte_pdump_enable (m_portID, 0 , 0 ) < 0 ) {
285+ std::cerr << " Failed to enable pdump on port " << m_portID << std::endl;
286+ }
287+ #endif
276288}
277289
278290uint16_t DpdkDevice::receive (DpdkMbuf& dpdkMuf, uint16_t rxQueueID)
You can’t perform that action at this time.
0 commit comments