X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_dpdk.c;h=aee97917882c7461987a5bdc83075365cec86cb2;hb=733fc645b6389d1f42aef8f1c1631f1db7d58196;hp=adc5530696bfcf3864a3a3e832665aefecabe4cd;hpb=182556dd5a43942797591f0f49ac6f488c07010d;p=collectd.git diff --git a/src/utils_dpdk.c b/src/utils_dpdk.c index adc55306..aee97917 100644 --- a/src/utils_dpdk.c +++ b/src/utils_dpdk.c @@ -852,8 +852,12 @@ uint128_t str_to_uint128(const char *str, int len) { return lcore_mask; } -uint8_t dpdk_helper_eth_dev_count() { +uint8_t dpdk_helper_eth_dev_count(void) { +#if RTE_VERSION < RTE_VERSION_NUM(18, 05, 0, 0) uint8_t ports = rte_eth_dev_count(); +#else + uint8_t ports = rte_eth_dev_count_avail(); +#endif if (ports == 0) { ERROR( "%s:%d: No DPDK ports available. Check bound devices to DPDK driver.\n",