Commit 87defd20 authored by Georgios Katsikas's avatar Georgios Katsikas Committed by Tom Barbette

Static initialize DPDK only if enabled

Signed-off-by: Georgios Katsikas's avatarGeorgios Katsikas <katsikas.gp@gmail.com>
parent 98c74e63
......@@ -35,6 +35,9 @@
#include <click/notifier.hh>
#include <click/nameinfo.hh>
#include <click/bighashmap_arena.hh>
#if HAVE_DPDK
#include <click/dpdkdevice.hh>
#endif
#if HAVE_NETMAP_PACKET_POOL
#include <click/netmapdevice.hh>
#endif
......@@ -1169,10 +1172,12 @@ Router::initialize(ErrorHandler *errh)
}
}
#if HAVE_DPDK
if (all_ok) {
//DPDK initialization may be affected by some configuration and needed by some element initialization (Packet::make with --enable-dpdk-packet-pool)
all_ok = DPDKDevice::static_initialize(ErrorHandler::default_handler()) == 0;
}
#endif
#if HAVE_BATCH
if (all_ok) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment