From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 19628A04B5; Thu, 10 Sep 2020 11:17:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 62F311BEB3; Thu, 10 Sep 2020 11:17:04 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 0CA681DB8 for ; Thu, 10 Sep 2020 11:17:02 +0200 (CEST) IronPort-SDR: MA4dLgNQBIium2OOlOfPMQocgk7fefyodc8RTC1mHlW+1ZMMAa/RTXg8JTTyLigtzXmSE+ImCR hL+doRl4Zb8g== X-IronPort-AV: E=McAfee;i="6000,8403,9739"; a="146202673" X-IronPort-AV: E=Sophos;i="5.76,412,1592895600"; d="scan'208";a="146202673" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2020 02:17:02 -0700 IronPort-SDR: C3ZSQgvHf5Ky6gSZMpoc4nMsV5o7EmA5fYtuJSiPoUgVm8obA0gAJS5JrOMi1P39EB8BR/vq1i zIuN352H7Irg== X-IronPort-AV: E=Sophos;i="5.76,412,1592895600"; d="scan'208";a="480817043" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.5.251]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 10 Sep 2020 02:17:00 -0700 Date: Thu, 10 Sep 2020 10:16:57 +0100 From: Bruce Richardson To: SteveX Yang Cc: dev@dpdk.org, wenzhuo.lu@intel.com, beilei.xing@intel.com, qiming.yang@intel.com Message-ID: <20200910091657.GC1789@bricha3-MOBL.ger.corp.intel.com> References: <20200910015525.59124-1-stevex.yang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910015525.59124-1-stevex.yang@intel.com> Subject: Re: [dpdk-dev] [PATCH v1] app/test-pmd: fix meson build failed when enabled pmd_bonded X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > --- 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 >