DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] app/test-pmd: fix meson build failed when used latency stats lib
@ 2020-09-10  2:20 SteveX Yang
  2020-09-10  9:23 ` Bruce Richardson
  2020-09-15  2:08 ` [dpdk-dev] [PATCH v2] " SteveX Yang
  0 siblings, 2 replies; 5+ messages in thread
From: SteveX Yang @ 2020-09-10  2:20 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, beilei.xing, qiming.yang, SteveX Yang

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 <stevex.yang@intel.com>
---
 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
+
 sources = files('5tswap.c',
 	'cmdline.c',
 	'cmdline_flow.c',
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1] app/test-pmd: fix meson build failed when used latency stats lib
  2020-09-10  2:20 [dpdk-dev] [PATCH v1] app/test-pmd: fix meson build failed when used latency stats lib SteveX Yang
@ 2020-09-10  9:23 ` Bruce Richardson
       [not found]   ` <DM6PR11MB4362CE65DBD5BA111A43A0FAF9230@DM6PR11MB4362.namprd11.prod.outlook.com>
  2020-09-15  2:08 ` [dpdk-dev] [PATCH v2] " SteveX Yang
  1 sibling, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2020-09-10  9:23 UTC (permalink / raw)
  To: SteveX Yang; +Cc: dev, wenzhuo.lu, beilei.xing, qiming.yang

On Thu, Sep 10, 2020 at 02:20:18AM +0000, 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 header file location and link library to meson.build of test-pmd
> 
> Signed-off-by: SteveX Yang <stevex.yang@intel.com>
> ---

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)]

>  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.

>  sources = files('5tswap.c',
>  	'cmdline.c',
>  	'cmdline_flow.c',
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1] app/test-pmd: fix meson build failed when used latency stats lib
       [not found]   ` <DM6PR11MB4362CE65DBD5BA111A43A0FAF9230@DM6PR11MB4362.namprd11.prod.outlook.com>
@ 2020-09-14  8:34     ` Bruce Richardson
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2020-09-14  8:34 UTC (permalink / raw)
  To: Yang, SteveX; +Cc: dev, Lu, Wenzhuo, Xing, Beilei, Yang, Qiming

On Mon, Sep 14, 2020 at 09:00:19AM +0100, Yang, SteveX wrote:
> Hi Bruce,
> 
> > -----Original Message-----
> > From: Bruce Richardson <bruce.richardson@intel.com>
> > Sent: Thursday, September 10, 2020 5:24 PM
> > To: Yang, SteveX <stevex.yang@intel.com>
> > Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>; Yang, Qiming <qiming.yang@intel.com>
> > 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:
> > > 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 <stevex.yang@intel.com>
> > > ---
> >
> > 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.
> 
> >
> > >  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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH v2] app/test-pmd: fix meson build failed when used latency stats lib
  2020-09-10  2:20 [dpdk-dev] [PATCH v1] app/test-pmd: fix meson build failed when used latency stats lib SteveX Yang
  2020-09-10  9:23 ` Bruce Richardson
@ 2020-09-15  2:08 ` SteveX Yang
  2020-09-30 16:25   ` Ferruh Yigit
  1 sibling, 1 reply; 5+ messages in thread
From: SteveX Yang @ 2020-09-15  2:08 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, wenzhuo.lu, beilei.xing, qiming.yang, SteveX Yang

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(+)

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
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] app/test-pmd: fix meson build failed when used latency stats lib
  2020-09-15  2:08 ` [dpdk-dev] [PATCH v2] " SteveX Yang
@ 2020-09-30 16:25   ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2020-09-30 16:25 UTC (permalink / raw)
  To: SteveX Yang, dev, Bruce Richardson
  Cc: bruce.richardson, wenzhuo.lu, beilei.xing, qiming.yang

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-30 16:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10  2:20 [dpdk-dev] [PATCH v1] app/test-pmd: fix meson build failed when used latency stats lib SteveX Yang
2020-09-10  9:23 ` Bruce Richardson
     [not found]   ` <DM6PR11MB4362CE65DBD5BA111A43A0FAF9230@DM6PR11MB4362.namprd11.prod.outlook.com>
2020-09-14  8:34     ` Bruce Richardson
2020-09-15  2:08 ` [dpdk-dev] [PATCH v2] " SteveX Yang
2020-09-30 16:25   ` Ferruh Yigit

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git