[v2] app/test-pmd: fix meson build failed when used latency stats lib

Message ID 20200915020836.18396-1-stevex.yang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series [v2] app/test-pmd: fix meson build failed when used latency stats lib |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Steve Yang Sept. 15, 2020, 2:08 a.m. UTC
  meson build cannot find the header rte_latencystats.h when build DPDK
first time or never installed DPDK lib after build via meson/ninja.

Because the corresponding header directory isn't included after enabled
RTE_LIBRTE_LATENCY_STATS flag.

Add the lib 'latencystats' to deps of meson.build of test-pmd, the
corresponding header files will be included automatically.

Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation")

Signed-off-by: SteveX Yang <stevex.yang@intel.com>
---
v2:
removed long cflags and added 'latencystats' as a dependency of testpmd
---

 app/test-pmd/meson.build | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Ferruh Yigit Sept. 30, 2020, 4:25 p.m. UTC | #1
On 9/15/2020 3:08 AM, SteveX Yang wrote:
> meson build cannot find the header rte_latencystats.h when build DPDK
> first time or never installed DPDK lib after build via meson/ninja.
> 
> Because the corresponding header directory isn't included after enabled
> RTE_LIBRTE_LATENCY_STATS flag.
> 
> Add the lib 'latencystats' to deps of meson.build of test-pmd, the
> corresponding header files will be included automatically.
> 
> Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation")
> 
> Signed-off-by: SteveX Yang <stevex.yang@intel.com>
> ---
> v2:
> removed long cflags and added 'latencystats' as a dependency of testpmd

The code has 'RTE_LIBRTE_LATENCY_STATS' which needs to be updated.

But I see Bruce is working on a more generic solution:
https://patches.dpdk.org/project/dpdk/list/?series=12283

I will mark this one as superseded and will wait the Bruce's set for fix.
  

Patch

diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index ea56e547b..92b425c27 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -25,6 +25,9 @@  sources = files('5tswap.c',
 	'util.c')
 
 deps += ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci']
+if dpdk_conf.has('RTE_LIBRTE_LATENCYSTATS')
+	deps += 'latencystats'
+endif
 if dpdk_conf.has('RTE_LIBRTE_PDUMP')
 	deps += 'pdump'
 endif