projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #2907 from Stackdriver/pkg-fix
[collectd.git]
/
src
/
utils_dpdk.c
diff --git
a/src/utils_dpdk.c
b/src/utils_dpdk.c
index
1d4668f
..
aee9791
100644
(file)
--- 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) {
}
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();
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",
if (ports == 0) {
ERROR(
"%s:%d: No DPDK ports available. Check bound devices to DPDK driver.\n",