[v3,34/34] net/ice: support meson build

Message ID 1544598004-27099-35-git-send-email-wenzhuo.lu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series A new net PMD - ice |

Checks

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

Commit Message

Wenzhuo Lu Dec. 12, 2018, 7 a.m. UTC
  Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/ice/base/meson.build | 30 ++++++++++++++++++++++++++++++
 drivers/net/ice/meson.build      | 15 +++++++++++++++
 drivers/net/meson.build          |  1 +
 3 files changed, 46 insertions(+)
 create mode 100644 drivers/net/ice/base/meson.build
 create mode 100644 drivers/net/ice/meson.build
  

Comments

Ferruh Yigit Dec. 13, 2018, 9:15 p.m. UTC | #1
On 12/12/2018 7:00 AM, Wenzhuo Lu wrote:
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> ---
>  drivers/net/ice/base/meson.build | 30 ++++++++++++++++++++++++++++++
>  drivers/net/ice/meson.build      | 15 +++++++++++++++
>  drivers/net/meson.build          |  1 +

I think it is better to add meson file with on the patch Makefile added and
update in patches where required, instead of having a separate patch for it

>  3 files changed, 46 insertions(+)
>  create mode 100644 drivers/net/ice/base/meson.build
>  create mode 100644 drivers/net/ice/meson.build
> 
> diff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build
> new file mode 100644
> index 0000000..5aafff3
> --- /dev/null
> +++ b/drivers/net/ice/base/meson.build
> @@ -0,0 +1,30 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright(c) 2018 Intel Corporation
> +
> +sources = [
> +	'ice_controlq.c',
> +	'ice_common.c',
> +	'ice_sched.c',
> +	'ice_switch.c',
> +	'ice_nvm.c',

ice_dcb.c? It is in base folder, isn't is compiled?

<...>

> @@ -0,0 +1,15 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright(c) 2018 Intel Corporation
> +
> +cflags += ['-DALLOW_EXPERIMENTAL_API']

Makefile doesn't have this flag, I guess it is not needed, base folder meson
file also has it.
  
Wenzhuo Lu Dec. 14, 2018, 2:38 a.m. UTC | #2
Hi Ferruh,


> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Friday, December 14, 2018 5:16 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 34/34] net/ice: support meson build
> 
> On 12/12/2018 7:00 AM, Wenzhuo Lu wrote:
> > Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> > ---
> >  drivers/net/ice/base/meson.build | 30
> ++++++++++++++++++++++++++++++
> >  drivers/net/ice/meson.build      | 15 +++++++++++++++
> >  drivers/net/meson.build          |  1 +
> 
> I think it is better to add meson file with on the patch Makefile added and
> update in patches where required, instead of having a separate patch for it
Discussed the same with Vipin, will change it.

> 
> >  3 files changed, 46 insertions(+)
> >  create mode 100644 drivers/net/ice/base/meson.build  create mode
> > 100644 drivers/net/ice/meson.build
> >
> > diff --git a/drivers/net/ice/base/meson.build
> > b/drivers/net/ice/base/meson.build
> > new file mode 100644
> > index 0000000..5aafff3
> > --- /dev/null
> > +++ b/drivers/net/ice/base/meson.build
> > @@ -0,0 +1,30 @@
> > +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel
> > +Corporation
> > +
> > +sources = [
> > +	'ice_controlq.c',
> > +	'ice_common.c',
> > +	'ice_sched.c',
> > +	'ice_switch.c',
> > +	'ice_nvm.c',
> 
> ice_dcb.c? It is in base folder, isn't is compiled?
Currently we don’t use it. Just leave it uncompiled.
> 
> <...>
> 
> > @@ -0,0 +1,15 @@
> > +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel
> > +Corporation
> > +
> > +cflags += ['-DALLOW_EXPERIMENTAL_API']
> 
> Makefile doesn't have this flag, I guess it is not needed, base folder meson
> file also has it.
Thanks for the reminder. Will remove it.
  
Ferruh Yigit Dec. 14, 2018, 8:47 a.m. UTC | #3
On 12/14/2018 2:38 AM, Lu, Wenzhuo wrote:
<...>

>>> @@ -0,0 +1,30 @@
>>> +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel
>>> +Corporation
>>> +
>>> +sources = [
>>> +	'ice_controlq.c',
>>> +	'ice_common.c',
>>> +	'ice_sched.c',
>>> +	'ice_switch.c',
>>> +	'ice_nvm.c',
>>
>> ice_dcb.c? It is in base folder, isn't is compiled?
> Currently we don’t use it. Just leave it uncompiled.

Why not remove it now, and add back when used?
  
Wenzhuo Lu Dec. 16, 2018, 1:43 a.m. UTC | #4
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Friday, December 14, 2018 4:48 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 34/34] net/ice: support meson build
> 
> On 12/14/2018 2:38 AM, Lu, Wenzhuo wrote:
> <...>
> 
> >>> @@ -0,0 +1,30 @@
> >>> +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel
> >>> +Corporation
> >>> +
> >>> +sources = [
> >>> +	'ice_controlq.c',
> >>> +	'ice_common.c',
> >>> +	'ice_sched.c',
> >>> +	'ice_switch.c',
> >>> +	'ice_nvm.c',
> >>
> >> ice_dcb.c? It is in base folder, isn't is compiled?
> > Currently we don’t use it. Just leave it uncompiled.
> 
> Why not remove it now, and add back when used?
To touch the base code or not, it's a question. But anyway, it's a whole unused file, I can remove it.
  

Patch

diff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build
new file mode 100644
index 0000000..5aafff3
--- /dev/null
+++ b/drivers/net/ice/base/meson.build
@@ -0,0 +1,30 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+sources = [
+	'ice_controlq.c',
+	'ice_common.c',
+	'ice_sched.c',
+	'ice_switch.c',
+	'ice_nvm.c',
+]
+
+error_cflags = ['-Wno-sign-compare', '-Wno-unused-value',
+		'-Wno-format', '-Wno-error=format-security',
+		'-Wno-strict-aliasing', '-Wno-unused-but-set-variable',
+		'-Wno-unused-variable',
+]
+c_args = cflags
+if allow_experimental_apis
+	c_args += '-DALLOW_EXPERIMENTAL_API'
+endif
+foreach flag: error_cflags
+	if cc.has_argument(flag)
+		c_args += flag
+	endif
+endforeach
+
+base_lib = static_library('ice_base', sources,
+	dependencies: static_rte_eal,
+	c_args: c_args)
+base_objs = base_lib.extract_all_objects()
diff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build
new file mode 100644
index 0000000..b921354
--- /dev/null
+++ b/drivers/net/ice/meson.build
@@ -0,0 +1,15 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Intel Corporation
+
+cflags += ['-DALLOW_EXPERIMENTAL_API']
+
+subdir('base')
+objs = [base_objs]
+
+sources = files(
+	'ice_ethdev.c',
+	'ice_lan_rxtx.c'
+	)
+
+deps += ['hash']
+includes += include_directories('base')
diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index 980eec2..45da3bb 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -17,6 +17,7 @@  drivers = ['af_packet',
 	'enic',
 	'failsafe',
 	'fm10k', 'i40e',
+	'ice',
 	'ifc',
 	'ixgbe',
 	'kni',