get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 35356,
    "url": "http://patches.dpdk.org/api/patches/35356/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180222173817.31872-1-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": "<20180222173817.31872-1-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180222173817.31872-1-bruce.richardson@intel.com",
    "date": "2018-02-22T17:38:17",
    "name": "[dpdk-dev] build: clean up building kernel modules using meson",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b7e0097cae73b07630a19098abbc2dcce3f529cc",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 10,
        "url": "http://patches.dpdk.org/api/users/10/?format=api",
        "username": "bruce",
        "first_name": "Bruce",
        "last_name": "Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180222173817.31872-1-bruce.richardson@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/35356/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/35356/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C80511B016;\n\tThu, 22 Feb 2018 18:38:23 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 3415DA48C\n\tfor <dev@dpdk.org>; Thu, 22 Feb 2018 18:38:22 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t22 Feb 2018 09:38:21 -0800",
            "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.223.223])\n\tby FMSMGA003.fm.intel.com with ESMTP; 22 Feb 2018 09:38:20 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.47,378,1515484800\"; d=\"scan'208\";a=\"29061707\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "hemant.agrawal@nxp.com,\n\tBruce Richardson <bruce.richardson@intel.com>",
        "Date": "Thu, 22 Feb 2018 17:38:17 +0000",
        "Message-Id": "<20180222173817.31872-1-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.14.3",
        "Subject": "[dpdk-dev] [PATCH] build: clean up building kernel modules using\n\tmeson",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://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": "<https://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": "The meson.build files for building the kernel modules directory could\nbe improved now that it is extracted from the EAL. For example, no\nglobal processing is necessary inside the kernel folder, just need to\nsubdir to the appropriate bsd or linux folder to do the actual work.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\nNOTE: this patch depends upon patch #35336, to move kernel modules to\n  a top-level \"kernel\" folder.\n---\n kernel/freebsd/BSDmakefile.meson | 47 ++++++++++------------------------------\n kernel/freebsd/meson.build       | 26 ++++++++++++++++++++++\n kernel/linux/meson.build         |  8 +++++++\n kernel/meson.build               | 44 +------------------------------------\n 4 files changed, 46 insertions(+), 79 deletions(-)\n create mode 100644 kernel/freebsd/meson.build\n create mode 100644 kernel/linux/meson.build",
    "diff": "diff --git a/kernel/freebsd/BSDmakefile.meson b/kernel/freebsd/BSDmakefile.meson\nindex 42f5b2b9d..6839ac01c 100644\n--- a/kernel/freebsd/BSDmakefile.meson\n+++ b/kernel/freebsd/BSDmakefile.meson\n@@ -1,43 +1,18 @@\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+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2017 Intel Corporation\n \n # makefile for building kernel modules using meson\n # takes parameters from the environment\n \n-# source file is passed via KMOD_SRC as full path, we only use final\n-# component of it, as VPATH is used to find actual file, so as to\n-# have the .o files placed in the build, not source directory\n-VPATH = ${KMOD_SRC:H}\n-SRCS = ${KMOD_SRC:T} device_if.h bus_if.h pci_if.h\n+# source file is passed via KMOD_SRC as relative path, we only use final\n+# (tail) component of it (:T), as VPATH is used to find actual file. The\n+# VPATH is similarly extracted from the non-final (head) portion of the\n+# path (:H) converted to absolute path (:tA).  This use of VPATH is to have\n+# the .o files placed in the build, not source directory\n+\n+VPATH := ${KMOD_SRC:H:tA}\n+SRCS := ${KMOD_SRC:T} device_if.h bus_if.h pci_if.h\n CFLAGS += $(KMOD_CFLAGS)\n+.OBJDIR: ${KMOD_OBJDIR}\n \n .include <bsd.kmod.mk>\ndiff --git a/kernel/freebsd/meson.build b/kernel/freebsd/meson.build\nnew file mode 100644\nindex 000000000..d68c46d81\n--- /dev/null\n+++ b/kernel/freebsd/meson.build\n@@ -0,0 +1,26 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2018 Intel Corporation\n+\n+kmods = ['contigmem', 'nic_uio']\n+\n+# for building kernel modules, we use kernel build system using make, as\n+# with Linux. We have a skeleton BSDmakefile, which pulls many of its\n+# values from the environment. Each module only has a single source file\n+# right now, which allows us to simplify things. We pull in the sourcer\n+# files from the individual meson.build files, and then use a custom\n+# target to call make, passing in the values as env parameters.\n+kmod_cflags = ['-I' + meson.build_root(),\n+\t\t'-I' + join_paths(meson.source_root(), 'config'),\n+\t\t'-include rte_config.h']\n+foreach k:kmods\n+\tsubdir(k)\n+\tcustom_target(k,\n+\t\tinput: [files('BSDmakefile.meson'), sources],\n+\t\toutput: k + '.ko',\n+\t\tcommand: ['make', '-f', '@INPUT0@',\n+\t\t\t'KMOD_OBJDIR=@OUTDIR@',\n+\t\t\t'KMOD_SRC=@INPUT1@',\n+\t\t\t'KMOD=' + k,\n+\t\t\t'KMOD_CFLAGS=' + ' '.join(kmod_cflags)],\n+\t\tbuild_by_default: get_option('enable_kmods'))\n+endforeach\ndiff --git a/kernel/linux/meson.build b/kernel/linux/meson.build\nnew file mode 100644\nindex 000000000..a5b88f0c6\n--- /dev/null\n+++ b/kernel/linux/meson.build\n@@ -0,0 +1,8 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2018 Intel Corporation\n+\n+subdirs = ['igb_uio']\n+\n+foreach d:subdirs\n+\tsubdir(d)\n+endforeach\ndiff --git a/kernel/meson.build b/kernel/meson.build\nindex 697c419b6..2c8fa76d0 100644\n--- a/kernel/meson.build\n+++ b/kernel/meson.build\n@@ -1,46 +1,4 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2017 Intel Corporation\n \n-# Initially pull in common settings\n-#eal_inc = [global_inc]\n-#subdir('common') # defines common_sources, common_objs, etc.\n-\n-# Now do OS/exec-env specific settings, including building kernel modules\n-# The <exec-env>/eal/meson.build file should define env_sources, etc.\n-if host_machine.system() == 'linux'\n-\tdpdk_conf.set('RTE_EXEC_ENV_LINUXAPP', 1)\n-\tsubdir('linux/igb_uio')\n-\n-elif host_machine.system() == 'freebsd'\n-\tdpdk_conf.set('RTE_EXEC_ENV_BSDAPP', 1)\n-\tkmods = ['contigmem', 'nic_uio']\n-\n-\t# for building kernel modules, we use kernel build system using make, as\n-\t# with Linux. We have a skeleton BSDmakefile, which pulls many of its\n-\t# values from the environment. Each module only has a single source file\n-\t# right now, which allows us to simplify things. We pull in the sourcer\n-\t# files from the individual meson.build files, and then use a custom\n-\t# target to call make, passing in the values as env parameters.\n-\tkmod_cflags = ['-I' + meson.build_root(),\n-\t\t\t'-I' + join_paths(meson.source_root(), 'config'),\n-\t\t\t'-include rte_config.h']\n-\tforeach k:kmods\n-\t\tsubdir(join_paths('freebsd', k))\n-\t\tcustom_target(k,\n-\t\t\tinput: [files('freebsd/BSDmakefile.meson'), sources],\n-\t\t\toutput: k + '.ko',\n-\t\t\tcommand: ['make', '-f', '@INPUT0@',\n-\t\t\t\t'KMOD_SRC=@INPUT1@',\n-\t\t\t\t'KMOD=' + k,\n-\t\t\t\t'KMOD_CFLAGS=' + ' '.join(kmod_cflags)],\n-\t\t\tbuild_by_default: get_option('enable_kmods'))\n-\tendforeach\n-else\n-\terror('unsupported system type @0@'.format(hostmachine.system()))\n-endif\n-\n-cflags += '-D_GNU_SOURCE'\n-sources = common_sources + env_sources\n-objs = common_objs + env_objs\n-headers = common_headers + env_headers\n-includes = eal_inc\n+subdir(host_machine.system())\n",
    "prefixes": [
        "dpdk-dev"
    ]
}