Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/27541/?format=api
http://patches.dpdk.org/api/patches/27541/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20170814095208.166496-7-bruce.richardson@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20170814095208.166496-7-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20170814095208.166496-7-bruce.richardson@intel.com", "date": "2017-08-14T09:51:34", "name": "[dpdk-dev,RFCv2,06/40] build: add i40e driver to meson build", "commit_ref": null, "pull_url": null, "state": "rfc", "archived": true, "hash": "3e9fb264040a094c8c308f2e05cf73f07b6a9606", "submitter": { "id": 20, "url": "http://patches.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20170814095208.166496-7-bruce.richardson@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/27541/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/27541/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 105EB9975;\n\tMon, 14 Aug 2017 12:03:35 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 304AB9171\n\tfor <dev@dpdk.org>; Mon, 14 Aug 2017 12:03:21 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t14 Aug 2017 03:03:13 -0700", "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.223.223])\n\tby orsmga004.jf.intel.com with ESMTP; 14 Aug 2017 03:03:12 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.41,372,1498546800\"; d=\"scan'208\";a=\"118723693\"", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Cc": "thomas@monjalon.net,\n\tBruce Richardson <bruce.richardson@intel.com>", "Date": "Mon, 14 Aug 2017 10:51:34 +0100", "Message-Id": "<20170814095208.166496-7-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.13.4", "In-Reply-To": "<20170814095208.166496-1-bruce.richardson@intel.com>", "References": "<20170814095208.166496-1-bruce.richardson@intel.com>", "Subject": "[dpdk-dev] [RFCv2 06/40] build: add i40e driver to meson build", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n config/rte_config.h | 14 ++++++++\n drivers/meson.build | 32 ++++++++++++++++++\n drivers/net/i40e/base/meson.build | 55 ++++++++++++++++++++++++++++++\n drivers/net/i40e/meson.build | 70 +++++++++++++++++++++++++++++++++++++++\n drivers/net/meson.build | 32 ++++++++++++++++++\n meson.build | 7 ++++\n 6 files changed, 210 insertions(+)\n create mode 100644 drivers/meson.build\n create mode 100644 drivers/net/i40e/base/meson.build\n create mode 100644 drivers/net/i40e/meson.build\n create mode 100644 drivers/net/meson.build", "diff": "diff --git a/config/rte_config.h b/config/rte_config.h\nindex 4d5f7214c..5b687bb8e 100644\n--- a/config/rte_config.h\n+++ b/config/rte_config.h\n@@ -47,6 +47,8 @@\n \n #include <rte_build_config.h>\n \n+/****** library defines ********/\n+\n /* EAL defines */\n #define RTE_MAX_MEMSEG 512\n #define RTE_MAX_MEMZONE 2560\n@@ -70,4 +72,16 @@\n #define RTE_ETHDEV_QUEUE_STAT_CNTRS 16\n #define RTE_ETHDEV_RXTX_CALLBACKS 1\n \n+/****** driver defines ********/\n+\n+/* i40e defines */\n+#define RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC 1\n+#define RTE_LIBRTE_I40E_INC_VECTOR 1\n+#undef RTE_LIBRTE_I40E_16BYTE_RX_DESC\n+#define RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF 64\n+#define RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF 4\n+#define RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM 4\n+/* interval up to 8160 us, aligned to 2 (or default value) */\n+#define RTE_LIBRTE_I40E_ITR_INTERVAL -1\n+\n #endif /* _RTE_CONFIG_H_ */\ndiff --git a/drivers/meson.build b/drivers/meson.build\nnew file mode 100644\nindex 000000000..57f47c36f\n--- /dev/null\n+++ b/drivers/meson.build\n@@ -0,0 +1,32 @@\n+# BSD LICENSE\n+#\n+# Copyright(c) 2017 Intel Corporation. All rights reserved.\n+# All rights reserved.\n+#\n+# Redistribution and use in source and binary forms, with or without\n+# modification, are permitted provided that the following conditions\n+# are met:\n+#\n+# * Redistributions of source code must retain the above copyright\n+# notice, this list of conditions and the following disclaimer.\n+# * Redistributions in binary form must reproduce the above copyright\n+# notice, this list of conditions and the following disclaimer in\n+# the documentation and/or other materials provided with the\n+# distribution.\n+# * Neither the name of Intel Corporation nor the names of its\n+# contributors may be used to endorse or promote products derived\n+# from this software without specific prior written permission.\n+#\n+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+subdir('net')\ndiff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build\nnew file mode 100644\nindex 000000000..43399cb11\n--- /dev/null\n+++ b/drivers/net/i40e/base/meson.build\n@@ -0,0 +1,55 @@\n+# BSD LICENSE\n+#\n+# Copyright(c) 2017 Intel Corporation. All rights reserved.\n+# All rights reserved.\n+#\n+# Redistribution and use in source and binary forms, with or without\n+# modification, are permitted provided that the following conditions\n+# are met:\n+#\n+# * Redistributions of source code must retain the above copyright\n+# notice, this list of conditions and the following disclaimer.\n+# * Redistributions in binary form must reproduce the above copyright\n+# notice, this list of conditions and the following disclaimer in\n+# the documentation and/or other materials provided with the\n+# distribution.\n+# * Neither the name of Intel Corporation nor the names of its\n+# contributors may be used to endorse or promote products derived\n+# from this software without specific prior written permission.\n+#\n+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+sources = [\n+\t'i40e_adminq.c',\n+\t'i40e_common.c',\n+\t'i40e_dcb.c',\n+\t'i40e_diag.c',\n+\t'i40e_hmc.c',\n+\t'i40e_lan_hmc.c',\n+\t'i40e_nvm.c'\n+]\n+\n+error_cflags = ['-Wno-sign-compare',\n+\t\t'-Wno-unused-value',\n+\t\t'-Wno-format',\n+\t\t'-Wno-unused-but-set-variable']\n+c_args = i40e_cflags\n+foreach flag: error_cflags\n+\tif cc.has_argument(flag)\n+\t\tc_args += flag\n+\tendif\n+endforeach\n+\n+base_lib = static_library('i40e_base', sources,\n+\tdependencies: rte_eal,\n+\tc_args: c_args)\ndiff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build\nnew file mode 100644\nindex 000000000..1e23e0820\n--- /dev/null\n+++ b/drivers/net/i40e/meson.build\n@@ -0,0 +1,70 @@\n+# BSD LICENSE\n+#\n+# Copyright(c) 2017 Intel Corporation. All rights reserved.\n+# All rights reserved.\n+#\n+# Redistribution and use in source and binary forms, with or without\n+# modification, are permitted provided that the following conditions\n+# are met:\n+#\n+# * Redistributions of source code must retain the above copyright\n+# notice, this list of conditions and the following disclaimer.\n+# * Redistributions in binary form must reproduce the above copyright\n+# notice, this list of conditions and the following disclaimer in\n+# the documentation and/or other materials provided with the\n+# distribution.\n+# * Neither the name of Intel Corporation nor the names of its\n+# contributors may be used to endorse or promote products derived\n+# from this software without specific prior written permission.\n+#\n+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+i40e_cflags = ['-DPF_DRIVER',\n+\t'-DVF_DRIVER',\n+\t'-DINTEGRATED_VF',\n+\t'-DX722_A0_SUPPORT']\n+\n+subdir('base')\n+\n+sources = [\n+\t'i40e_ethdev.c',\n+\t'i40e_rxtx.c',\n+\t'i40e_ethdev_vf.c',\n+\t'i40e_pf.c',\n+\t'i40e_fdir.c',\n+\t'i40e_flow.c',\n+\t'i40e_tm.c',\n+\t'rte_pmd_i40e.c'\n+\t]\n+\n+if arch_subdir == 'x86'\n+\tsources += 'i40e_rxtx_vec_sse.c'\n+endif\n+\n+install_headers('rte_pmd_i40e.h')\n+\n+i40e_lib = library('rte_pmd_i40e', sources,\n+\tinclude_directories: include_directories('base'),\n+\tdependencies: [rte_eal, rte_net,\n+\t\t\trte_mbuf, rte_ether,\n+\t\t\trte_mempool, rte_ring,\n+\t\t\trte_hash, rte_kvargs],\n+\tlink_with: base_lib,\n+\tc_args: i40e_cflags,\n+\tinstall: true,\n+\tinstall_dir: 'dpdk/drivers')\n+\n+dpdk_drivers += i40e_lib\n+\n+i40e_pmd = declare_dependency(link_with: i40e_lib,\n+\tinclude_directories: include_directories('.'))\ndiff --git a/drivers/net/meson.build b/drivers/net/meson.build\nnew file mode 100644\nindex 000000000..22237b1aa\n--- /dev/null\n+++ b/drivers/net/meson.build\n@@ -0,0 +1,32 @@\n+# BSD LICENSE\n+#\n+# Copyright(c) 2017 Intel Corporation. All rights reserved.\n+# All rights reserved.\n+#\n+# Redistribution and use in source and binary forms, with or without\n+# modification, are permitted provided that the following conditions\n+# are met:\n+#\n+# * Redistributions of source code must retain the above copyright\n+# notice, this list of conditions and the following disclaimer.\n+# * Redistributions in binary form must reproduce the above copyright\n+# notice, this list of conditions and the following disclaimer in\n+# the documentation and/or other materials provided with the\n+# distribution.\n+# * Neither the name of Intel Corporation nor the names of its\n+# contributors may be used to endorse or promote products derived\n+# from this software without specific prior written permission.\n+#\n+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+subdir('i40e')\ndiff --git a/meson.build b/meson.build\nindex d797bbbb2..930656da6 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -40,6 +40,7 @@ project('DPDK', 'C',\n cc = meson.get_compiler('c')\n dpdk_conf = configuration_data()\n dpdk_libraries = []\n+dpdk_drivers = []\n \n # for static libs, treat the drivers as regular libraries, otherwise\n # for shared libs, put them in a driver folder\n@@ -56,6 +57,7 @@ subdir('config')\n \n # now build libs and drivers\n subdir('lib')\n+subdir('drivers')\n \n # write the build config\n build_cfg = 'rte_build_config.h'\n@@ -63,6 +65,11 @@ configure_file(output: build_cfg,\n \t\tconfiguration: dpdk_conf,\n \t\tinstall_dir: get_option('includedir'))\n \n+# for static builds, include the drivers directly\n+if get_option('default_library') == 'static'\n+\tdpdk_libraries = dpdk_drivers + dpdk_libraries\n+endif\n+\n # the DPDK libs needs to be passed to the link command in reverse order\n dpdk_link_libs = []\n foreach lib: dpdk_libraries\n", "prefixes": [ "dpdk-dev", "RFCv2", "06/40" ] }{ "id": 27541, "url": "