DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: SteveX Yang <stevex.yang@intel.com>
Cc: dev@dpdk.org, wenzhuo.lu@intel.com, beilei.xing@intel.com,
	qiming.yang@intel.com
Subject: Re: [dpdk-dev] [PATCH v1] app/test-pmd: fix meson build failed when enabled pmd_bonded
Date: Thu, 10 Sep 2020 10:16:57 +0100	[thread overview]
Message-ID: <20200910091657.GC1789@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20200910015525.59124-1-stevex.yang@intel.com>

On Thu, Sep 10, 2020 at 01:55:25AM +0000, SteveX Yang wrote:
> meson build cannot find the header rte_eth_bond.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_PMD_BOND macro.
> 
> Add the header file location and link library to meson.build of test-pmd
> 
> Signed-off-by: SteveX Yang <stevex.yang@intel.com>
> ---

While there is a problem here, I think the solution may itself be
incomplete. Since the bonding PMD is always enabled by default, it's
support should always be enabled in testpmd. Therefore, testpmd should be
using the RTE_LIBRTE_BOND_PMD macro internally, not RTE_LIBRTE_PMD_BOND
one.  Once that macro is changed, the issue you report becomes generally
visible.

>  app/test-pmd/meson.build | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
> index ea56e547b..db0ff02eb 100644
> --- a/app/test-pmd/meson.build
> +++ b/app/test-pmd/meson.build
> @@ -4,6 +4,11 @@
>  # override default name to drop the hyphen
>  name = 'testpmd'
>  cflags += '-Wno-deprecated-declarations'
> +
> +if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
> +	cflags += '-I' + meson.source_root() + '/drivers/net/bonding'
> +endif
> +

Don't need this block. Adding the dependency automatically pulls in header
paths.

>  sources = files('5tswap.c',
>  	'cmdline.c',
>  	'cmdline_flow.c',
> @@ -25,6 +30,11 @@ sources = files('5tswap.c',
>  	'util.c')
>  
>  deps += ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci']
> +
> +if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
> +	deps += 'pmd_bond'
> +endif
> +

The code is right, but just note that the other blocks like this aren't
separated by whitespace. Since they are quite readable as they are, I'd
avoid adding in the unnecessary whitespace and just keep it consistent.

>  if dpdk_conf.has('RTE_LIBRTE_PDUMP')
>  	deps += 'pdump'
>  endif
> -- 
> 2.17.1
> 

  reply	other threads:[~2020-09-10  9:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10  1:55 SteveX Yang
2020-09-10  9:16 ` Bruce Richardson [this message]
2020-09-10 11:12   ` Bruce Richardson
2020-09-11  5:58 ` [dpdk-dev] [PATCH v2] " SteveX Yang
2020-09-11  7:23   ` Yang, Qiming
2020-09-11  7:43   ` David Marchand
2020-09-11  8:36     ` Bruce Richardson
     [not found]       ` <DM6PR11MB436292727A47B651746AB246F9240@DM6PR11MB4362.namprd11.prod.outlook.com>
2020-09-11  9:40         ` Bruce Richardson
     [not found]           ` <DM6PR11MB4362CF8D42FE275B79B84978F9230@DM6PR11MB4362.namprd11.prod.outlook.com>
2020-09-14  8:33             ` Bruce Richardson
2020-09-14 16:24             ` Bruce Richardson
2020-09-11 11:32     ` David Marchand
2020-09-11 14:45       ` Bruce Richardson
2020-09-14  8:46         ` David Marchand
2020-09-16 16:46       ` Richardson, Bruce
2020-09-15  2:24   ` [dpdk-dev] [PATCH v3] " SteveX Yang
2020-09-30 16:29     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200910091657.GC1789@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=qiming.yang@intel.com \
    --cc=stevex.yang@intel.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).