X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_dpdk.c;h=07ec8aeedbdc6250064ec84ee684aa4526594fcf;hb=6f7193eb7af4a76239332988ac2803eb2ce361d9;hp=30a10574e973e3a6a6e9fef3c99b679ee5e0ab88;hpb=0b7cd83a5e6bac068ea83a88a5ddcfb07c09fbec;p=collectd.git diff --git a/src/utils_dpdk.c b/src/utils_dpdk.c index 30a10574..07ec8aee 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() { +#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",