get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 14816,
    "url": "https://patches.dpdk.org/api/patches/14816/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/5032796c329111b0de9b560ebb3a239a025acee1.1468413397.git.adrien.mazarguil@6wind.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": "<5032796c329111b0de9b560ebb3a239a025acee1.1468413397.git.adrien.mazarguil@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/5032796c329111b0de9b560ebb3a239a025acee1.1468413397.git.adrien.mazarguil@6wind.com",
    "date": "2016-07-13T13:02:47",
    "name": "[dpdk-dev,v4,10/10] scripts: check compilation of exported header files",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9eff91810505f99dcb1ec02f8ea32415f35380db",
    "submitter": {
        "id": 165,
        "url": "https://patches.dpdk.org/api/people/165/?format=api",
        "name": "Adrien Mazarguil",
        "email": "adrien.mazarguil@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/5032796c329111b0de9b560ebb3a239a025acee1.1468413397.git.adrien.mazarguil@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/14816/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/14816/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 29CCA5596;\n\tWed, 13 Jul 2016 15:03:55 +0200 (CEST)",
            "from mail-wm0-f49.google.com (mail-wm0-f49.google.com\n\t[74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 4C77A567B\n\tfor <dev@dpdk.org>; Wed, 13 Jul 2016 15:03:54 +0200 (CEST)",
            "by mail-wm0-f49.google.com with SMTP id f126so28197958wma.1\n\tfor <dev@dpdk.org>; Wed, 13 Jul 2016 06:03:54 -0700 (PDT)",
            "from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.\n\t[82.239.227.177]) by smtp.gmail.com with ESMTPSA id\n\tgo7sm829432wjd.47.2016.07.13.06.03.51\n\tfor <dev@dpdk.org> (version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tWed, 13 Jul 2016 06:03:52 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:subject:date:message-id:in-reply-to:references;\n\tbh=beu8KqVl9TVpMyzgmKrm5Erp/SFTgvEKqqXTDkUmJ+o=;\n\tb=kX6Ccjf8BKMRnqmAmtsE9423Qzd75/wP2tlDEtdXxA+Z3x5GCC9ZSIQh8iOURCpcom\n\tMGdOCImh/HceQxT5otnCr5jjimNH6LjUhvgZErxG9ghL1QUCFzle7qkXum80p+ZNaoKE\n\tYctezLT3Tto4xRmNDKUhmnZCYv4bTV98NCuAo0Mg2JLl3s2tG9DtmaI7BTHeuACO9o/S\n\tR7brpyLfwgT/qX211DxWLV0mJuZbQhQezNE8tnfTJ+89yiGZO3OKjM0SEDTyA6bq7MOs\n\totNuzAA4oOy9E0MGzos89O1QxVzFlN69ru0u50+pEb1KHlIgNiI/OcqlXT1iO1JnnJ9F\n\tJSMg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=beu8KqVl9TVpMyzgmKrm5Erp/SFTgvEKqqXTDkUmJ+o=;\n\tb=G+KpD2sv+CBhzPJXWg6o0GLW/8VCRuaKiPiBzTnIcSVGF2MpCqzecgTqVa5vkJEyBr\n\tpxCOuJI4Oa3i0E78OkCUjXOgBMYDTBXg5VFnu96InPB5k8pZaN7np5pgt9rrTidrBc4m\n\tRWlH++tPn/gETxXxjRGVg/6vzazBSDhMfDRH+V6l4fx99BZKbVUclsPgji5qktQwfhGO\n\t0VHc3RM6UTXqJUhn5EzYrDRFNFR3JAai/oNgd0vr3c0woHNZvvn0KlMigsLllJBeodrq\n\t0RD+2UF9CRj8oav3P/L2IUspNQiu8y2ABEOJdn+3FNWwbYt0VUimEu556lgKNunEwsqA\n\toIMA==",
        "X-Gm-Message-State": "ALyK8tJB/lwOazLAIyVvNRXfOQcHAdfLGNVjrbsASgBvnBghhbb4tMdmqwABPLxL0iW+UiZo",
        "X-Received": "by 10.28.15.213 with SMTP id 204mr26850777wmp.74.1468415033772; \n\tWed, 13 Jul 2016 06:03:53 -0700 (PDT)",
        "From": "Adrien Mazarguil <adrien.mazarguil@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed, 13 Jul 2016 15:02:47 +0200",
        "Message-Id": "<5032796c329111b0de9b560ebb3a239a025acee1.1468413397.git.adrien.mazarguil@6wind.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<cover.1468413396.git.adrien.mazarguil@6wind.com>",
        "References": "<cover.1467905466.git.adrien.mazarguil@6wind.com>\n\t<cover.1468413396.git.adrien.mazarguil@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v4 10/10] scripts: check compilation of exported\n\theader files",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <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": "This script checks that header files in a given directory do not miss\ndependencies when included on their own, do not conflict and accept being\ncompiled with the strictest possible flags.\n\nSigned-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>\n---\n MAINTAINERS               |   1 +\n scripts/check-includes.sh | 286 +++++++++++++++++++++++++++++++++++++++++\n scripts/test-build.sh     |  14 ++\n 3 files changed, 301 insertions(+)",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex f996c2e..e2933c4 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -26,6 +26,7 @@ T: git://dpdk.org/dpdk\n F: MAINTAINERS\n F: scripts/check-maintainers.sh\n F: scripts/check-git-log.sh\n+F: scripts/check-includes.sh\n F: scripts/checkpatches.sh\n F: scripts/load-devel-config.sh\n F: scripts/test-build.sh\ndiff --git a/scripts/check-includes.sh b/scripts/check-includes.sh\nnew file mode 100755\nindex 0000000..d65adc6\n--- /dev/null\n+++ b/scripts/check-includes.sh\n@@ -0,0 +1,286 @@\n+#!/bin/sh -e\n+#\n+#   BSD LICENSE\n+#\n+#   Copyright 2016 6WIND S.A.\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 6WIND S.A. 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+# This script checks that header files in a given directory do not miss\n+# dependencies when included on their own, do not conflict and accept being\n+# compiled with the strictest possible flags.\n+#\n+# Files are looked up in the directory provided as the first argument,\n+# otherwise build/include by default.\n+#\n+# Recognized environment variables:\n+#\n+# VERBOSE=1 is the same as -v.\n+#\n+# QUIET=1 is the same as -q.\n+#\n+# SUMMARY=1 is the same as -s.\n+#\n+# CC, CPPFLAGS, CFLAGS, EXTRA_CPPFLAGS, EXTRA_CFLAGS, CXX, CXXFLAGS and\n+# EXTRA_CXXFLAGS are taken into account.\n+#\n+# PEDANTIC_CFLAGS, PEDANTIC_CXXFLAGS and PEDANTIC_CPPFLAGS provide strict\n+# C/C++ compilation flags.\n+#\n+# IGNORE contains a list of shell patterns matching files (relative to the\n+# include directory) to avoid. It is set by default to known DPDK headers\n+# which must not be included on their own.\n+#\n+# IGNORE_CXX provides additional files for C++.\n+\n+while getopts hqvs arg; do\n+\tcase $arg in\n+\th)\n+\t\tcat <<EOF\n+usage: $0 [-h] [-q] [-v] [-s] [DIR]\n+\n+This script checks that header files in a given directory do not miss\n+dependencies when included on their own, do not conflict and accept being\n+compiled with the strictest possible flags.\n+\n+  -h    display this help and exit\n+  -q    quiet mode, disable normal output\n+  -v    show command lines being executed\n+  -s    show summary\n+\n+With no DIR, default to build/include.\n+\n+Any failed header check yields a nonzero exit status.\n+EOF\n+\t\texit\n+\t\t;;\n+\tq)\n+\t\tQUIET=1\n+\t\t;;\n+\tv)\n+\t\tVERBOSE=1\n+\t\t;;\n+\ts)\n+\t\tSUMMARY=1\n+\t\t;;\n+\t*)\n+\t\texit 1\n+\t\t;;\n+\tesac\n+done\n+\n+shift $(($OPTIND - 1))\n+\n+include_dir=${1:-build/include}\n+\n+: ${PEDANTIC_CFLAGS=-std=c99 -pedantic -Wall -Wextra -Werror}\n+: ${PEDANTIC_CXXFLAGS=}\n+: ${PEDANTIC_CPPFLAGS=-D_XOPEN_SOURCE=600}\n+: ${CC:=cc}\n+: ${CXX:=c++}\n+: ${IGNORE= \\\n+\t'rte_atomic_32.h' \\\n+\t'rte_atomic_64.h' \\\n+\t'rte_byteorder_32.h' \\\n+\t'rte_byteorder_64.h' \\\n+\t'generic/*' \\\n+\t'exec-env/*' \\\n+}\n+: ${IGNORE_CXX= \\\n+\t'rte_eth_vhost.h' \\\n+\t'rte_virtio_net.h' \\\n+}\n+\n+temp_cc=/tmp/${0##*/}.$$.c\n+pass_cc=\n+failures_cc=0\n+\n+temp_cxx=/tmp/${0##*/}.$$.cc\n+pass_cxx=\n+failures_cxx=0\n+\n+# Process output parameters.\n+\n+[ \"$QUIET\" = 1 ] &&\n+exec 1> /dev/null\n+\n+[ \"$VERBOSE\" = 1 ] &&\n+output ()\n+{\n+\tlocal CCV\n+\tlocal CXXV\n+\n+\tshift\n+\tCCV=$CC\n+\tCXXV=$CXX\n+\tCC=\"echo $CC\" CXX=\"echo $CXX\" \"$@\"\n+\tCC=$CCV\n+\tCXX=$CXXV\n+\n+\t\"$@\"\n+} ||\n+output ()\n+{\n+\n+\tprintf '  %s\\n' \"$1\"\n+\tshift\n+\t\"$@\"\n+}\n+\n+trap 'rm -f \"$temp_cc\" \"$temp_cxx\"' EXIT\n+\n+compile_cc ()\n+{\n+\t${CC} -I\"$include_dir\" \\\n+\t\t${PEDANTIC_CPPFLAGS} ${CPPFLAGS} ${EXTRA_CPPFLAGS} \\\n+\t\t${PEDANTIC_CFLAGS} ${CFLAGS} ${EXTRA_CFLAGS} \\\n+\t\t-c -o /dev/null \"${temp_cc}\"\n+}\n+\n+compile_cxx ()\n+{\n+\t${CXX} -I\"$include_dir\" \\\n+\t\t${PEDANTIC_CPPFLAGS} ${CPPFLAGS} ${EXTRA_CPPFLAGS} \\\n+\t\t${PEDANTIC_CXXFLAGS} ${CXXFLAGS} ${EXTRA_CXXFLAGS} \\\n+\t\t-c -o /dev/null \"${temp_cxx}\"\n+}\n+\n+ignore ()\n+{\n+\tfile=\"$1\"\n+\tshift\n+\twhile [ $# -ne 0 ]; do\n+\t\tcase \"$file\" in\n+\t\t$1)\n+\t\t\treturn 0\n+\t\t\t;;\n+\t\tesac\n+\t\tshift\n+\tdone\n+\treturn 1\n+}\n+\n+# Check C/C++ compilation for each header file.\n+\n+while read -r path\n+do\n+\tfile=${path#$include_dir}\n+\tfile=${file##/}\n+\tif ignore \"$file\" $IGNORE; then\n+\t\toutput \"SKIP $file\" :\n+\t\tcontinue\n+\tfi\n+\tif printf \"\\\n+#include <%s>\n+\n+int main(void)\n+{\n+\treturn 0;\n+}\n+\" \"$file\" > \"$temp_cc\" &&\n+\t\toutput \"CC $file\" compile_cc\n+\tthen\n+\t\tpass_cc=\"$pass_cc $file\"\n+\telse\n+\t\tfailures_cc=$(($failures_cc + 1))\n+\tfi\n+\tif ignore \"$file\" $IGNORE_CXX; then\n+\t\toutput \"SKIP CXX $file\" :\n+\t\tcontinue\n+\tfi\n+\tif printf \"\\\n+#include <%s>\n+\n+int main()\n+{\n+}\n+\" \"$file\" > \"$temp_cxx\" &&\n+\t\toutput \"CXX $file\" compile_cxx\n+\tthen\n+\t\tpass_cxx=\"$pass_cxx $file\"\n+\telse\n+\t\tfailures_cxx=$(($failures_cxx + 1))\n+\tfi\n+done <<EOF\n+$(find \"$include_dir\" -name '*.h')\n+EOF\n+\n+# Check C compilation with all includes.\n+\n+: > \"$temp_cc\" &&\n+for file in $pass_cc; do\n+\tprintf \"\\\n+#include <%s>\n+\" \"$file\" >> $temp_cc\n+done\n+if printf \"\\\n+int main(void)\n+{\n+\treturn 0;\n+}\n+\" >> \"$temp_cc\" &&\n+\toutput \"CC (all includes that did not fail)\" compile_cc\n+then\n+\t:\n+else\n+\tfailures_cc=$(($failures_cc + 1))\n+fi\n+\n+# Check C++ compilation with all includes.\n+\n+: > \"$temp_cxx\" &&\n+for file in $pass_cxx; do\n+\tprintf \"\\\n+#include <%s>\n+\" \"$file\" >> $temp_cxx\n+done\n+if printf \"\\\n+int main()\n+{\n+}\n+\" >> \"$temp_cxx\" &&\n+\toutput \"CXX (all includes that did not fail)\" compile_cxx\n+then\n+\t:\n+else\n+\tfailures_cxx=$(($failures_cxx + 1))\n+fi\n+\n+# Report results.\n+\n+if [ \"$SUMMARY\" = 1 ]; then\n+\tprintf \"\\\n+Summary:\n+ %u failure(s) for C using '%s'.\n+ %u failure(s) for C++ using '%s'.\n+\" $failures_cc \"$CC\" $failures_cxx \"$CXX\" 1>&2\n+fi\n+\n+# Exit with nonzero status if there are failures.\n+\n+[ $failures_cc -eq 0 ] &&\n+[ $failures_cxx -eq 0 ]\ndiff --git a/scripts/test-build.sh b/scripts/test-build.sh\nindex 5bcecfc..b2ea602 100755\n--- a/scripts/test-build.sh\n+++ b/scripts/test-build.sh\n@@ -229,6 +229,20 @@ for conf in $configs ; do\n \tmake -j$J -sC examples/performance-thread \\\n \t\tEXTRA_LDFLAGS=\"$DPDK_DEP_LDFLAGS\" $verbose \\\n \t\tO=$(readlink -m $dir/examples/performance-thread)\n+\techo \"================== Check includes in $dir\"\n+\tif echo $target | grep -q 'gcc'; then\n+\t\tCC=gcc\n+\t\tCXX=g++\n+\telif echo $target | grep -q 'clang'; then\n+\t\tCC=clang\n+\t\tCXX=clang++\n+\telse\n+\t\tCXX=$CC\n+\tfi\n+\tCC=$CROSS$CC CXX=$CROSS$CXX \\\n+\t\tVERBOSE=\"$((! ! ${#verbose}))\" \\\n+\t\tQUIET=\"$((! ${#verbose}))\" \\\n+\t\tscripts/check-includes.sh \"$dir/include\"\n \tunset RTE_TARGET\n \techo \"################## $dir done.\"\n done\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "10/10"
    ]
}