app/test-pmd: fix meson build failed when enabled pmd_bonded
PATCH 1/1 app/test-pmd: fix meson build failed when enabled pmd_bonded
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
--- app/test-pmd/meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+)
app/test-pmd/meson.build +10 -0
@@ -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 + 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 + if dpdk_conf.has('RTE_LIBRTE_PDUMP') deps += 'pdump' endif
Signature · 1 line
2.17.1
Quoted 10 lines · SteveX Yang
meson build cannot find the header
rte_eth_bond.hwhen 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_BONDmacro.Add the header file location and link library to meson.build of test-pmd
Signed-off-by SteveX Yang <[email protected]>---
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.
Quoted 8 lines
app/test-pmd/meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+)app/test-pmd/meson.build +0
-0
app/test-pmd/meson.build line 11
Quoted 8 lines
app/test-pmd/meson.build +5
-0@@ -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.
app/test-pmd/meson.build sources = files('5tswap.c', · line 37
Quoted 12 lines
app/test-pmd/meson.build +5
-0sources = 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.
Quoted 6 lines
app/test-pmd/meson.build +0
-0if dpdk_conf.has('RTE_LIBRTE_PDUMP') deps += 'pdump' endifSignature · 1 line
2.17.1
Quoted 12 lines · Bruce Richardson
Quoted 10 lines · SteveX Yang
meson build cannot find the header
rte_eth_bond.hwhen 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_BONDmacro.Add the header file location and link library to meson.build of test-pmd
Signed-off-by SteveX Yang <[email protected]>---
Quoted 7 lines
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_PMDmacro internally, notRTE_LIBRTE_PMD_BONDone. Once that macro is changed, the issue you report becomes generally visible.
I also think a release note entry about the macro change would be good. Similarly for the latency stats one, depending on the fix chosen.
PATCH v2 1/1 app/test-pmd: fix meson build failed when enabled pmd_bonded
In reply to SteveX YangThe depended pmd bond is missing for test-pmd. Add the pmd_bond to deps, and replace the relative MACRO name with new RTE_LIBRTE_BOND_PMD.
---v1->v2:
* replaced the bond pmd MACRO with the new one;
* removed header paths cflags of bond pmd;
--- app/test-pmd/cmdline.c | 10 +++++----- app/test-pmd/meson.build | 3 +++ app/test-pmd/parameters.c | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-)
app/test-pmd/cmdline.c +5 -5
@@ -50,7 +50,7 @@#include <cmdline_parse_etheraddr.h> #include <cmdline_socket.h> #include <cmdline.h> -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD #include <rte_eth_bond.h> #include <rte_eth_bond_8023ad.h> #endif
@@ -603,7 +603,7 @@ static void cmd_help_long_parsed(void *parsed_result," Show the bypass configuration for a bypass enabled NIC" " using the lowest port on the NIC.\n\n" -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD"create bonded device (mode) (socket)\n" " Create a new bonded device with specific bonding mode and socket.\n\n"
@@ -5738,7 +5738,7 @@ cmdline_parse_inst_t cmd_show_bypass_config = { }, }; -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD /* *** SET BONDING MODE *** */ struct cmd_set_bonding_mode_result { cmdline_fixed_string_t set;
@@ -6508,7 +6508,7 @@ cmdline_parse_inst_t cmd_set_bonding_agg_mode_policy = { }; -#endif /* RTE_LIBRTE_PMD_BOND */ +#endif /* RTE_LIBRTE_BOND_PMD */ /* *** SET FORWARDING MODE *** */ struct cmd_set_fwd_mode_result {
@@ -19520,7 +19520,7 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_set_bypass_event, (cmdline_parse_inst_t *)&cmd_set_bypass_timeout, (cmdline_parse_inst_t *)&cmd_show_bypass_config, -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD (cmdline_parse_inst_t *) &cmd_set_bonding_mode, (cmdline_parse_inst_t *) &cmd_show_bonding_config, (cmdline_parse_inst_t *) &cmd_set_bonding_primary,
app/test-pmd/meson.build +3 -0
@@ -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_BOND_PMD') + deps += 'pmd_bond' +endif if dpdk_conf.has('RTE_LIBRTE_PDUMP') deps += 'pdump' endif
app/test-pmd/parameters.c +1 -1
@@ -39,7 +39,7 @@#include <rte_ether.h> #include <rte_ethdev.h> #include <rte_string_fns.h> -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD #include <rte_eth_bond.h> #endif #include <rte_flow.h>
Signature · 1 line
2.17.1
Quoted 12 lines
-----Original Message-----
From: Yang, SteveX <[email protected]>
Sent: Friday, September 11, 2020 13:58
To: [email protected]
Cc: Richardson, Bruce <[email protected]>; Lu, Wenzhuo <[email protected]>; Xing, Beilei <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>
Subject: [PATCH v2] app/test-pmd: fix meson build failed when enabledpmd_bonded
Quoted 5 lines
The depended pmd bond is missing for test-pmd. Add the
pmd_bondto deps, and replace the relative MACRO name with newRTE_LIBRTE_BOND_PMD.Signed-off-by SteveX Yang <[email protected]>
Fix line miss
Quoted 92 lines
---
v1->v2:
* replaced the bond pmd MACRO with the new one;
* removed header paths cflags of bond pmd;--- app/test-pmd/cmdline.c | 10 +++++----- app/test-pmd/meson.build | 3 +++ app/test-pmd/parameters.c | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
0f33948e8..4ddc557af100644app/test-pmd/cmdline.c +1
-1@@ -50,7 +50,7 @@#include <cmdline_parse_etheraddr.h> #include <cmdline_socket.h> #include <cmdline.h> -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD #include <rte_eth_bond.h> #include <rte_eth_bond_8023ad.h> #endif @@ -603,7 +603,7 @@ static void cmd_help_long_parsed(void *parsed_result, " Show the bypass configuration for a bypassenabled NIC"
app/test-pmd/cmdline.c +1
-1" using the lowest port on the NIC.\n\n" -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD"create bonded device (mode) (socket)\n" " Create a new bonded device with specificbonding mode and socket.\n\n"
app/test-pmd/cmdline.c +1
-1@@ -5738,7 +5738,7 @@ cmdline_parse_inst_t cmd_show_bypass_config = { }, }; -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD /* *** SET BONDING MODE *** */ struct cmd_set_bonding_mode_result {app/test-pmd/cmdline.c +1
-1cmdline_fixed_string_t set;@@ -6508,7 +6508,7 @@ cmdline_parse_inst_t cmd_set_bonding_agg_mode_policy = { }; -#endif /* RTE_LIBRTE_PMD_BOND */ +#endif /* RTE_LIBRTE_BOND_PMD */ /* *** SET FORWARDING MODE *** */ struct cmd_set_fwd_mode_result {@@ -19520,7 +19520,7 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_set_bypass_event, (cmdline_parse_inst_t *)&cmd_set_bypass_timeout, (cmdline_parse_inst_t *)&cmd_show_bypass_config, -#ifdef
RTE_LIBRTE_PMD_BONDapp/test-pmd/cmdline.c +1
-0+#ifdef RTE_LIBRTE_BOND_PMD (cmdline_parse_inst_t *) &cmd_set_bonding_mode, (cmdline_parse_inst_t *) &cmd_show_bonding_config, (cmdline_parse_inst_t *) &cmd_set_bonding_primary, diff --gita/app/test-pmd/meson.build b/app/test-pmd/meson.build index
ea56e547b..7ad87d010100644app/test-pmd/meson.build +3
-0@@ -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_BOND_PMD') + deps += 'pmd_bond' +endif if dpdk_conf.has('RTE_LIBRTE_PDUMP') deps += 'pdump' endifapp/test-pmd/parameters.c index renamed from app/test-pmd/parameters.c +0
-0784515314..6402c9c12 100644
app/test-pmd/parameters.c +1
-2@@ -39,7 +39,7 @@#include <rte_ether.h> #include <rte_ethdev.h> #include <rte_string_fns.h> -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD #include <rte_eth_bond.h> #endif #include <rte_flow.h> --2.17.1
Quoted 3 lines · SteveX Yang
The depended pmd bond is missing for test-pmd. Add the
pmd_bondto deps, and replace the relative MACRO name with newRTE_LIBRTE_BOND_PMD.
meson changed the name of the driver define (when compared to make). We can't backport this patch.
How/who will fix this in stable branches?
Signature · 1 line
David Marchand
Quoted 10 lines · David Marchand
Quoted 3 lines · SteveX Yang
The depended pmd bond is missing for test-pmd. Add the
pmd_bondto deps, and replace the relative MACRO name with newRTE_LIBRTE_BOND_PMD.meson changed the name of the driver define (when compared to make). We can't backport this patch.
How/who will fix this in stable branches?
For backports, would it be good to add into config/rte_config.h a compatibility macro something like:
#if defined RTE_LIBRTE_BOND_PMD && !defined RTE_LIBRTE_PMD_BOND #define RTE_LIBRTE_PMD_BOND 1
#endif
A message that is not in the archive (sent off-list or not yet received): DM6PR11MB436292727A47B651746AB246F9240@DM6PR11MB4362.namprd11.prod.outlook.com
Quoted 26 lines · SteveX
Hi Bruce,
Quoted 24 lines
-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Friday, September 11, 2020 4:37 PM
To: David Marchand <[email protected]>
Cc: Yang, SteveX <[email protected]>; dev <[email protected]>; Lu, Wenzhuo <[email protected]>; Xing, Beilei <[email protected]>; Yang, Qiming <[email protected]>; Kevin Traynor <[email protected]>; Luca Boccassi <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] app/test-pmd: fix meson build failed when enabledpmd_bondedQuoted 1 line · David Marchand
On Fri, Sep 11, 2020 at 8:15 AM SteveX Yang <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
The depended pmd bond is missing for test-pmd. Add the
pmd_bondto deps, and replace the relative MACRO name with new
RTE_LIBRTE_BOND_PMD.Quoted 6 lines
meson changed the name of the driver define (when compared to make). We can't backport this patch.
How/who will fix this in stable branches?
Quoted 8 lines
Quoted 5 lines
For backports, would it be good to add into
config/rte_config.ha compatibility macro something like:#if defined
RTE_LIBRTE_BOND_PMD&& !definedRTE_LIBRTE_PMD_BOND#defineRTE_LIBRTE_PMD_BOND1 #endifShould I add above MACRO definition into
config/rte_config.hwith this fix patch? Or somebody else will fix it with another patch?
This would be a separate patch for backporting, rather than something that is necessarily needed in your patch. However, if you want to add it for backward compatibility of other external applications that may use the old macro, feel free to do so.
If you can do it, probably the simplest solution is to do two separate patches in a set - this patch for 20.11 only, and a second to add the compatibility macro which can apply to 20.11 and be backported too.
/Bruce
A message that is not in the archive (sent off-list or not yet received): DM6PR11MB4362CF8D42FE275B79B84978F9230@DM6PR11MB4362.namprd11.prod.outlook.com
Quoted 8 lines · SteveX
Hi Bruce,
Do you mean I can provide a patch set which includes following two commit fixes:
1. For 20.11, add 'pmd_bond' to deps, and change the old macro toRTE_LIBRTE_BOND_PMD;
2. For backporting version, add 'pmd_bond' to deps, and add the compatibility macro to theconfig/rte_config.h;Are the two patches conflicted? Because both of them add the '
pmd_bond' to deps of test-pmd meson build with the same way.
Hi Steve,
it seems that there are quite a lot of compatibility macros that will need to be added so I think they will need to be managed separately. Therefore, I would suggest just doing the 20.11 patch as originally planned for now.
/Bruce
Quoted 11 lines · SteveX
Hi Bruce,
Do you mean I can provide a patch set which includes following two commit fixes:
1. For 20.11, add 'pmd_bond' to deps, and change the old macro toRTE_LIBRTE_BOND_PMD;
2. For backporting version, add 'pmd_bond' to deps, and add the compatibility macro to theconfig/rte_config.h;Are the two patches conflicted? Because both of them add the '
pmd_bond' to deps of test-pmd meson build with the same way.Thanks & Regards,
Steve Yang.
I'm looking a bit deeper into these macro defines, and trying to do up a general patchset that will close off a couple of issues simultaneously. I suggest we see how far that work goes before doing any new revisions of this set, as it hopefully will cover the issues here.
/Bruce
Quoted 7 lines · David Marchand
Quoted 3 lines · SteveX Yang
The depended pmd bond is missing for test-pmd. Add the
pmd_bondto deps, and replace the relative MACRO name with newRTE_LIBRTE_BOND_PMD.meson changed the name of the driver define (when compared to make).
It is likely we have other similar issues. I excluded the doc, since we have pending patches.
*Disclaimer* My scripting might be buggy.
$ git grep -h DIRS-..CONFIG_RTE_ v20.08 -- drivers/*/Makefile |sed -e 's#DIRS-$(CONFIG_\(.*\)).*$#\1#' |sort > make.tokens $ for meson in drivers/*/meson.build; do dir=$(dirname $meson); format=$(git grep 'config_flag_fmt =' $meson |cut -d \' -f 2); for drv in $dir/*; do drvname=$(basename $drv |tr '[a-z]' '[A-Z]'); echo $format |sed -e "s/@0@/$drvname/"; done; done |sort > meson.tokens
$ for token in $(diff -u make.tokens meson.tokens |sed -n 's/^-\(RTE_LIBRTE.*\)/\1/p'); do output=$(git grep -l "$token\>" -- :^doc/) || continue; echo $token $output; done RTE_LIBRTE_PMD_AESNI_GCM app/test/test_cryptodev.c RTE_LIBRTE_PMD_AESNI_MB app/test/test_cryptodev.c app/test/test_cryptodev_hash_test_vectors.h RTE_LIBRTE_PMD_BOND app/test-pmd/cmdline.c app/test-pmd/parameters.c RTE_LIBRTE_PMD_CAAM_JR app/test/test_cryptodev.c RTE_LIBRTE_PMD_CCP app/test/test_cryptodev.c RTE_LIBRTE_PMD_CRYPTO_SCHEDULER app/test-crypto-perf/main.c app/test/meson.build app/test/test_cryptodev.c examples/l2fwd-crypto/main.c RTE_LIBRTE_PMD_DPAA2_EVENTDEV drivers/bus/fslmc/portal/dpaa2_hw_dpio.c RTE_LIBRTE_PMD_DPAA2_SEC app/test/test_cryptodev.c RTE_LIBRTE_PMD_DPAA_SEC app/test/test_cryptodev.c RTE_LIBRTE_PMD_KASUMI app/test/test_cryptodev.c RTE_LIBRTE_PMD_MVSAM_CRYPTO app/test/test_cryptodev.c RTE_LIBRTE_PMD_NITROX app/test/test_cryptodev.c RTE_LIBRTE_PMD_NULL app/test/test_cryptodev.c RTE_LIBRTE_PMD_OCTEONTX2_CRYPTO app/test/test_cryptodev.c app/test/test_cryptodev_asym.c RTE_LIBRTE_PMD_OCTEONTX_CRYPTO app/test/test_cryptodev.c app/test/test_cryptodev_asym.c RTE_LIBRTE_PMD_OPENSSL app/test/test_cryptodev.c app/test/test_cryptodev_asym.c RTE_LIBRTE_PMD_RING app/test/test_eal_flags.c RTE_LIBRTE_PMD_SNOW3G app/test/test_cryptodev.c RTE_LIBRTE_PMD_VIRTIO_CRYPTO app/test/test_cryptodev.c RTE_LIBRTE_PMD_ZUC app/test/test_cryptodev.c RTE_LIBRTE_SFC_EFX_PMD config/arm/meson.build
Can this be looked at?
Thanks.
Signature · 1 line
David Marchand
Quoted 52 lines · David Marchand
Quoted 7 lines · David Marchand
Quoted 3 lines · SteveX Yang
The depended pmd bond is missing for test-pmd. Add the
pmd_bondto deps, and replace the relative MACRO name with newRTE_LIBRTE_BOND_PMD.meson changed the name of the driver define (when compared to make).
It is likely we have other similar issues. I excluded the doc, since we have pending patches.
*Disclaimer* My scripting might be buggy.
$ git grep -h DIRS-..CONFIG_RTE_ v20.08 -- drivers/*/Makefile |sed -e 's#DIRS-$(CONFIG_\(.*\)).*$#\1#' |sort > make.tokens $ for meson in drivers/*/meson.build; do dir=$(dirname $meson); format=$(git grep 'config_flag_fmt =' $meson |cut -d \' -f 2); for drv in $dir/*; do drvname=$(basename $drv |tr '[a-z]' '[A-Z]'); echo $format |sed -e "s/@0@/$drvname/"; done; done |sort > meson.tokens$ for token in $(diff -u make.tokens meson.tokens |sed -n 's/^-\(RTE_LIBRTE.*\)/\1/p'); do output=$(git grep -l "$token\>" -- :^doc/) || continue; echo $token $output; done RTE_LIBRTE_PMD_AESNI_GCM app/test/test_cryptodev.c RTE_LIBRTE_PMD_AESNI_MB app/test/test_cryptodev.c app/test/test_cryptodev_hash_test_vectors.h RTE_LIBRTE_PMD_BOND app/test-pmd/cmdline.c app/test-pmd/parameters.c RTE_LIBRTE_PMD_CAAM_JR app/test/test_cryptodev.c RTE_LIBRTE_PMD_CCP app/test/test_cryptodev.c RTE_LIBRTE_PMD_CRYPTO_SCHEDULER app/test-crypto-perf/main.c app/test/meson.build app/test/test_cryptodev.c examples/l2fwd-crypto/main.c RTE_LIBRTE_PMD_DPAA2_EVENTDEV drivers/bus/fslmc/portal/dpaa2_hw_dpio.c RTE_LIBRTE_PMD_DPAA2_SEC app/test/test_cryptodev.c RTE_LIBRTE_PMD_DPAA_SEC app/test/test_cryptodev.c RTE_LIBRTE_PMD_KASUMI app/test/test_cryptodev.c RTE_LIBRTE_PMD_MVSAM_CRYPTO app/test/test_cryptodev.c RTE_LIBRTE_PMD_NITROX app/test/test_cryptodev.c RTE_LIBRTE_PMD_NULL app/test/test_cryptodev.c RTE_LIBRTE_PMD_OCTEONTX2_CRYPTO app/test/test_cryptodev.c app/test/test_cryptodev_asym.c RTE_LIBRTE_PMD_OCTEONTX_CRYPTO app/test/test_cryptodev.c app/test/test_cryptodev_asym.c RTE_LIBRTE_PMD_OPENSSL app/test/test_cryptodev.c app/test/test_cryptodev_asym.c RTE_LIBRTE_PMD_RING app/test/test_eal_flags.c RTE_LIBRTE_PMD_SNOW3G app/test/test_cryptodev.c RTE_LIBRTE_PMD_VIRTIO_CRYPTO app/test/test_cryptodev.c RTE_LIBRTE_PMD_ZUC app/test/test_cryptodev.c RTE_LIBRTE_SFC_EFX_PMD config/arm/meson.build
Quoted 3 lines
Can this be looked at?
Thanks.
Sure. What do you think we should do for these, do we just document the change in the documentation, or should we keep strict compatibility by adding legacy defines?
I don't particularly like keeping the old defines around, since they are inconsistent in naming, but since we didn't announce a deprecation of the old values perhaps we should add them in.
Thoughts?
/Bruce
Quoted 3 lines · Bruce Richardson
I don't particularly like keeping the old defines around, since they are inconsistent in naming, but since we didn't announce a deprecation of the old values perhaps we should add them in.
I don't like keeping those either, but we did not announce it and those defines are part of the API (people relying on them to control their own code).
So my vote is on putting a deprecation for 21.02... cleaning the code so that it uses $meson_token (example RTE_LIBRTE_BOND_PMD) and adding a compat macro (meson -> make) as you suggested.
For the backports... the stable maintainers will be the one impacted :-).
Signature · 1 line
David Marchand
Quoted 69 lines
-----Original Message-----
From: David Marchand <[email protected]>
Sent: Friday, September 11, 2020 12:32 PM
To: Yang, SteveX <[email protected]>; Richardson, Bruce <[email protected]>
Cc: dev <[email protected]>; Lu, Wenzhuo <[email protected]>; Xing, Beilei <[email protected]>; Yang, Qiming <[email protected]>; Kevin Traynor <[email protected]>; Luca Boccassi <[email protected]>; Thomas Monjalon <[email protected]>; Power, Ciara <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] app/test-pmd: fix meson build failed when enabledpmd_bondedQuoted 2 lines · David Marchand
On Fri, Sep 11, 2020 at 8:15 AM SteveX Yang <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
The depended pmd bond is missing for test-pmd. Add the
pmd_bondtodeps,
Quoted 3 lines
Quoted 1 line
and replace the relative MACRO name with new
RTE_LIBRTE_BOND_PMD.meson changed the name of the driver define (when compared to make).
It is likely we have other similar issues. I excluded the doc, since we have pending patches.
*Disclaimer* My scripting might be buggy.
$ git grep -h DIRS-..CONFIG_RTE_ v20.08 -- drivers/*/Makefile |sed -e 's#DIRS-$(CONFIG_\(.*\)).*$#\1#' |sort > make.tokens $ for meson in drivers/*/meson.build; do dir=$(dirname $meson); format=$(git grep 'config_flag_fmt =' $meson |cut -d \' -f 2); for drv in $dir/*; do drvname=$(basename $drv |tr '[a-z]' '[A-Z]'); echo $format |sed -e "s/@0@/$drvname/"; done; done |sort > meson.tokens$ for token in $(diff -u make.tokens meson.tokens |sed -n 's/^-\(RTE_LIBRTE.*\)/\1/p'); do output=$(git grep -l "$token\>" -- :^doc/) || continue; echo $token $output; done RTE_LIBRTE_PMD_AESNI_GCM app/test/test_cryptodev.c RTE_LIBRTE_PMD_AESNI_MB app/test/test_cryptodev.c app/test/test_cryptodev_hash_test_vectors.h RTE_LIBRTE_PMD_BOND app/test-pmd/cmdline.c app/test-pmd/parameters.c RTE_LIBRTE_PMD_CAAM_JR app/test/test_cryptodev.c RTE_LIBRTE_PMD_CCP app/test/test_cryptodev.c RTE_LIBRTE_PMD_CRYPTO_SCHEDULER app/test-crypto-perf/main.c app/test/meson.build app/test/test_cryptodev.c examples/l2fwd-crypto/main.c RTE_LIBRTE_PMD_DPAA2_EVENTDEV drivers/bus/fslmc/portal/dpaa2_hw_dpio.c RTE_LIBRTE_PMD_DPAA2_SEC app/test/test_cryptodev.c RTE_LIBRTE_PMD_DPAA_SEC app/test/test_cryptodev.c RTE_LIBRTE_PMD_KASUMI app/test/test_cryptodev.c RTE_LIBRTE_PMD_MVSAM_CRYPTO app/test/test_cryptodev.c RTE_LIBRTE_PMD_NITROX app/test/test_cryptodev.c RTE_LIBRTE_PMD_NULL app/test/test_cryptodev.c RTE_LIBRTE_PMD_OCTEONTX2_CRYPTO app/test/test_cryptodev.c app/test/test_cryptodev_asym.c RTE_LIBRTE_PMD_OCTEONTX_CRYPTO app/test/test_cryptodev.c app/test/test_cryptodev_asym.c RTE_LIBRTE_PMD_OPENSSL app/test/test_cryptodev.c app/test/test_cryptodev_asym.c RTE_LIBRTE_PMD_RING app/test/test_eal_flags.c RTE_LIBRTE_PMD_SNOW3G app/test/test_cryptodev.c RTE_LIBRTE_PMD_VIRTIO_CRYPTO app/test/test_cryptodev.c RTE_LIBRTE_PMD_ZUC app/test/test_cryptodev.c RTE_LIBRTE_SFC_EFX_PMD config/arm/meson.build
Quoted 3 lines
Can this be looked at?
Thanks.
One attempt at a fuller clean up of this area of the build:
http://patches.dpdk.org/project/dpdk/list/?series=12283
Comments welcome.
PATCH v3 1/1 app/test-pmd: fix meson build failed when enabled pmd_bonded
In reply to SteveX YangThe depended pmd bond is missing for test-pmd. Add the pmd_bond to deps, and replace the relative MACRO name with new RTE_LIBRTE_BOND_PMD.
---v2->v3:
* added fixline;v1->v2:
* replaced the bond pmd MACRO with the new one;
* removed header paths cflags of bond pmd;
--- app/test-pmd/cmdline.c | 10 +++++----- app/test-pmd/meson.build | 3 +++ app/test-pmd/parameters.c | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-)
app/test-pmd/cmdline.c +5 -5
@@ -50,7 +50,7 @@#include <cmdline_parse_etheraddr.h> #include <cmdline_socket.h> #include <cmdline.h> -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD #include <rte_eth_bond.h> #include <rte_eth_bond_8023ad.h> #endif
@@ -597,7 +597,7 @@ static void cmd_help_long_parsed(void *parsed_result," Show the bypass configuration for a bypass enabled NIC" " using the lowest port on the NIC.\n\n" -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD"create bonded device (mode) (socket)\n" " Create a new bonded device with specific bonding mode and socket.\n\n"
@@ -5732,7 +5732,7 @@ cmdline_parse_inst_t cmd_show_bypass_config = { }, }; -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD /* *** SET BONDING MODE *** */ struct cmd_set_bonding_mode_result { cmdline_fixed_string_t set;
@@ -6502,7 +6502,7 @@ cmdline_parse_inst_t cmd_set_bonding_agg_mode_policy = { }; -#endif /* RTE_LIBRTE_PMD_BOND */ +#endif /* RTE_LIBRTE_BOND_PMD */ /* *** SET FORWARDING MODE *** */ struct cmd_set_fwd_mode_result {
@@ -19430,7 +19430,7 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_set_bypass_event, (cmdline_parse_inst_t *)&cmd_set_bypass_timeout, (cmdline_parse_inst_t *)&cmd_show_bypass_config, -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD (cmdline_parse_inst_t *) &cmd_set_bonding_mode, (cmdline_parse_inst_t *) &cmd_show_bonding_config, (cmdline_parse_inst_t *) &cmd_set_bonding_primary,
app/test-pmd/meson.build +3 -0
@@ -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_BOND_PMD') + deps += 'pmd_bond' +endif if dpdk_conf.has('RTE_LIBRTE_PDUMP') deps += 'pdump' endif
app/test-pmd/parameters.c +1 -1
@@ -39,7 +39,7 @@#include <rte_ether.h> #include <rte_ethdev.h> #include <rte_string_fns.h> -#ifdef RTE_LIBRTE_PMD_BOND +#ifdef RTE_LIBRTE_BOND_PMD #include <rte_eth_bond.h> #endif #include <rte_flow.h>
Signature · 1 line
2.17.1
Quoted 6 lines · SteveX Yang
The depended pmd bond is missing for test-pmd. Add the
pmd_bondto deps, and replace the relative MACRO name with newRTE_LIBRTE_BOND_PMD.Fixes 2950a769315e ("bond: testpmd support")Signed-off-by SteveX Yang <[email protected]>
This one too superseded for the generic solution from Bruce:
https://patches.dpdk.org/project/dpdk/list/?series=12283
Can you please check/review the above set?