diff mbox series

[v5,4/5] app/testpmd: add jansson library

Message ID 20211012125433.31647-5-viacheslavo@nvidia.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series ethdev: introduce configurable flexible item | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Slava Ovsiienko Oct. 12, 2021, 12:54 p.m. UTC
From: Gregory Etelson <getelson@nvidia.com>

Testpmd interactive mode provides CLI to configure application
commands. Testpmd reads CLI command and parameters from STDIN, and
converts input into C objects with internal parser.
The patch adds jansson dependency to testpmd.
With jansson, testpmd can read input in JSON format from STDIN or input
file and convert it into C object using jansson library calls.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
 app/test-pmd/meson.build | 5 +++++
 app/test-pmd/testpmd.h   | 3 +++
 2 files changed, 8 insertions(+)
diff mbox series


diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index 98f3289bdf..3a8babd604 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -61,3 +61,8 @@  if dpdk_conf.has('RTE_LIB_BPF')
     sources += files('bpf_cmd.c')
     deps += 'bpf'
+jansson_dep = dependency('jansson', required: false, method: 'pkg-config')
+if jansson_dep.found()
+    dpdk_conf.set('RTE_HAS_JANSSON', 1)
+    ext_deps += jansson_dep
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 5863b2f43f..876a341cf0 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -14,6 +14,9 @@ 
 #include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
+#include <jansson.h>
 #define RTE_PORT_ALL            (~(portid_t)0x0)