X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Futils_dpdk.c;h=aee97917882c7461987a5bdc83075365cec86cb2;hp=1d4668f3fc96f1be3be1968437b9c4c0121ae012;hb=74ee9a04ef5785b31d1acbfdcbcece3370668cfe;hpb=00efe8abe8210b6d32361ccc47eda4bf8aaade6a diff --git a/src/utils_dpdk.c b/src/utils_dpdk.c index 1d4668f3..aee97917 100644 --- a/src/utils_dpdk.c +++ b/src/utils_dpdk.c @@ -853,7 +853,11 @@ uint128_t str_to_uint128(const char *str, int len) { } 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",