summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-04-11 15:20:28 +0200
committerJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-04-11 15:20:28 +0200
commit838a40330167384f9d9a1981edea6f4a84da5fca (patch)
treeda7e9d925e331f8ba600f7689f229555b0790d6f
parentf5d5f0662ea88a15a5812178ff86b1a4297adad6 (diff)
downloaddpdk-burst-replay-wip-18.11.zip
dpdk-burst-replay-wip-18.11.tar.gz
dpdk-burst-replay-wip-18.11.tar.xz
use the macro for API version checkwip-18.11
-rw-r--r--src/dpdk.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/dpdk.c b/src/dpdk.c
index 309a8b0..955763b 100644
--- a/src/dpdk.c
+++ b/src/dpdk.c
@@ -207,9 +207,7 @@ int init_dpdk_eal_mempool(const struct cmd_opts* opts,
}
/* check that dpdk detects all wanted/needed NIC ports */
- /* API BREAKAGE ON 18.05 */
-#if (defined RTE_VER_YEAR && RTE_VER_YEAR == 18 && defined RTE_VER_MONTH && RTE_VER_MONTH <= 02) \
- || defined RTE_VER_YEAR && RTE_VER_YEAR < 18
+#if API_OLDEST_THAN(18, 05) /* API BREAKAGE ON 18.05 */
nb_ports = rte_eth_dev_count();
#else /* if DPDK >= 18.05 */
nb_ports = rte_eth_dev_count_avail();