get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/28254/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 28254,
    "url": "http://patches.dpdk.org/api/patches/28254/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20170901100416.80264-2-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": "<20170901100416.80264-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170901100416.80264-2-bruce.richardson@intel.com",
    "date": "2017-09-01T10:04:00",
    "name": "[dpdk-dev,01/17] build: add initial infrastructure for meson & ninja builds",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a210df3889420c7d381889ac86e2847903e3ffc2",
    "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/20170901100416.80264-2-bruce.richardson@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/28254/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/28254/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 2A72458F6;\n\tFri,  1 Sep 2017 12:18:12 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id E981E58F6\n\tfor <dev@dpdk.org>; Fri,  1 Sep 2017 12:18:09 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Sep 2017 03:18:09 -0700",
            "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.223.223])\n\tby fmsmga004.fm.intel.com with ESMTP; 01 Sep 2017 03:18:08 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,457,1498546800\"; d=\"scan'208\";a=\"306892478\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Fri,  1 Sep 2017 11:04:00 +0100",
        "Message-Id": "<20170901100416.80264-2-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.13.5",
        "In-Reply-To": "<20170901100416.80264-1-bruce.richardson@intel.com>",
        "References": "<20170901100416.80264-1-bruce.richardson@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 01/17] build: add initial infrastructure for\n\tmeson & ninja builds",
        "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": "To build with meson and ninja, we need some initial infrastructure in\nplace. The build files for meson always need to be called \"meson.build\",\nand options get placed in meson_options.txt\n\nThis commit adds a top-level meson.build file, which sets up the global\nvariables for tracking drivers, libraries, etc., and then includes other\nbuild files, before finishing by writing the global build configuration\nheader file and a DPDK pkgconfig file at the end, using some of those same\nglobals.\n\nFrom the top level build file, the only include file thus far is for the\nconfig folder, which does some other setup of global configuration\nparameters, including pulling in architecture specific parameters from an\narchitectural subdirectory. A number of configuration build options are\nprovided for the project to tune a number of global variables which will be\nused later e.g. max numa nodes, max cores, etc. These settings all make\ntheir way to the global build config header \"rte_build_config.h\". There is\nalso a file \"rte_config.h\", which includes \"rte_build_config.h\", and this\nfile is meant to hold other build-time values which are present in our\ncurrent static build configuration but are not normally meant for\nuser-configuration. Ideally, over time, the values placed here should be\nmoved to the individual libraries or drivers which want those values.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n config/meson.build     | 69 +++++++++++++++++++++++++++++++++++++++++\n config/rte_config.h    | 50 ++++++++++++++++++++++++++++++\n config/x86/meson.build | 70 ++++++++++++++++++++++++++++++++++++++++++\n meson.build            | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++\n meson_options.txt      |  6 ++++\n 5 files changed, 278 insertions(+)\n create mode 100644 config/meson.build\n create mode 100644 config/rte_config.h\n create mode 100644 config/x86/meson.build\n create mode 100644 meson.build\n create mode 100644 meson_options.txt",
    "diff": "diff --git a/config/meson.build b/config/meson.build\nnew file mode 100644\nindex 000000000..3a6bcc58d\n--- /dev/null\n+++ b/config/meson.build\n@@ -0,0 +1,69 @@\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+# set the machine type and cflags for it\n+machine = get_option('machine')\n+dpdk_conf.set('RTE_MACHINE', machine)\n+add_project_arguments('-march=@0@'.format(machine), language: 'c')\n+# some libs depend on maths lib\n+add_project_link_arguments('-lm', language: 'c')\n+\n+# add -include rte_config to cflags\n+add_project_arguments('-include', 'rte_config.h', language: 'c')\n+\n+# disable any unwanted warnings\n+unwanted_warnings = [\n+\t'-Wno-address-of-packed-member',\n+\t'-Wno-format-truncation'\n+]\n+foreach arg: unwanted_warnings\n+\tif cc.has_argument(arg)\n+\t\tadd_project_arguments(arg, language: 'c')\n+\tendif\n+endforeach\n+\n+compile_time_cpuflags = []\n+if host_machine.cpu_family().startswith('x86')\n+\tarch_subdir = 'x86'\n+\tsubdir(arch_subdir)\n+endif\n+dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))\n+\n+# set the install path for the drivers\n+dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', driver_install_path)\n+\n+# set other values pulled from the build options\n+dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores'))\n+dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes'))\n+dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet'))\n+dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id'))\n+\n+install_headers('rte_config.h')\ndiff --git a/config/rte_config.h b/config/rte_config.h\nnew file mode 100644\nindex 000000000..79b0db90f\n--- /dev/null\n+++ b/config/rte_config.h\n@@ -0,0 +1,50 @@\n+/*\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2016 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+\n+/**\n+ * @file Header file containing DPDK compilation parameters\n+ *\n+ * Header file containing DPDK compilation parameters. Also include the\n+ * meson-generated header file containing the detected parameters that\n+ * are variable across builds or build environments.\n+ *\n+ * NOTE: This file is only used for meson+ninja builds. For builds done\n+ * using make/gmake, the rte_config.h file is autogenerated from the\n+ * defconfig_* files in the config directory.\n+ */\n+#ifndef _RTE_CONFIG_H_\n+#define _RTE_CONFIG_H_\n+\n+#include <rte_build_config.h>\n+\n+#endif /* _RTE_CONFIG_H_ */\ndiff --git a/config/x86/meson.build b/config/x86/meson.build\nnew file mode 100644\nindex 000000000..54f8bcdb6\n--- /dev/null\n+++ b/config/x86/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+# for checking defines we need to use the correct compiler flags\n+march_opt = '-march=@0@'.format(machine)\n+\n+# we require SSE4.2 for DPDK\n+sse_errormsg = '''SSE4.2 instruction set is required for DPDK.\n+Please set the machine type to \"nehalem\" or \"corei7\" or higher value'''\n+\n+if cc.get_define('__SSE4_2__', args: march_opt) == ''\n+\terror(sse_errormsg)\n+endif\n+\n+dpdk_conf.set('RTE_ARCH_X86', 1)\n+if (host_machine.cpu_family() == 'x86_64')\n+\tdpdk_conf.set('RTE_ARCH_X86_64', 1)\n+\tdpdk_conf.set('RTE_ARCH', 'x86_64')\n+\tdpdk_conf.set('RTE_ARCH_64', 1)\n+else\n+\tdpdk_conf.set('RTE_ARCH_I686', 1)\n+\tdpdk_conf.set('RTE_ARCH', 'i686')\n+endif\n+\n+if cc.get_define('__AES__', args: march_opt) != ''\n+\tdpdk_conf.set('RTE_MACHINE_CPUFLAG_AES', 1)\n+\tcompile_time_cpuflags += ['RTE_CPUFLAG_AES']\n+endif\n+if cc.get_define('__PCLMUL__', args: march_opt) != ''\n+\tdpdk_conf.set('RTE_MACHINE_CPUFLAG_PCLMULQDQ', 1)\n+\tcompile_time_cpuflags += ['RTE_CPUFLAG_PCLMULQDQ']\n+endif\n+if cc.get_define('__AVX__', args: march_opt) != ''\n+\tdpdk_conf.set('RTE_MACHINE_CPUFLAG_AVX', 1)\n+\tcompile_time_cpuflags += ['RTE_CPUFLAG_AVX']\n+endif\n+if cc.get_define('__AVX2__', args: march_opt) != ''\n+\tdpdk_conf.set('RTE_MACHINE_CPUFLAG_AVX2', 1)\n+\tcompile_time_cpuflags += ['RTE_CPUFLAG_AVX2']\n+endif\n+\n+dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)\ndiff --git a/meson.build b/meson.build\nnew file mode 100644\nindex 000000000..42e94fe18\n--- /dev/null\n+++ b/meson.build\n@@ -0,0 +1,83 @@\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+project('DPDK', 'C',\n+\tversion: '17.08.0',\n+\tlicense: 'BSD',\n+\tdefault_options: ['buildtype=release'],\n+\tmeson_version: '>= 0.41'\n+)\n+\n+# set up some global vars for compiler, platform, configuration, etc.\n+cc = meson.get_compiler('c')\n+dpdk_conf = configuration_data()\n+dpdk_libraries = []\n+dpdk_drivers = []\n+dpdk_extra_ldflags = []\n+\n+# for static libs, treat the drivers as regular libraries, otherwise\n+# for shared libs, put them in a driver folder\n+if get_option('default_library') == 'static'\n+\tdriver_install_path = get_option('libdir')\n+else\n+\tdriver_install_path = '@0@/dpdk/drivers'.format(get_option('prefix'))\n+endif\n+\n+# configure the build, and make sure configs here and in config folder are\n+# able to be included in any file. We also store a global array of include dirs\n+# for passing to pmdinfogen scripts\n+global_inc = include_directories('.', 'config')\n+subdir('config')\n+\n+# TODO build libs and drivers\n+\n+# TODO build binaries and installable tools\n+\n+# write the build config\n+build_cfg = 'rte_build_config.h'\n+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 as libs, and also any\n+# other dependent libs that DPDK needs to link against\n+if get_option('default_library') == 'static'\n+\tdpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']\n+\tdpdk_libraries = dpdk_drivers + dpdk_libraries + dpdk_extra_ldflags\n+endif\n+\n+pkg = import('pkgconfig')\n+pkg.generate(name: meson.project_name(),\n+\tversion: meson.project_version(),\n+\tlibraries: dpdk_libraries,\n+\tdescription: 'The Data Plane Development Kit (DPDK)',\n+\textra_cflags: '-include \"rte_config.h\"'\n+)\ndiff --git a/meson_options.txt b/meson_options.txt\nnew file mode 100644\nindex 000000000..c03b79fbd\n--- /dev/null\n+++ b/meson_options.txt\n@@ -0,0 +1,6 @@\n+option('machine', type: 'string', value: 'native', description: 'set the target machine type')\n+option('max_lcores', type: 'string', value: '128', description: 'maximum number of cores/threads supported by EAL')\n+option('max_numa_nodes', type: 'string', value: '4', description: 'maximum number of NUMA nodes supported by EAL')\n+option('use_hpet', type: 'boolean', value: false, description: 'use HPET timer in EAL')\n+option('allow_invalid_socket_id', type: 'boolean', value: false,\n+\tdescription: 'allow out-of-range NUMA socket id\\'s for platforms that don\\'t report the value correctly')\n",
    "prefixes": [
        "dpdk-dev",
        "01/17"
    ]
}