[v2,1/1] net/octeontx: fix meson build for disabled octeontx drivers
Checks
Commit Message
From: Amit Gupta <agupta3@marvell.com>
Add a additional condition to check if all required internal
dependencies are met before building octeontx drivers using meson.
Bugzilla ID: 387
Fixes: 7f615033d64f ("drivers/net: build Cavium NIC PMDs with meson")
Signed-off-by: Amit Gupta <agupta3@marvell.com>
---
v2:
- rebased to v20.02
- upstream comments incorporated.
drivers/net/octeontx/base/meson.build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Comments
On Mon, Mar 02, 2020 at 12:01:55PM +0530, agupta3@marvell.com wrote:
> From: Amit Gupta <agupta3@marvell.com>
>
> Add a additional condition to check if all required internal
> dependencies are met before building octeontx drivers using meson.
>
> Bugzilla ID: 387
>
> Fixes: 7f615033d64f ("drivers/net: build Cavium NIC PMDs with meson")
>
> Signed-off-by: Amit Gupta <agupta3@marvell.com>
> ---
> v2:
> - rebased to v20.02
> - upstream comments incorporated.
>
> drivers/net/octeontx/base/meson.build | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx/base/meson.build
> index a06a2c8..035aeda 100644
> --- a/drivers/net/octeontx/base/meson.build
> +++ b/drivers/net/octeontx/base/meson.build
> @@ -10,7 +10,11 @@ sources = [
> depends = ['ethdev', 'mempool_octeontx']
> static_objs = []
> foreach d: depends
> - static_objs += [get_variable('static_rte_' + d)]
> + test_dep_obj = '@0@'.format(get_variable('static_rte_' + d, ''))
> + if test_dep_obj == ''
> + subdir_done()
> + endif
> + static_objs += get_variable('static_rte_' + d)
> endforeach
very minor nit - you can use "test_dep_obj" here rather than calling
get_variable twice.
/Bruce
test_dep_obj is being formatted as string object, so can't be used as static obj..
Amit
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Monday, March 2, 2020 4:23 PM
> To: Amit Gupta <agupta3@marvell.com>
> Cc: Harman Kalra <hkalra@marvell.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [EXT] Re: [dpdk-dev] [PATCH v2 1/1] net/octeontx: fix meson build
> for disabled octeontx drivers
>
> External Email
>
> ----------------------------------------------------------------------
> On Mon, Mar 02, 2020 at 12:01:55PM +0530, agupta3@marvell.com wrote:
> > From: Amit Gupta <agupta3@marvell.com>
> >
> > Add a additional condition to check if all required internal
> > dependencies are met before building octeontx drivers using meson.
> >
> > Bugzilla ID: 387
> >
> > Fixes: 7f615033d64f ("drivers/net: build Cavium NIC PMDs with meson")
> >
> > Signed-off-by: Amit Gupta <agupta3@marvell.com>
> > ---
> > v2:
> > - rebased to v20.02
> > - upstream comments incorporated.
> >
> > drivers/net/octeontx/base/meson.build | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/octeontx/base/meson.build
> > b/drivers/net/octeontx/base/meson.build
> > index a06a2c8..035aeda 100644
> > --- a/drivers/net/octeontx/base/meson.build
> > +++ b/drivers/net/octeontx/base/meson.build
> > @@ -10,7 +10,11 @@ sources = [
> > depends = ['ethdev', 'mempool_octeontx'] static_objs = [] foreach
> > d: depends
> > - static_objs += [get_variable('static_rte_' + d)]
> > + test_dep_obj = '@0@'.format(get_variable('static_rte_' + d, ''))
> > + if test_dep_obj == ''
> > + subdir_done()
> > + endif
> > + static_objs += get_variable('static_rte_' + d)
> > endforeach
>
> very minor nit - you can use "test_dep_obj" here rather than calling
> get_variable twice.
>
> /Bruce
On Tue, Mar 03, 2020 at 03:10:56AM +0000, Amit Gupta wrote:
>
> > -----Original Message-----
> > From: Bruce Richardson <bruce.richardson@intel.com>
> > Sent: Monday, March 2, 2020 4:23 PM
> > To: Amit Gupta <agupta3@marvell.com>
> > Cc: Harman Kalra <hkalra@marvell.com>; dev@dpdk.org; stable@dpdk.org
> > Subject: [EXT] Re: [dpdk-dev] [PATCH v2 1/1] net/octeontx: fix meson build
> > for disabled octeontx drivers
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > On Mon, Mar 02, 2020 at 12:01:55PM +0530, agupta3@marvell.com wrote:
> > > From: Amit Gupta <agupta3@marvell.com>
> > >
> > > Add a additional condition to check if all required internal
> > > dependencies are met before building octeontx drivers using meson.
> > >
> > > Bugzilla ID: 387
> > >
> > > Fixes: 7f615033d64f ("drivers/net: build Cavium NIC PMDs with meson")
> > >
> > > Signed-off-by: Amit Gupta <agupta3@marvell.com>
> > > ---
> > > v2:
> > > - rebased to v20.02
> > > - upstream comments incorporated.
> > >
> > > drivers/net/octeontx/base/meson.build | 6 +++++-
> > > 1 file changed, 5 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/octeontx/base/meson.build
> > > b/drivers/net/octeontx/base/meson.build
> > > index a06a2c8..035aeda 100644
> > > --- a/drivers/net/octeontx/base/meson.build
> > > +++ b/drivers/net/octeontx/base/meson.build
> > > @@ -10,7 +10,11 @@ sources = [
> > > depends = ['ethdev', 'mempool_octeontx'] static_objs = [] foreach
> > > d: depends
> > > - static_objs += [get_variable('static_rte_' + d)]
> > > + test_dep_obj = '@0@'.format(get_variable('static_rte_' + d, ''))
> > > + if test_dep_obj == ''
> > > + subdir_done()
> > > + endif
> > > + static_objs += get_variable('static_rte_' + d)
> > > endforeach
> >
> > very minor nit - you can use "test_dep_obj" here rather than calling
> > get_variable twice.
> >
> test_dep_obj is being formatted as string object, so can't be used as static obj..
Apologies, you are quite right, I missed that.
One final suggestion - the "is_variable" function is probably want you want
rather than using get_variable with a fallback. It should save the use of a
temporary variable completely.
/Bruce
ACK
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Tuesday, March 3, 2020 4:47 PM
> To: Amit Gupta <agupta3@marvell.com>
> Cc: Harman Kalra <hkalra@marvell.com>; dev@dpdk.org; stable@dpdk.org
> Subject: Re: [EXT] Re: [dpdk-dev] [PATCH v2 1/1] net/octeontx: fix meson
> build for disabled octeontx drivers
>
> On Tue, Mar 03, 2020 at 03:10:56AM +0000, Amit Gupta wrote:
> >
> > > -----Original Message-----
> > > From: Bruce Richardson <bruce.richardson@intel.com>
> > > Sent: Monday, March 2, 2020 4:23 PM
> > > To: Amit Gupta <agupta3@marvell.com>
> > > Cc: Harman Kalra <hkalra@marvell.com>; dev@dpdk.org;
> stable@dpdk.org
> > > Subject: [EXT] Re: [dpdk-dev] [PATCH v2 1/1] net/octeontx: fix meson
> > > build for disabled octeontx drivers
> > >
> > > External Email
> > >
> > > --------------------------------------------------------------------
> > > -- On Mon, Mar 02, 2020 at 12:01:55PM +0530, agupta3@marvell.com
> > > wrote:
> > > > From: Amit Gupta <agupta3@marvell.com>
> > > >
> > > > Add a additional condition to check if all required internal
> > > > dependencies are met before building octeontx drivers using meson.
> > > >
> > > > Bugzilla ID: 387
> > > >
> > > > Fixes: 7f615033d64f ("drivers/net: build Cavium NIC PMDs with
> > > > meson")
> > > >
> > > > Signed-off-by: Amit Gupta <agupta3@marvell.com>
> > > > ---
> > > > v2:
> > > > - rebased to v20.02
> > > > - upstream comments incorporated.
> > > >
> > > > drivers/net/octeontx/base/meson.build | 6 +++++-
> > > > 1 file changed, 5 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/net/octeontx/base/meson.build
> > > > b/drivers/net/octeontx/base/meson.build
> > > > index a06a2c8..035aeda 100644
> > > > --- a/drivers/net/octeontx/base/meson.build
> > > > +++ b/drivers/net/octeontx/base/meson.build
> > > > @@ -10,7 +10,11 @@ sources = [
> > > > depends = ['ethdev', 'mempool_octeontx'] static_objs = []
> > > > foreach
> > > > d: depends
> > > > - static_objs += [get_variable('static_rte_' + d)]
> > > > + test_dep_obj = '@0@'.format(get_variable('static_rte_' + d, ''))
> > > > + if test_dep_obj == ''
> > > > + subdir_done()
> > > > + endif
> > > > + static_objs += get_variable('static_rte_' + d)
> > > > endforeach
> > >
> > > very minor nit - you can use "test_dep_obj" here rather than calling
> > > get_variable twice.
> > >
> > test_dep_obj is being formatted as string object, so can't be used as static
> obj..
>
> Apologies, you are quite right, I missed that.
>
> One final suggestion - the "is_variable" function is probably want you want
> rather than using get_variable with a fallback. It should save the use of a
> temporary variable completely.
>
> /Bruce
@@ -10,7 +10,11 @@ sources = [
depends = ['ethdev', 'mempool_octeontx']
static_objs = []
foreach d: depends
- static_objs += [get_variable('static_rte_' + d)]
+ test_dep_obj = '@0@'.format(get_variable('static_rte_' + d, ''))
+ if test_dep_obj == ''
+ subdir_done()
+ endif
+ static_objs += get_variable('static_rte_' + d)
endforeach
c_args = cflags