[dpdk-dev,v2,2/2] net/sfc: add support for meson build

Message ID 20180205123027.GA15752@bricha3-MOBL3.ger.corp.intel.com (mailing list archive)
State Not Applicable, archived
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

Bruce Richardson Feb. 5, 2018, 12:30 p.m. UTC
  On Sat, Feb 03, 2018 at 01:46:34PM +0000, Andrew Rybchenko wrote:
> From: Ivan Malov <ivan.malov@oktetlabs.ru>
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
> v2:
>  - use includes to extend include directories set
>  - limit to x86 architecture
>  - specify include directories in base driver build
>  - remove unnecessary optimization level set and driver dir from includes
> 
>  drivers/net/meson.build          |  2 +-
>  drivers/net/sfc/base/meson.build | 70 ++++++++++++++++++++++++++++++++++++++++
>  drivers/net/sfc/meson.build      | 64 ++++++++++++++++++++++++++++++++++++
>  3 files changed, 135 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/net/sfc/base/meson.build
>  create mode 100644 drivers/net/sfc/meson.build
> 
Thanks, this looks a lot better.

Unfortunately, it still doesn't compile on ARM, though that is more an
issue with the drivers/meson.build file, than a bug with your driver
specifically. :-( Right now, the base code libraries are still compiled
even when build = "false" because those targets are provided in the
per-driver meson.build files, rather than managed at the top level one.
To properly fix this, in 18.05 I think we should add support at the
top-level driver file for base directories, since so many drivers use
them. That will move the building of base code to the protection of
"build" flag.

However, since this set doesn't affect any other components, I'd like to
get this into 18.02. To fix it, the following changes need to be made to
your patch. If you are ok with these, I can add these changes on apply.

Regards,
/Bruce
  

Comments

Andrew Rybchenko Feb. 5, 2018, 12:33 p.m. UTC | #1
On 02/05/2018 03:30 PM, Bruce Richardson wrote:
> On Sat, Feb 03, 2018 at 01:46:34PM +0000, Andrew Rybchenko wrote:
>> From: Ivan Malov <ivan.malov@oktetlabs.ru>
>>
>> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> ---
>> v2:
>>   - use includes to extend include directories set
>>   - limit to x86 architecture
>>   - specify include directories in base driver build
>>   - remove unnecessary optimization level set and driver dir from includes
>>
>>   drivers/net/meson.build          |  2 +-
>>   drivers/net/sfc/base/meson.build | 70 ++++++++++++++++++++++++++++++++++++++++
>>   drivers/net/sfc/meson.build      | 64 ++++++++++++++++++++++++++++++++++++
>>   3 files changed, 135 insertions(+), 1 deletion(-)
>>   create mode 100644 drivers/net/sfc/base/meson.build
>>   create mode 100644 drivers/net/sfc/meson.build
>>
> Thanks, this looks a lot better.
>
> Unfortunately, it still doesn't compile on ARM, though that is more an
> issue with the drivers/meson.build file, than a bug with your driver
> specifically. :-( Right now, the base code libraries are still compiled
> even when build = "false" because those targets are provided in the
> per-driver meson.build files, rather than managed at the top level one.
> To properly fix this, in 18.05 I think we should add support at the
> top-level driver file for base directories, since so many drivers use
> them. That will move the building of base code to the protection of
> "build" flag.
>
> However, since this set doesn't affect any other components, I'd like to
> get this into 18.02. To fix it, the following changes need to be made to
> your patch. If you are ok with these, I can add these changes on apply.

Yes, these changes are OK for us. Thanks.

Andrew.

> Regards,
> /Bruce
>
> diff --git a/drivers/net/sfc/base/meson.build b/drivers/net/sfc/base/meson.build
> index f8314a9bc..f1e497356 100644
> --- a/drivers/net/sfc/base/meson.build
> +++ b/drivers/net/sfc/base/meson.build
> @@ -62,9 +62,13 @@ foreach flag: extra_flags
>          endif
>   endforeach
>
> -base_lib = static_library('sfc_base', sources,
> -       include_directories: includes,
> -       dependencies: static_rte_eal,
> -       c_args: c_args)
> +if build
> +       base_lib = static_library('sfc_base', sources,
> +               include_directories: includes,
> +               dependencies: static_rte_eal,
> +               c_args: c_args)
>
> -base_objs = base_lib.extract_all_objects()
> +       base_objs = base_lib.extract_all_objects()
> +else
> +       base_objs = []
> +endif
>
  
Bruce Richardson Feb. 5, 2018, 2 p.m. UTC | #2
On Mon, Feb 05, 2018 at 03:33:54PM +0300, Andrew Rybchenko wrote:
> On 02/05/2018 03:30 PM, Bruce Richardson wrote:
> > On Sat, Feb 03, 2018 at 01:46:34PM +0000, Andrew Rybchenko wrote:
> > > From: Ivan Malov <ivan.malov@oktetlabs.ru>
> > > 
> > > Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> > > Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > > ---
> > > v2:
> > >   - use includes to extend include directories set
> > >   - limit to x86 architecture
> > >   - specify include directories in base driver build
> > >   - remove unnecessary optimization level set and driver dir from includes
> > > 
> > >   drivers/net/meson.build          |  2 +-
> > >   drivers/net/sfc/base/meson.build | 70 ++++++++++++++++++++++++++++++++++++++++
> > >   drivers/net/sfc/meson.build      | 64 ++++++++++++++++++++++++++++++++++++
> > >   3 files changed, 135 insertions(+), 1 deletion(-)
> > >   create mode 100644 drivers/net/sfc/base/meson.build
> > >   create mode 100644 drivers/net/sfc/meson.build
> > > 
> > Thanks, this looks a lot better.
> > 
> > Unfortunately, it still doesn't compile on ARM, though that is more an
> > issue with the drivers/meson.build file, than a bug with your driver
> > specifically. :-( Right now, the base code libraries are still compiled
> > even when build = "false" because those targets are provided in the
> > per-driver meson.build files, rather than managed at the top level one.
> > To properly fix this, in 18.05 I think we should add support at the
> > top-level driver file for base directories, since so many drivers use
> > them. That will move the building of base code to the protection of
> > "build" flag.
> > 
> > However, since this set doesn't affect any other components, I'd like to
> > get this into 18.02. To fix it, the following changes need to be made to
> > your patch. If you are ok with these, I can add these changes on apply.
> 
> Yes, these changes are OK for us. Thanks.
> 
> Andrew.
> 
Applied to dpdk-next-build with suggested changes.

/Bruce
  

Patch

diff --git a/drivers/net/sfc/base/meson.build b/drivers/net/sfc/base/meson.build
index f8314a9bc..f1e497356 100644
--- a/drivers/net/sfc/base/meson.build
+++ b/drivers/net/sfc/base/meson.build
@@ -62,9 +62,13 @@  foreach flag: extra_flags
        endif
 endforeach

-base_lib = static_library('sfc_base', sources,
-       include_directories: includes,
-       dependencies: static_rte_eal,
-       c_args: c_args)
+if build
+       base_lib = static_library('sfc_base', sources,
+               include_directories: includes,
+               dependencies: static_rte_eal,
+               c_args: c_args)

-base_objs = base_lib.extract_all_objects()
+       base_objs = base_lib.extract_all_objects()
+else
+       base_objs = []
+endif