Commit 540bc030 authored by Tom Barbette's avatar Tom Barbette

Error if --enable-dpdk-pool without launching with --dpdk

parent 87defd20
Pipeline #1769 passed with stage
in 11 minutes and 30 seconds
......@@ -417,6 +417,9 @@ int DPDKDevice::add_tx_queue(int &queue_id, unsigned n_desc,
int DPDKDevice::static_initialize(ErrorHandler* errh) {
#if HAVE_DPDK_PACKET_POOL
if (!dpdk_enabled) {
return errh->error("You must start Click with --dpdk option when compiling with --enable-dpdk-pool");
}
if (!alloc_pktmbufs()) {
errh->error("Could not allocate packet MBuf pools : error %d (%s)",rte_errno,rte_strerror(rte_errno));
if (rte_errno == 12) {
......@@ -454,7 +457,7 @@ int DPDKDevice::initialize(ErrorHandler *errh)
return errh->error("Cannot find DPDK port %u", it.key());
err = static_initialize(errh);
if (!err)
if (err != 0)
return err;
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
......
......@@ -1174,7 +1174,7 @@ 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)
//DPDK initialization may be affected by some configuration and needed by some element initialization (Packet::make with --enable-dpdk-pool)
all_ok = DPDKDevice::static_initialize(ErrorHandler::default_handler()) == 0;
}
#endif
......
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