X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdpdkstat.c;h=cc525e82c7b08d1bb7dae201144be0ddce92172b;hb=8858811d487e8edc576ff7b0216d663949055a66;hp=6b057f214e3276412dd56a3aa402048c6bb6d369;hpb=64b8150edec2271bb110f36e70915fdd87d9cac2;p=collectd.git diff --git a/src/dpdkstat.c b/src/dpdkstat.c index 6b057f21..cc525e82 100644 --- a/src/dpdkstat.c +++ b/src/dpdkstat.c @@ -103,6 +103,8 @@ static void dpdk_stats_default_config(void) { for (int i = 0; i < RTE_MAX_ETHPORTS; i++) { ec->config.port_name[i][0] = 0; } + /* Enable all ports by default */ + ec->config.enabled_port_mask = ~0; } static int dpdk_stats_preinit(void) { @@ -251,7 +253,7 @@ static int dpdk_helper_stats_count_get(dpdk_helper_ctx_t *phc) { } static int dpdk_stats_get_size(dpdk_helper_ctx_t *phc) { - return (dpdk_helper_data_size_get(phc) - sizeof(dpdk_stats_ctx_t)); + return dpdk_helper_data_size_get(phc) - sizeof(dpdk_stats_ctx_t); } int dpdk_helper_command_handler(dpdk_helper_ctx_t *phc, enum DPDK_CMD cmd) {