[v3] app/test-pmd: fix meson build failed when enabled pmd_bonded
diff mbox series

Message ID 20200915022458.18913-1-stevex.yang@intel.com
State Superseded
Delegated to: Ferruh Yigit
Headers show
Series
  • [v3] app/test-pmd: fix meson build failed when enabled pmd_bonded
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/checkpatch success coding style OK

Commit Message

SteveX Yang Sept. 15, 2020, 2:24 a.m. UTC
The 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.

Fixes: 2950a769315e ("bond: testpmd support")

Signed-off-by: SteveX Yang <stevex.yang@intel.com>
---
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(-)

Comments

Ferruh Yigit Sept. 30, 2020, 4:29 p.m. UTC | #1
On 9/15/2020 3:24 AM, SteveX Yang wrote:
> The 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.
> 
> Fixes: 2950a769315e ("bond: testpmd support")
> 
> Signed-off-by: SteveX Yang <stevex.yang@intel.com>

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?

Patch
diff mbox series

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 0a6ed85f3..91e408904 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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,
diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index ea56e547b..7ad87d010 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_BOND_PMD')
+	deps += 'pmd_bond'
+endif
 if dpdk_conf.has('RTE_LIBRTE_PDUMP')
 	deps += 'pdump'
 endif
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 7cb0e3d6e..c48e28cf4 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -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>