init DPDK only if needed

This commit is contained in:
Christian Giese
2022-10-10 13:36:01 +00:00
committed by Christian Giese
parent 4cd19455e3
commit d339dfdac9
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -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");
+1
View File
@@ -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;
+4
View File
@@ -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;