summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-04-11 09:45:52 +0200
committerJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-04-11 09:45:52 +0200
commitb6a602983716bb8ec2b34a288841c4ddafe0f210 (patch)
treec929d5e11ecff3535481389b6d5c606ba7d046b7
parentcba2796637e0cf635a4ca585135dc8cadc9c11ae (diff)
downloaddpdk-burst-replay-b6a602983716bb8ec2b34a288841c4ddafe0f210.zip
dpdk-burst-replay-b6a602983716bb8ec2b34a288841c4ddafe0f210.tar.gz
dpdk-burst-replay-b6a602983716bb8ec2b34a288841c4ddafe0f210.tar.xz
Add support for DPDK 16.11 (by using the correct API func to set the global log level depending on the version).
-rw-r--r--src/dpdk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dpdk.c b/src/dpdk.c
index 123eb7d..481e483 100644
--- a/src/dpdk.c
+++ b/src/dpdk.c
@@ -184,7 +184,13 @@ int init_dpdk_eal_mempool(const struct cmd_opts* opts,
if (!opts || !cpus || !dpdk)
return (EINVAL);
+ /* API BREAKAGE ON 17.05 */
+#if (defined RTE_VER_YEAR && RTE_VER_YEAR == 17 && defined RTE_VER_MONTH && RTE_VER_MONTH < 05) \
+ || defined RTE_VER_YEAR && RTE_VER_YEAR < 17
+ rte_set_log_level(RTE_LOG_ERR);
+#else /* if DPDK >= 17.05 */
rte_log_set_global_level(RTE_LOG_ERR);
+#endif
/* craft an eal arg list */
eal_args = fill_eal_args(opts, cpus, dpdk, &eal_args_ac);