get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 28259,
    "url": "https://patches.dpdk.org/api/patches/28259/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20170901100416.80264-7-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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-7-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170901100416.80264-7-bruce.richardson@intel.com",
    "date": "2017-09-01T10:04:05",
    "name": "[dpdk-dev,06/17] build: add infrastructure for building PMDs",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3c0d7e0f573403e179f9b33611fc3e419fe06d5e",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20170901100416.80264-7-bruce.richardson@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/28259/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/28259/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 69AB17CE1;\n\tFri,  1 Sep 2017 12:18:21 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 7F0C67CD7\n\tfor <dev@dpdk.org>; Fri,  1 Sep 2017 12:18:19 +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:18 -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:17 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,457,1498546800\"; d=\"scan'208\";a=\"306892546\"",
        "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:05 +0100",
        "Message-Id": "<20170901100416.80264-7-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 06/17] build: add infrastructure for building PMDs",
        "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": "Add in the top-level drivers meson.build file to start adding in building\nof PMDs. Since all PMDs are built in pretty much the same way, the logic\nfor building each PMD, including extracting the pmdinfo, is included in the\ntop level build file. This means that each individual driver class only\nneeds to specify its default dependencies and a few naming conventions, and\neach driver only needs to specify it's source files, headers, etc.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/meson.build | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++\n meson.build         |   3 +-\n 2 files changed, 123 insertions(+), 1 deletion(-)\n create mode 100644 drivers/meson.build",
    "diff": "diff --git a/drivers/meson.build b/drivers/meson.build\nnew file mode 100644\nindex 000000000..35aa568c9\n--- /dev/null\n+++ b/drivers/meson.build\n@@ -0,0 +1,121 @@\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+driver_classes = []\n+\n+foreach class:driver_classes\n+\tdrivers = []\n+\tstd_deps = []\n+\tconfig_flag_fmt = '' # format string used to set the value in dpdk_conf\n+\tdriver_name_fmt = '' # format string for driver name, used to name\n+\t                     # the library, the dependency and to find the\n+\t                     # version file for linking\n+\n+\tsubdir(class)\n+\n+\tforeach drv:drivers\n+\t\tdrv_path = join_paths(class, drv)\n+\n+\t\t# set up empty variables used for build\n+\t\tbuild = true # set to false to disable, e.g. missing deps\n+\t\tversion = 1\n+\t\tsources = []\n+\t\tobjs = []\n+\t\tcflags = []\n+\t\tincludes = [include_directories(drv_path)]\n+\t\t# set up internal deps. Drivers can append/override as necessary\n+\t\tdeps = std_deps\n+\t\t# ext_deps: Stores external library dependency got\n+\t\t# using dependency() or cc.find_library(). For most cases, we\n+\t\t# probably also need to specify the \"-l\" flags in\n+\t\t# pkgconfig_extra_libs variable too, so that it can be reflected\n+\t\t# in the pkgconfig output for static builds\n+\t\text_deps = []\n+\t\tpkgconfig_extra_libs = []\n+\n+\t\t# pull in driver directory which should assign to each of the above\n+\t\tsubdir(drv_path)\n+\n+\t\tif build\n+\t\t\tdpdk_conf.set(config_flag_fmt.format(drv.to_upper()),1)\n+\n+\t\t\t# get dependency objs from strings\n+\t\t\tdep_objs = []\n+\t\t\tforeach d:deps\n+\t\t\t\tdep_objs += [get_variable('dep_rte_' + d)]\n+\t\t\tendforeach\n+\t\t\tdep_objs += ext_deps\n+\t\t\tdpdk_extra_ldflags += pkgconfig_extra_libs\n+\n+\t\t\t# generate pmdinfo sources\n+\t\t\tpmdinfogen_srcs = run_command('grep', '--files-with-matches',\n+\t\t\t\t'RTE_PMD_REGISTER_.*(.*)', sources).stdout().strip().split()\n+\t\t\tforeach src: pmdinfogen_srcs\n+\t\t\t\tout_filename = '@0@.pmd.c'.format(src.split('/')[-1])\n+\t\t\t\ttmp_lib = static_library('tmp_@0@'.format(src.underscorify()),\n+\t\t\t\t\tsrc, include_directories: includes,\n+\t\t\t\t\tdependencies: dep_objs,\n+\t\t\t\t\tc_args: cflags)\n+\t\t\t\tsources += custom_target(out_filename,\n+\t\t\t\t\t\tcommand: [pmdinfo, tmp_lib.full_path(),\n+\t\t\t\t\t\t\t'@OUTPUT@', pmdinfogen],\n+\t\t\t\t\t\toutput: out_filename,\n+\t\t\t\t\t\tdepends: [pmdinfogen, tmp_lib])\n+\t\t\tendforeach\n+\n+\t\t\t# now build the driver itself, and add to the drivers list\n+\t\t\tdrv_name = driver_name_fmt.format(drv)\n+\t\t\tversion_map = '@0@/@1@/@2@_version.map'.format(\n+\t\t\t\t\tmeson.current_source_dir(),\n+\t\t\t\t\tdrv_path, drv_name)\n+\t\t\tlib = library(drv_name,\n+\t\t\t\tsources,\n+\t\t\t\tobjects: objs,\n+\t\t\t\tinclude_directories: includes,\n+\t\t\t\tdependencies: dep_objs,\n+\t\t\t\tc_args: cflags,\n+\t\t\t\tlink_args: '-Wl,--version-script=' + version_map,\n+\t\t\t\tlink_depends: version_map,\n+\t\t\t\tversion: '@0@.1'.format(version),\n+\t\t\t\tinstall: true,\n+\t\t\t\tinstall_dir: driver_install_path)\n+\n+\t\t\tdpdk_drivers += lib\n+\n+\t\t\t# create a dependency object and add it to the global dictionary so\n+\t\t\t# testpmd or other built-in apps can find it if necessary\n+\t\t\tset_variable('dep_@0@'.format(drv_name),\n+\t\t\t\t\tdeclare_dependency(link_with: lib,\n+\t\t\t\t\tinclude_directories: includes,\n+\t\t\t\t\tdependencies: dep_objs))\n+\t\tendif # build\n+\tendforeach\n+endforeach\ndiff --git a/meson.build b/meson.build\nindex d95321022..da27604bf 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -57,9 +57,10 @@ endif\n global_inc = include_directories('.', 'config')\n subdir('config')\n \n-# build libs and (TODO) drivers\n+# build libs and drivers\n subdir('lib')\n subdir('buildtools')\n+subdir('drivers')\n \n # TODO build binaries and installable tools\n \n",
    "prefixes": [
        "dpdk-dev",
        "06/17"
    ]
}