From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
Ivan Malov <ivan.malov@oktetlabs.ru>
Subject: [dpdk-dev] [PATCH v2 2/2] net/sfc: add support for meson build
Date: Sat, 3 Feb 2018 13:46:34 +0000 [thread overview]
Message-ID: <1517665594-3303-2-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1517665594-3303-1-git-send-email-arybchenko@solarflare.com>
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
next prev parent reply other threads:[~2018-02-03 13:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Andrew Rybchenko [this message]
2018-02-05 12:30 ` [dpdk-dev] [PATCH v2 2/2] net/sfc: add support for meson build Bruce Richardson
2018-02-05 12:33 ` Andrew Rybchenko
2018-02-05 14:00 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1517665594-3303-2-git-send-email-arybchenko@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=ivan.malov@oktetlabs.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).