Thread (1 message) 1 message, 1 author, 2020-09-14

Re: [dpdk-dev] [PATCH v1] app/test-pmd: fix meson build failed when used latency stats lib

From: Bruce Richardson <hidden>
Date: 2020-09-14 08:34:52

On Mon, Sep 14, 2020 at 09:00:19AM +0100, Yang, SteveX wrote:
Hi Bruce,
quoted
-----Original Message-----
From: Bruce Richardson <redacted>
Sent: Thursday, September 10, 2020 5:24 PM
To: Yang, SteveX <redacted>
Cc: dev@dpdk.org; Lu, Wenzhuo <redacted>; Xing, Beilei
[off-list ref]; Yang, Qiming [off-list ref]
Subject: Re: [dpdk-dev] [PATCH v1] app/test-pmd: fix meson build failed
when used latency stats lib

On Thu, Sep 10, 2020 at 02:20:18AM +0000, SteveX Yang wrote:
quoted
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 header file location and link library to meson.build of
test-pmd

Signed-off-by: SteveX Yang <redacted>
---
As before, I think we have a mismatch in old vs new macro names which is
why this wasn't caught before. Therefore I suggest we just change testpmd
to use the new macro to keep things standardized. [Other alternatives if we
want to keep compatibility are to rename the latencystats directory to have
an underscore in it, or to override the name (which I'd rather not go for)]
Got it, I can change the old macro to new one RTE_LIBRTE_LATENCYSTATS.
quoted
quoted
 app/test-pmd/meson.build | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build index
db0ff02eb..6ee7af750 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -9,6 +9,10 @@ if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
 cflags += '-I' + meson.source_root() + '/drivers/net/bonding'
 endif

+if dpdk_conf.has('RTE_LIBRTE_LATENCYSTATS')
+cflags += '-I' + meson.source_root() + '/lib/librte_latencystats'
+endif
+
Rather than working with long cflags, just add latencystats as a dependency
of testpmd.
If I add the latencystats as a dependency, that means the flag will be **always enabled** no matter if the RTE_LIBRTE_LATENCY_STATS flag is set from compiler cmdline.
Is it expected behavior for test-pmd app?
Not sure what you mean here, but so long as latency stats is available it
should be a dependency of testpmd, so that the functionality is available.

/Bruce
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help