app/test: allow building with bonding net driver disabled

Message ID 20200501150549.6959-1-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series app/test: allow building with bonding net driver disabled |

Checks

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

Commit Message

Bruce Richardson May 1, 2020, 3:05 p.m. UTC
  The autotest application build was partially enabled for building with
the net/bond driver disabled, but a number of items were missed, leading
to build errors when the driver was disabled, e.g. by simply doing
"-Ddisable_drivers=net/*" when calling meson.

  ../app/test/test_link_bonding.c:25:10: fatal error: rte_eth_bond.h: \
	No such file or directory

With this fix in place, it's possible to build DPDK with meson with all
non-bus, non-mempool drivers disabled i.e. using meson option

-Ddisable_drivers=baseband/*,compress/*,crypto/*,event/*,net/*,raw/*,vdpa/*

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/meson.build | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

Lukasz Wojciechowski May 4, 2020, 7:26 p.m. UTC | #1
W dniu 01.05.2020 o 17:05, Bruce Richardson pisze:
> The autotest application build was partially enabled for building with
> the net/bond driver disabled, but a number of items were missed, leading
> to build errors when the driver was disabled, e.g. by simply doing
> "-Ddisable_drivers=net/*" when calling meson.
>
>    ../app/test/test_link_bonding.c:25:10: fatal error: rte_eth_bond.h: \
> 	No such file or directory
>
> With this fix in place, it's possible to build DPDK with meson with all
> non-bus, non-mempool drivers disabled i.e. using meson option
>
> -Ddisable_drivers=baseband/*,compress/*,crypto/*,event/*,net/*,raw/*,vdpa/*
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>   app/test/meson.build | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/app/test/meson.build b/app/test/meson.build
> index fc60acbe7..03dd6c3de 100644
> --- a/app/test/meson.build
> +++ b/app/test/meson.build
> @@ -63,8 +63,6 @@ test_sources = files('commands.c',
>   	'test_ipsec_sad.c',
>   	'test_kni.c',
>   	'test_kvargs.c',
> -	'test_link_bonding.c',
> -	'test_link_bonding_rssconf.c',
>   	'test_logs.c',
>   	'test_lpm.c',
>   	'test_lpm6.c',
> @@ -136,6 +134,8 @@ test_sources = files('commands.c',
>   )
>   
>   test_deps = ['acl',
> +	'bus_pci',
> +	'bus_vdev',
>   	'bitratestats',
>   	'bpf',
>   	'cfgfile',
> @@ -306,8 +306,6 @@ driver_test_names = [
>           'cryptodev_sw_zuc_autotest',
>           'eventdev_selftest_octeontx',
>           'eventdev_selftest_sw',
> -        'link_bonding_autotest',
> -        'link_bonding_rssconf_autotest',
>           'rawdev_autotest',
>   ]
>   
> @@ -340,6 +338,8 @@ endif
>   # they are used via a driver-specific API.
>   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']
>   endif
>   if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
>   	test_deps += 'pmd_ring'
testing conditions:

* confirmed issue without patch and build flag: -Ddisable_drivers=net/* 
fails to build
* with patch applied test app still builds without flags
* with patch applied test app builds with 
-Ddisable_drivers=baseband/*,compress/*,crypto/*,event/*,net/*,raw/*,vdpa/*

Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>

Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
  
Thomas Monjalon May 11, 2020, 7:42 p.m. UTC | #2
04/05/2020 21:26, Lukasz Wojciechowski:
> W dniu 01.05.2020 o 17:05, Bruce Richardson pisze:
> > The autotest application build was partially enabled for building with
> > the net/bond driver disabled, but a number of items were missed, leading
> > to build errors when the driver was disabled, e.g. by simply doing
> > "-Ddisable_drivers=net/*" when calling meson.
> >
> >    ../app/test/test_link_bonding.c:25:10: fatal error: rte_eth_bond.h: \
> > 	No such file or directory
> >
> > With this fix in place, it's possible to build DPDK with meson with all
> > non-bus, non-mempool drivers disabled i.e. using meson option
> >
> > -Ddisable_drivers=baseband/*,compress/*,crypto/*,event/*,net/*,raw/*,vdpa/*
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> * confirmed issue without patch and build flag: -Ddisable_drivers=net/* 
> fails to build
> * with patch applied test app still builds without flags
> * with patch applied test app builds with 
> -Ddisable_drivers=baseband/*,compress/*,crypto/*,event/*,net/*,raw/*,vdpa/*
> 
> Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
> Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>

Applied, thanks
  

Patch

diff --git a/app/test/meson.build b/app/test/meson.build
index fc60acbe7..03dd6c3de 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -63,8 +63,6 @@  test_sources = files('commands.c',
 	'test_ipsec_sad.c',
 	'test_kni.c',
 	'test_kvargs.c',
-	'test_link_bonding.c',
-	'test_link_bonding_rssconf.c',
 	'test_logs.c',
 	'test_lpm.c',
 	'test_lpm6.c',
@@ -136,6 +134,8 @@  test_sources = files('commands.c',
 )
 
 test_deps = ['acl',
+	'bus_pci',
+	'bus_vdev',
 	'bitratestats',
 	'bpf',
 	'cfgfile',
@@ -306,8 +306,6 @@  driver_test_names = [
         'cryptodev_sw_zuc_autotest',
         'eventdev_selftest_octeontx',
         'eventdev_selftest_sw',
-        'link_bonding_autotest',
-        'link_bonding_rssconf_autotest',
         'rawdev_autotest',
 ]
 
@@ -340,6 +338,8 @@  endif
 # they are used via a driver-specific API.
 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']
 endif
 if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
 	test_deps += 'pmd_ring'