DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/sfc: rename version map file
@ 2018-02-02 12:43 Andrew Rybchenko
  2018-02-02 12:43 ` [dpdk-dev] [PATCH 2/2] net/sfc: add support for meson build Andrew Rybchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Andrew Rybchenko @ 2018-02-02 12:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Ivan Malov

From: Ivan Malov <ivan.malov@oktetlabs.ru>

The version map filename does not comply with the format
used by meson build rules for drivers (i.e. on the upper
level) and needs to be revisited. This patch removes efx
postfix from the driver title in the filename.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/Makefile                    | 2 +-
 drivers/net/sfc/rte_pmd_sfc_efx_version.map | 4 ----
 drivers/net/sfc/rte_pmd_sfc_version.map     | 4 ++++
 3 files changed, 5 insertions(+), 5 deletions(-)
 delete mode 100644 drivers/net/sfc/rte_pmd_sfc_efx_version.map
 create mode 100644 drivers/net/sfc/rte_pmd_sfc_version.map

diff --git a/drivers/net/sfc/Makefile b/drivers/net/sfc/Makefile
index cc4e4e5..8a671dd 100644
--- a/drivers/net/sfc/Makefile
+++ b/drivers/net/sfc/Makefile
@@ -60,7 +60,7 @@ BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.
 $(foreach obj, $(BASE_DRIVER_OBJS), \
   $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
 
-EXPORT_MAP := rte_pmd_sfc_efx_version.map
+EXPORT_MAP := rte_pmd_sfc_version.map
 
 LIBABIVER := 1
 
diff --git a/drivers/net/sfc/rte_pmd_sfc_efx_version.map b/drivers/net/sfc/rte_pmd_sfc_efx_version.map
deleted file mode 100644
index 31eca32..0000000
--- a/drivers/net/sfc/rte_pmd_sfc_efx_version.map
+++ /dev/null
@@ -1,4 +0,0 @@
-DPDK_17.02 {
-
-	local: *;
-};
diff --git a/drivers/net/sfc/rte_pmd_sfc_version.map b/drivers/net/sfc/rte_pmd_sfc_version.map
new file mode 100644
index 0000000..31eca32
--- /dev/null
+++ b/drivers/net/sfc/rte_pmd_sfc_version.map
@@ -0,0 +1,4 @@
+DPDK_17.02 {
+
+	local: *;
+};
-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 2/2] net/sfc: add support for meson build
  2018-02-02 12:43 [dpdk-dev] [PATCH 1/2] net/sfc: rename version map file Andrew Rybchenko
@ 2018-02-02 12:43 ` Andrew Rybchenko
  2018-02-02 16:18   ` Bruce Richardson
  2018-02-02 16:19 ` [dpdk-dev] [PATCH 1/2] net/sfc: rename version map file Bruce Richardson
  2018-02-03 13:46 ` [dpdk-dev] [PATCH v2 " Andrew Rybchenko
  2 siblings, 1 reply; 11+ messages in thread
From: Andrew Rybchenko @ 2018-02-02 12:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Ivan Malov

From: Ivan Malov <ivan.malov@oktetlabs.ru>

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/meson.build          |  2 +-
 drivers/net/sfc/base/meson.build | 69 ++++++++++++++++++++++++++++++++++++++++
 drivers/net/sfc/meson.build      | 61 +++++++++++++++++++++++++++++++++++
 3 files changed, 131 insertions(+), 1 deletion(-)
 create mode 100644 drivers/net/sfc/base/meson.build
 create mode 100644 drivers/net/sfc/meson.build

diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index f19a586..704cbe3 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -4,7 +4,7 @@
 drivers = ['af_packet', 'bonding',
 	'e1000', 'fm10k', 'i40e', 'ixgbe',
 	'null', 'octeontx', 'pcap', 'ring',
-	'thunderx']
+	'sfc', 'thunderx']
 std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
 std_deps += ['bus_pci']         # very many PMDs depend on PCI, so make std
 std_deps += ['bus_vdev']        # same with vdev bus
diff --git a/drivers/net/sfc/base/meson.build b/drivers/net/sfc/base/meson.build
new file mode 100644
index 0000000..fad4d4c
--- /dev/null
+++ b/drivers/net/sfc/base/meson.build
@@ -0,0 +1,69 @@
+# Copyright (c) 2016-2018 Solarflare Communications Inc.
+# All rights reserved.
+#
+# This software was jointly developed between OKTET Labs (under contract
+# for Solarflare) and Solarflare Communications, Inc.
+
+sources = [
+	'efx_bootcfg.c',
+	'efx_crc32.c',
+	'efx_ev.c',
+	'efx_filter.c',
+	'efx_hash.c',
+	'efx_intr.c',
+	'efx_lic.c',
+	'efx_mac.c',
+	'efx_mcdi.c',
+	'efx_mon.c',
+	'efx_nic.c',
+	'efx_nvram.c',
+	'efx_phy.c',
+	'efx_port.c',
+	'efx_rx.c',
+	'efx_sram.c',
+	'efx_tunnel.c',
+	'efx_tx.c',
+	'efx_vpd.c',
+	'mcdi_mon.c',
+	'siena_mac.c',
+	'siena_mcdi.c',
+	'siena_nic.c',
+	'siena_nvram.c',
+	'siena_phy.c',
+	'siena_sram.c',
+	'siena_vpd.c',
+	'ef10_ev.c',
+	'ef10_filter.c',
+	'ef10_intr.c',
+	'ef10_mac.c',
+	'ef10_mcdi.c',
+	'ef10_nic.c',
+	'ef10_nvram.c',
+	'ef10_phy.c',
+	'ef10_rx.c',
+	'ef10_tx.c',
+	'ef10_vpd.c',
+	'hunt_nic.c',
+	'medford_nic.c'
+]
+
+extra_flags = [
+	'-Wno-sign-compare',
+	'-Wno-unused-parameter',
+	'-Wno-unused-variable',
+	'-Wno-empty-body',
+	'-Wno-unused-but-set-variable'
+]
+
+c_args = cflags
+foreach flag: extra_flags
+	if cc.has_argument(flag)
+		c_args += flag
+	endif
+endforeach
+
+base_lib = static_library('sfc_base', sources,
+	dependencies: static_rte_eal,
+	c_args: c_args)
+
+base_objs = base_lib.extract_all_objects()
diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
new file mode 100644
index 0000000..b603579
--- /dev/null
+++ b/drivers/net/sfc/meson.build
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Copyright (c) 2016-2018 Solarflare Communications Inc.
+# All rights reserved.
+#
+# This software was jointly developed between OKTET Labs (under contract
+# for Solarflare) and Solarflare Communications, Inc.
+
+allow_experimental_apis = true
+
+extra_flags = []
+extra_flags += '-I' + meson.current_source_dir() + '/base'
+extra_flags += '-I' + meson.current_source_dir()
+extra_flags += '-O3'
+
+# Strict-aliasing rules are violated by rte_eth_link to uint64_t casts
+extra_flags += '-Wno-strict-aliasing'
+
+# Enable more warnings
+extra_flags += [
+	'-Wextra',
+	'-Wdisabled-optimization'
+]
+
+# Compiler and version dependent flags
+extra_flags += [
+	'-Waggregate-return',
+	'-Wnested-externs',
+	'-Wbad-function-cast'
+]
+
+# Suppress ICC false positive warning on 'bulk' may be used before its
+# value is set
+extra_flags += '-wd3656'
+
+foreach flag: extra_flags
+	if cc.has_argument(flag)
+		cflags += flag
+	endif
+endforeach
+
+subdir('base')
+objs = [base_objs]
+
+sources = files(
+	'sfc_ethdev.c',
+	'sfc_kvargs.c',
+	'sfc.c',
+	'sfc_mcdi.c',
+	'sfc_intr.c',
+	'sfc_ev.c',
+	'sfc_port.c',
+	'sfc_rx.c',
+	'sfc_tx.c',
+	'sfc_tso.c',
+	'sfc_filter.c',
+	'sfc_flow.c',
+	'sfc_dp.c',
+	'sfc_ef10_rx.c',
+	'sfc_ef10_tx.c'
+)
-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/sfc: add support for meson build
  2018-02-02 12:43 ` [dpdk-dev] [PATCH 2/2] net/sfc: add support for meson build Andrew Rybchenko
@ 2018-02-02 16:18   ` Bruce Richardson
  2018-02-03 15:33     ` Andrew Rybchenko
  0 siblings, 1 reply; 11+ messages in thread
From: Bruce Richardson @ 2018-02-02 16:18 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dev, Ivan Malov

On Fri, Feb 02, 2018 at 12:43:58PM +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>
> ---
>  drivers/net/meson.build          |  2 +-
>  drivers/net/sfc/base/meson.build | 69 ++++++++++++++++++++++++++++++++++++++++
>  drivers/net/sfc/meson.build      | 61 +++++++++++++++++++++++++++++++++++
>  3 files changed, 131 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/net/sfc/base/meson.build
>  create mode 100644 drivers/net/sfc/meson.build

Hi,

looks pretty good in general. I have a few comments below to improve
things.

Unfortunately, this will break the ARM builds in it's current form too
(or at least it broke the builds using the cross-files that I tested).
I think you need to add a check at the top of the driver meson.build
file for unsupported architectures, and set "build = false" for those
platforms.

/Bruce

<snip>
> diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
> new file mode 100644
> index 0000000..b603579
> --- /dev/null
> +++ b/drivers/net/sfc/meson.build
> @@ -0,0 +1,61 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +#
> +# Copyright (c) 2016-2018 Solarflare Communications Inc.
> +# All rights reserved.
> +#
> +# This software was jointly developed between OKTET Labs (under contract
> +# for Solarflare) and Solarflare Communications, Inc.
> +
> +allow_experimental_apis = true
> +
> +extra_flags = []
> +extra_flags += '-I' + meson.current_source_dir() + '/base'
> +extra_flags += '-I' + meson.current_source_dir()

The driver's own directory is already set in the include path, so it
should not necessary to add it as a cflag. For the base folder, the
"includes" variable should be used rather than the cflags one. These
two lines should just be replaced by:

includes += include_directories('base')

You may also need to put "include_directories: includes," into the
static_library call in the base folder if you have things being included
by base files from the root folder too.

> +extra_flags += '-O3'

The optimisation level is set for the project as a whole, and should not
be overridden in the driver. Otherwise a debug build will not be a debug
build for your driver.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/sfc: rename version map file
  2018-02-02 12:43 [dpdk-dev] [PATCH 1/2] net/sfc: rename version map file Andrew Rybchenko
  2018-02-02 12:43 ` [dpdk-dev] [PATCH 2/2] net/sfc: add support for meson build Andrew Rybchenko
@ 2018-02-02 16:19 ` Bruce Richardson
  2018-02-03 13:46 ` [dpdk-dev] [PATCH v2 " Andrew Rybchenko
  2 siblings, 0 replies; 11+ messages in thread
From: Bruce Richardson @ 2018-02-02 16:19 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dev, Ivan Malov

On Fri, Feb 02, 2018 at 12:43:57PM +0000, Andrew Rybchenko wrote:
> From: Ivan Malov <ivan.malov@oktetlabs.ru>
> 
> The version map filename does not comply with the format
> used by meson build rules for drivers (i.e. on the upper
> level) and needs to be revisited. This patch removes efx
> postfix from the driver title in the filename.
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH v2 1/2] net/sfc: rename version map file
  2018-02-02 12:43 [dpdk-dev] [PATCH 1/2] net/sfc: rename version map file Andrew Rybchenko
  2018-02-02 12:43 ` [dpdk-dev] [PATCH 2/2] net/sfc: add support for meson build Andrew Rybchenko
  2018-02-02 16:19 ` [dpdk-dev] [PATCH 1/2] net/sfc: rename version map file Bruce Richardson
@ 2018-02-03 13:46 ` Andrew Rybchenko
  2018-02-03 13:46   ` [dpdk-dev] [PATCH v2 2/2] net/sfc: add support for meson build Andrew Rybchenko
  2 siblings, 1 reply; 11+ messages in thread
From: Andrew Rybchenko @ 2018-02-03 13:46 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Ivan Malov

From: Ivan Malov <ivan.malov@oktetlabs.ru>

The version map filename does not comply with the format
used by meson build rules for drivers (i.e. on the upper
level) and needs to be revisited. This patch removes efx
postfix from the driver title in the filename.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
v2:
 - no changes

 drivers/net/sfc/Makefile                    | 2 +-
 drivers/net/sfc/rte_pmd_sfc_efx_version.map | 4 ----
 drivers/net/sfc/rte_pmd_sfc_version.map     | 4 ++++
 3 files changed, 5 insertions(+), 5 deletions(-)
 delete mode 100644 drivers/net/sfc/rte_pmd_sfc_efx_version.map
 create mode 100644 drivers/net/sfc/rte_pmd_sfc_version.map

diff --git a/drivers/net/sfc/Makefile b/drivers/net/sfc/Makefile
index cc4e4e5..8a671dd 100644
--- a/drivers/net/sfc/Makefile
+++ b/drivers/net/sfc/Makefile
@@ -60,7 +60,7 @@ BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.
 $(foreach obj, $(BASE_DRIVER_OBJS), \
   $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
 
-EXPORT_MAP := rte_pmd_sfc_efx_version.map
+EXPORT_MAP := rte_pmd_sfc_version.map
 
 LIBABIVER := 1
 
diff --git a/drivers/net/sfc/rte_pmd_sfc_efx_version.map b/drivers/net/sfc/rte_pmd_sfc_efx_version.map
deleted file mode 100644
index 31eca32..0000000
--- a/drivers/net/sfc/rte_pmd_sfc_efx_version.map
+++ /dev/null
@@ -1,4 +0,0 @@
-DPDK_17.02 {
-
-	local: *;
-};
diff --git a/drivers/net/sfc/rte_pmd_sfc_version.map b/drivers/net/sfc/rte_pmd_sfc_version.map
new file mode 100644
index 0000000..31eca32
--- /dev/null
+++ b/drivers/net/sfc/rte_pmd_sfc_version.map
@@ -0,0 +1,4 @@
+DPDK_17.02 {
+
+	local: *;
+};
-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH v2 2/2] net/sfc: add support for meson build
  2018-02-03 13:46 ` [dpdk-dev] [PATCH v2 " Andrew Rybchenko
@ 2018-02-03 13:46   ` Andrew Rybchenko
  2018-02-05 12:30     ` Bruce Richardson
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Rybchenko @ 2018-02-03 13:46 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Ivan Malov

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

diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index f19a586..704cbe3 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -4,7 +4,7 @@
 drivers = ['af_packet', 'bonding',
 	'e1000', 'fm10k', 'i40e', 'ixgbe',
 	'null', 'octeontx', 'pcap', 'ring',
-	'thunderx']
+	'sfc', 'thunderx']
 std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
 std_deps += ['bus_pci']         # very many PMDs depend on PCI, so make std
 std_deps += ['bus_vdev']        # same with vdev bus
diff --git a/drivers/net/sfc/base/meson.build b/drivers/net/sfc/base/meson.build
new file mode 100644
index 0000000..f8314a9
--- /dev/null
+++ b/drivers/net/sfc/base/meson.build
@@ -0,0 +1,70 @@
+# Copyright (c) 2016-2018 Solarflare Communications Inc.
+# All rights reserved.
+#
+# This software was jointly developed between OKTET Labs (under contract
+# for Solarflare) and Solarflare Communications, Inc.
+
+sources = [
+	'efx_bootcfg.c',
+	'efx_crc32.c',
+	'efx_ev.c',
+	'efx_filter.c',
+	'efx_hash.c',
+	'efx_intr.c',
+	'efx_lic.c',
+	'efx_mac.c',
+	'efx_mcdi.c',
+	'efx_mon.c',
+	'efx_nic.c',
+	'efx_nvram.c',
+	'efx_phy.c',
+	'efx_port.c',
+	'efx_rx.c',
+	'efx_sram.c',
+	'efx_tunnel.c',
+	'efx_tx.c',
+	'efx_vpd.c',
+	'mcdi_mon.c',
+	'siena_mac.c',
+	'siena_mcdi.c',
+	'siena_nic.c',
+	'siena_nvram.c',
+	'siena_phy.c',
+	'siena_sram.c',
+	'siena_vpd.c',
+	'ef10_ev.c',
+	'ef10_filter.c',
+	'ef10_intr.c',
+	'ef10_mac.c',
+	'ef10_mcdi.c',
+	'ef10_nic.c',
+	'ef10_nvram.c',
+	'ef10_phy.c',
+	'ef10_rx.c',
+	'ef10_tx.c',
+	'ef10_vpd.c',
+	'hunt_nic.c',
+	'medford_nic.c'
+]
+
+extra_flags = [
+	'-Wno-sign-compare',
+	'-Wno-unused-parameter',
+	'-Wno-unused-variable',
+	'-Wno-empty-body',
+	'-Wno-unused-but-set-variable'
+]
+
+c_args = cflags
+foreach flag: extra_flags
+	if cc.has_argument(flag)
+		c_args += flag
+	endif
+endforeach
+
+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()
diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
new file mode 100644
index 0000000..b60a8f5
--- /dev/null
+++ b/drivers/net/sfc/meson.build
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Copyright (c) 2016-2018 Solarflare Communications Inc.
+# All rights reserved.
+#
+# This software was jointly developed between OKTET Labs (under contract
+# for Solarflare) and Solarflare Communications, Inc.
+
+if arch_subdir != 'x86'
+	build = false
+endif
+
+allow_experimental_apis = true
+
+extra_flags = []
+
+# Strict-aliasing rules are violated by rte_eth_link to uint64_t casts
+extra_flags += '-Wno-strict-aliasing'
+
+# Enable more warnings
+extra_flags += [
+	'-Wextra',
+	'-Wdisabled-optimization'
+]
+
+# Compiler and version dependent flags
+extra_flags += [
+	'-Waggregate-return',
+	'-Wnested-externs',
+	'-Wbad-function-cast'
+]
+
+# Suppress ICC false positive warning on 'bulk' may be used before its
+# value is set
+extra_flags += '-wd3656'
+
+foreach flag: extra_flags
+	if cc.has_argument(flag)
+		cflags += flag
+	endif
+endforeach
+
+subdir('base')
+objs = [base_objs]
+
+sources = files(
+	'sfc_ethdev.c',
+	'sfc_kvargs.c',
+	'sfc.c',
+	'sfc_mcdi.c',
+	'sfc_intr.c',
+	'sfc_ev.c',
+	'sfc_port.c',
+	'sfc_rx.c',
+	'sfc_tx.c',
+	'sfc_tso.c',
+	'sfc_filter.c',
+	'sfc_flow.c',
+	'sfc_dp.c',
+	'sfc_ef10_rx.c',
+	'sfc_ef10_tx.c'
+)
+
+includes += include_directories('base')
-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/sfc: add support for meson build
  2018-02-02 16:18   ` Bruce Richardson
@ 2018-02-03 15:33     ` Andrew Rybchenko
  2018-02-05 10:06       ` Bruce Richardson
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Rybchenko @ 2018-02-03 15:33 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Ivan Malov

On 02/02/2018 07:18 PM, Bruce Richardson wrote:
> On Fri, Feb 02, 2018 at 12:43:58PM +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>
>> ---
>>   drivers/net/meson.build          |  2 +-
>>   drivers/net/sfc/base/meson.build | 69 ++++++++++++++++++++++++++++++++++++++++
>>   drivers/net/sfc/meson.build      | 61 +++++++++++++++++++++++++++++++++++
>>   3 files changed, 131 insertions(+), 1 deletion(-)
>>   create mode 100644 drivers/net/sfc/base/meson.build
>>   create mode 100644 drivers/net/sfc/meson.build
> Hi,
>
> looks pretty good in general. I have a few comments below to improve
> things.
>
> Unfortunately, this will break the ARM builds in it's current form too
> (or at least it broke the builds using the cross-files that I tested).
> I think you need to add a check at the top of the driver meson.build
> file for unsupported architectures, and set "build = false" for those
> platforms.

Many thanks for review notes. Hopefully we have processed everything.
It looks like x86 is the common for 64-bit and 32-bit.
In theory we do not supported 32-bit x86 with make.
I've tried to build on 32-bit host with meson/ninja and the build fails
but earlier than our driver:

../dpdk-next-net/lib/librte_kni/rte_kni.c: In function ‘kni_allocate_mbufs’:
../dpdk-next-net/lib/librte_kni/rte_kni.c:669:2: error: size of unnamed 
array is negative
   RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_off) !=
   ^~~~~~~~~~~~~~~~
../dpdk-next-net/lib/librte_kni/rte_kni.c:671:2: error: size of unnamed 
array is negative
   RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_len) !=
   ^~~~~~~~~~~~~~~~
../dpdk-next-net/lib/librte_kni/rte_kni.c:673:2: error: size of unnamed 
array is negative
   RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) !=
   ^~~~~~~~~~~~~~~~
../dpdk-next-net/lib/librte_kni/rte_kni.c:675:2: error: size of unnamed 
array is negative
   RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, ol_flags) !=
   ^~~~~~~~~~~~~~~~
../dpdk-next-net/lib/librte_kni/rte_kni.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-format-truncation’
cc1: warning: unrecognized command line option 
‘-Wno-address-of-packed-member’
[26/498] Compiling C object 'lib/rte_port@sta/rte_port_kni.c.o'.
ninja: build stopped: subcommand failed.

It is Debian stretch. gcc (Debian 6.3.0-18) 6.3.0 20170516
Does the build on 32-bit x86 work for you?

bash$ meson --version
0.42.1
bash$ ninja --version
1.7.2

Build using make works fine.

Andrew.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/sfc: add support for meson build
  2018-02-03 15:33     ` Andrew Rybchenko
@ 2018-02-05 10:06       ` Bruce Richardson
  0 siblings, 0 replies; 11+ messages in thread
From: Bruce Richardson @ 2018-02-05 10:06 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dev, Ivan Malov

On Sat, Feb 03, 2018 at 06:33:51PM +0300, Andrew Rybchenko wrote:
> On 02/02/2018 07:18 PM, Bruce Richardson wrote:
> > On Fri, Feb 02, 2018 at 12:43:58PM +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>
> > > ---
> > >   drivers/net/meson.build          |  2 +-
> > >   drivers/net/sfc/base/meson.build | 69 ++++++++++++++++++++++++++++++++++++++++
> > >   drivers/net/sfc/meson.build      | 61 +++++++++++++++++++++++++++++++++++
> > >   3 files changed, 131 insertions(+), 1 deletion(-)
> > >   create mode 100644 drivers/net/sfc/base/meson.build
> > >   create mode 100644 drivers/net/sfc/meson.build
> > Hi,
> > 
> > looks pretty good in general. I have a few comments below to improve
> > things.
> > 
> > Unfortunately, this will break the ARM builds in it's current form too
> > (or at least it broke the builds using the cross-files that I tested).
> > I think you need to add a check at the top of the driver meson.build
> > file for unsupported architectures, and set "build = false" for those
> > platforms.
> 
> Many thanks for review notes. Hopefully we have processed everything.
> It looks like x86 is the common for 64-bit and 32-bit.
> In theory we do not supported 32-bit x86 with make.
> I've tried to build on 32-bit host with meson/ninja and the build fails
> but earlier than our driver:
> 
> ../dpdk-next-net/lib/librte_kni/rte_kni.c: In function ‘kni_allocate_mbufs’:
> ../dpdk-next-net/lib/librte_kni/rte_kni.c:669:2: error: size of unnamed
> array is negative
>   RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_off) !=
>   ^~~~~~~~~~~~~~~~
> ../dpdk-next-net/lib/librte_kni/rte_kni.c:671:2: error: size of unnamed
> array is negative
>   RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_len) !=
>   ^~~~~~~~~~~~~~~~
> ../dpdk-next-net/lib/librte_kni/rte_kni.c:673:2: error: size of unnamed
> array is negative
>   RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) !=
>   ^~~~~~~~~~~~~~~~
> ../dpdk-next-net/lib/librte_kni/rte_kni.c:675:2: error: size of unnamed
> array is negative
>   RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, ol_flags) !=
>   ^~~~~~~~~~~~~~~~
> ../dpdk-next-net/lib/librte_kni/rte_kni.c: At top level:
> cc1: warning: unrecognized command line option ‘-Wno-format-truncation’
> cc1: warning: unrecognized command line option
> ‘-Wno-address-of-packed-member’
> [26/498] Compiling C object 'lib/rte_port@sta/rte_port_kni.c.o'.
> ninja: build stopped: subcommand failed.
> 
> It is Debian stretch. gcc (Debian 6.3.0-18) 6.3.0 20170516
> Does the build on 32-bit x86 work for you?
> 
> bash$ meson --version
> 0.42.1
> bash$ ninja --version
> 1.7.2
> 
> Build using make works fine.
> 
Yes, I haven't investigated getting 32-bit builds working yet on meson,
due to time constraints. It should be fixed soon in the 18.05 release, I
hope.

At this point for meson patches, the main requirement is to not break
anything that is already confirmed as working. Beyond that, additional
support is always welcome, but not required. :-)

/Bruce

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH v2 2/2] net/sfc: add support for meson build
  2018-02-03 13:46   ` [dpdk-dev] [PATCH v2 2/2] net/sfc: add support for meson build Andrew Rybchenko
@ 2018-02-05 12:30     ` Bruce Richardson
  2018-02-05 12:33       ` Andrew Rybchenko
  0 siblings, 1 reply; 11+ messages in thread
From: Bruce Richardson @ 2018-02-05 12:30 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dev, Ivan Malov

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

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH v2 2/2] net/sfc: add support for meson build
  2018-02-05 12:30     ` Bruce Richardson
@ 2018-02-05 12:33       ` Andrew Rybchenko
  2018-02-05 14:00         ` Bruce Richardson
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Rybchenko @ 2018-02-05 12:33 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Ivan Malov

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
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH v2 2/2] net/sfc: add support for meson build
  2018-02-05 12:33       ` Andrew Rybchenko
@ 2018-02-05 14:00         ` Bruce Richardson
  0 siblings, 0 replies; 11+ messages in thread
From: Bruce Richardson @ 2018-02-05 14:00 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dev, Ivan Malov

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-02-05 14:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-02 12:43 [dpdk-dev] [PATCH 1/2] net/sfc: rename version map file Andrew Rybchenko
2018-02-02 12:43 ` [dpdk-dev] [PATCH 2/2] net/sfc: add support for meson build Andrew Rybchenko
2018-02-02 16:18   ` Bruce Richardson
2018-02-03 15:33     ` Andrew Rybchenko
2018-02-05 10:06       ` Bruce Richardson
2018-02-02 16:19 ` [dpdk-dev] [PATCH 1/2] net/sfc: rename version map file Bruce Richardson
2018-02-03 13:46 ` [dpdk-dev] [PATCH v2 " Andrew Rybchenko
2018-02-03 13:46   ` [dpdk-dev] [PATCH v2 2/2] net/sfc: add support for meson build Andrew Rybchenko
2018-02-05 12:30     ` Bruce Richardson
2018-02-05 12:33       ` Andrew Rybchenko
2018-02-05 14:00         ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).