diff --git a/code/bngblaster/src/bbl_config.c b/code/bngblaster/src/bbl_config.c index 03760ba1..9d1155f3 100644 --- a/code/bngblaster/src/bbl_config.c +++ b/code/bngblaster/src/bbl_config.c @@ -2113,6 +2113,7 @@ json_parse_config(json_t *root) #if BNGBLASTER_DPDK } else if(strcmp(s, "dpdk") == 0) { g_ctx->config.io_mode = IO_MODE_DPDK; + g_ctx->dpdk = true; #endif } else { fprintf(stderr, "Config error: Invalid value for interfaces->io-mode\n"); diff --git a/code/bngblaster/src/bbl_ctx.h b/code/bngblaster/src/bbl_ctx.h index 49019a18..edfff806 100644 --- a/code/bngblaster/src/bbl_ctx.h +++ b/code/bngblaster/src/bbl_ctx.h @@ -90,6 +90,7 @@ typedef struct bbl_ctx_ io_thread_s *io_threads; /* single linked list of threads */ bool tcp; + bool dpdk; bgp_session_s *bgp_sessions; bgp_raw_update_s *bgp_raw_updates; diff --git a/code/bngblaster/src/io/io_dpdk.c b/code/bngblaster/src/io/io_dpdk.c index 9f33d3e3..05ca05a2 100644 --- a/code/bngblaster/src/io/io_dpdk.c +++ b/code/bngblaster/src/io/io_dpdk.c @@ -33,6 +33,10 @@ io_dpdk_init() struct rte_eth_dev_info dev_info; + if(!g_ctx->dpdk) { + return true; + } + char *dpdk_args[2]; char **argv=dpdk_args;