Skip to contentSkip to conversation

app/test: fix build with ring pmd but no bond pmd

PATCH Applied Bruce Richardson 2 participants 5 messages May 27, 2020 – Jul 1, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/test: fix build with ring pmd but no bond pmd

If the bonding pmd is disabled, all autotest associated with it should be disabled. However, some of those tests also depended upon the ring PMD so were placed in a block depending on that driver - and unfortunately that driver alone. This caused build failures if the ring PMD was enabled but the bonding PMD disabled, due to missing header files and driver libs.

This error can be reproduced by configuring DPDK using e.g.

meson configure -Ddisable_drivers=net/[!r]* build

(which will disable all drivers not starting with "r"), and then building using ninja.

Fix this by moving all link bonding autotests to the one block and putting a second conditional check within that block for those also requiring the ring PMD.

Fixes 7f6ef1664027 ("test/bonding: allow disabling driver")
Fixes 207b1c813f39 ("test: fix build without ring PMD")
---
 app/test/meson.build | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
app/test/meson.build +4 -2
index 1715ddbcb..dc2474699 100644
@@ -350,6 +350,10 @@ if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
 	test_deps += 'pmd_bond'
 	test_sources += ['test_link_bonding.c', 'test_link_bonding_rssconf.c']
 	driver_test_names += ['link_bonding_autotest', 'link_bonding_rssconf_autotest']
+	if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
+		test_sources += 'test_link_bonding_mode4.c'
+		driver_test_names += 'link_bonding_mode4_autotest'
+	endif
 endif
 if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
 	test_deps += 'pmd_ring'
@@ -358,7 +362,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
 	test_sources += 'test_event_eth_tx_adapter.c'
 	test_sources += 'test_bitratestats.c'
 	test_sources += 'test_latencystats.c'
-	test_sources += 'test_link_bonding_mode4.c'
 	test_sources += 'sample_packet_forward.c'
 	test_sources += 'test_pdump.c'
 	fast_tests += [['ring_pmd_autotest', true]]
@@ -366,7 +369,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
 	fast_tests += [['event_eth_tx_adapter_autotest', false]]
 	fast_tests += [['bitratestats_autotest', true]]
 	fast_tests += [['latencystats_autotest', true]]
-	driver_test_names += 'link_bonding_mode4_autotest'
 	fast_tests += [['pdump_autotest', true]]
 endif
 
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 59 lines · Bruce Richardson

If the bonding pmd is disabled, all autotest associated with it should be disabled. However, some of those tests also depended upon the ring PMD so were placed in a block depending on that driver - and unfortunately that driver alone. This caused build failures if the ring PMD was enabled but the bonding PMD disabled, due to missing header files and driver libs.

This error can be reproduced by configuring DPDK using e.g.

meson configure -Ddisable_drivers=net/[!r]* build

(which will disable all drivers not starting with "r"), and then building using ninja.

Fix this by moving all link bonding autotests to the one block and putting a second conditional check within that block for those also requiring the ring PMD.

Fixes 7f6ef1664027 ("test/bonding: allow disabling driver")
Fixes 207b1c813f39 ("test: fix build without ring PMD")
---
 app/test/meson.build | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
app/test/meson.build +4 -3
index 1715ddbcb..dc2474699 100644
@@ -350,6 +350,10 @@ if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
        test_deps += 'pmd_bond'
        test_sources += ['test_link_bonding.c', 'test_link_bonding_rssconf.c']
        driver_test_names += ['link_bonding_autotest', 'link_bonding_rssconf_autotest']
+       if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
+               test_sources += 'test_link_bonding_mode4.c'
+               driver_test_names += 'link_bonding_mode4_autotest'
+       endif
 endif
 if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
        test_deps += 'pmd_ring'
@@ -358,7 +362,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
        test_sources += 'test_event_eth_tx_adapter.c'
        test_sources += 'test_bitratestats.c'
        test_sources += 'test_latencystats.c'
-       test_sources += 'test_link_bonding_mode4.c'
        test_sources += 'sample_packet_forward.c'
        test_sources += 'test_pdump.c'
        fast_tests += [['ring_pmd_autotest', true]]
@@ -366,7 +369,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
        fast_tests += [['event_eth_tx_adapter_autotest', false]]
        fast_tests += [['bitratestats_autotest', true]]
        fast_tests += [['latencystats_autotest', true]]
-       driver_test_names += 'link_bonding_mode4_autotest'
        fast_tests += [['pdump_autotest', true]]
 endif
 
--
Quoted 2 lines

2.25.1

Just a note.
Looking at the makefile counterpart, I can see that if we disable the null driver, we would have an issue too.

Signature · 1 line
David Marchand
#2 lore raw
Quoted 66 lines · David Marchand
Quoted 59 lines · Bruce Richardson

If the bonding pmd is disabled, all autotest associated with it should be disabled. However, some of those tests also depended upon the ring PMD so were placed in a block depending on that driver - and unfortunately that driver alone. This caused build failures if the ring PMD was enabled but the bonding PMD disabled, due to missing header files and driver libs.

This error can be reproduced by configuring DPDK using e.g.

meson configure -Ddisable_drivers=net/[!r]* build

(which will disable all drivers not starting with "r"), and then building using ninja.

Fix this by moving all link bonding autotests to the one block and putting a second conditional check within that block for those also requiring the ring PMD.

Fixes 7f6ef1664027 ("test/bonding: allow disabling driver")
Fixes 207b1c813f39 ("test: fix build without ring PMD")
---
 app/test/meson.build | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
app/test/meson.build +4 -3
index 1715ddbcb..dc2474699 100644
@@ -350,6 +350,10 @@ if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
        test_deps += 'pmd_bond'
        test_sources += ['test_link_bonding.c', 'test_link_bonding_rssconf.c']
        driver_test_names += ['link_bonding_autotest', 'link_bonding_rssconf_autotest']
+       if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
+               test_sources += 'test_link_bonding_mode4.c'
+               driver_test_names += 'link_bonding_mode4_autotest'
+       endif
 endif
 if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
        test_deps += 'pmd_ring'
@@ -358,7 +362,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
        test_sources += 'test_event_eth_tx_adapter.c'
        test_sources += 'test_bitratestats.c'
        test_sources += 'test_latencystats.c'
-       test_sources += 'test_link_bonding_mode4.c'
        test_sources += 'sample_packet_forward.c'
        test_sources += 'test_pdump.c'
        fast_tests += [['ring_pmd_autotest', true]]
@@ -366,7 +369,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
        fast_tests += [['event_eth_tx_adapter_autotest', false]]
        fast_tests += [['bitratestats_autotest', true]]
        fast_tests += [['latencystats_autotest', true]]
-       driver_test_names += 'link_bonding_mode4_autotest'
        fast_tests += [['pdump_autotest', true]]
 endif
 
--
Quoted 2 lines

2.25.1

Quoted 4 lines

Just a note.
Looking at the makefile counterpart, I can see that if we disable the null driver, we would have an issue too.

I'm not actually seeing an error with it in meson builds. Running a quick test using build parameter "-Ddisable_drivers=net/null" shows no errors, so I think we may be ok here.

Regards,
/Bruce

#3 lore raw
Quoted 7 lines · Bruce Richardson
Quoted 4 lines

Just a note.
Looking at the makefile counterpart, I can see that if we disable the null driver, we would have an issue too.

I'm not actually seeing an error with it in meson builds. Running a quick test using build parameter "-Ddisable_drivers=net/null" shows no errors, so I think we may be ok here.

I would expect an issue at runtime, as the bonding driver test wants to use null ports.
But yes, the build is fine.

Signature · 1 line
David Marchand
#4 lore raw
In reply to David Marchand
Quoted 20 lines · David Marchand
Quoted 18 lines · Bruce Richardson

If the bonding pmd is disabled, all autotest associated with it should be disabled. However, some of those tests also depended upon the ring PMD so were placed in a block depending on that driver - and unfortunately that driver alone. This caused build failures if the ring PMD was enabled but the bonding PMD disabled, due to missing header files and driver libs.

This error can be reproduced by configuring DPDK using e.g.

meson configure -Ddisable_drivers=net/[!r]* build

(which will disable all drivers not starting with "r"), and then building using ninja.

Fix this by moving all link bonding autotests to the one block and putting a second conditional check within that block for those also requiring the ring PMD.

Quoted 5 lines
Quoted 4 lines
Fixes 7f6ef1664027 ("test/bonding: allow disabling driver")
Fixes 207b1c813f39 ("test: fix build without ring PMD")

Applied, thanks.

Signature · 1 line
David Marchand