get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 93305,
    "url": "https://patches.dpdk.org/api/patches/93305/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210518132844.3779728-4-thomas@monjalon.net/",
    "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": "<20210518132844.3779728-4-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210518132844.3779728-4-thomas@monjalon.net",
    "date": "2021-05-18T13:28:44",
    "name": "[v6,3/3] devtools: check flow API doc tables",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e8e95987cd7ff92382f718d9a10840394a5107c5",
    "submitter": {
        "id": 685,
        "url": "https://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210518132844.3779728-4-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 17017,
            "url": "https://patches.dpdk.org/api/series/17017/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17017",
            "date": "2021-05-18T13:28:41",
            "name": "rte_flow doc matrix",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/17017/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/93305/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/93305/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 01E0FA0A02;\n\tTue, 18 May 2021 15:29:14 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 832104110C;\n\tTue, 18 May 2021 15:29:07 +0200 (CEST)",
            "from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com\n [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id 5F40241111\n for <dev@dpdk.org>; Tue, 18 May 2021 15:29:05 +0200 (CEST)",
            "from compute5.internal (compute5.nyi.internal [10.202.2.45])\n by mailout.west.internal (Postfix) with ESMTP id 71C681363;\n Tue, 18 May 2021 09:29:04 -0400 (EDT)",
            "from mailfrontend1 ([10.202.2.162])\n by compute5.internal (MEProxy); Tue, 18 May 2021 09:29:04 -0400",
            "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA;\n Tue, 18 May 2021 09:29:02 -0400 (EDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding; s=fm1; bh=0mYgIphyWpxjh\n AuDjEMMr0P55y1n8KlefROj4QxLflA=; b=V1a9O89LtCknBp8d0rShC91cm5W1e\n UudK9Ef8ce+G+AflcyD22WYWXVek3OPObhZlD+WfYtP3HvzhB4jkQxq7gPlw0Q2T\n 2K2PU4FOydNfxOH9xRpXK/J8hEHkN8HX8STt9iD5w//iOt1tl89GeWD1nfuVuxng\n A83USxE43Qh4sX1NjZLX8QMhXkLqmRfp0etw2GqqYX8tLyTWDgUsFxkZc1KuF090\n wxrc3pL0I4440eMpPXX6Zq+gYOM8J0jsT7uA5NgjNnSyhh9O3k79TMu3k1R7R0af\n ULctdI/b0oa2l4xjp+u0eXe/NQcOgWBWVj68AaNQJYlTPXVMyH4XdS1QQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :in-reply-to:message-id:mime-version:references:subject:to\n :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n fm2; bh=0mYgIphyWpxjhAuDjEMMr0P55y1n8KlefROj4QxLflA=; b=cQ3H7sTz\n QJK1CQk2l6UGR6glrdS22FT11J/4/Du/bGmSGNKga0N48CVdAZSnHVzc7Rnyc1NC\n UyuJnxyb1T9gmQRwZSce9CsAajKoND8v2v0u7OUQb/dMOUtWZoVrP934zIfYvHqm\n yXajnR9q7qIlxFlOdwViLkxib/rlr7D/R/JJxYWYFqLcdjxACGI+MsP8dlNCs0WN\n gyBkvGZRvJ+hprGP2+rK2ucXfc1x5EATbuyIAYD9NyY1N65rX4KnUhGmFXGrpFgf\n DMmT1uwNlGRgDtKw03GLCINkCPFwHEjOzuHLxg986bAYcVFu8IktprI/qUC5RTdZ\n E4jCKgoDlMaBTg=="
        ],
        "X-ME-Sender": "<xms:H8GjYJwnqc4kPJg9aDL8wbB8oertbEYMNnjvU5fl-1v4GbZa8yFVDw>\n <xme:H8GjYJQhYguXVpMpAX0WT7EBe-6XDjfXQFJWbowIQgCgg7yotMmZWWXcKkqKuOQXd\n 79icKBBPGcSq3aA3w>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgeduledrvdeijedgieehucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre\n dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes\n mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedvhefgiedvjeegtdevhe\n efhfetleefgfeivefgffevfeejgedtgfeutdehtdegveenucfkphepjeejrddufeegrddv\n tdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh\n homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth",
        "X-ME-Proxy": "<xmx:H8GjYDWcw0Yl-qE5BQHqPFophPF6pPcDf3rctNXx5sSkuFgzbDDJMA>\n <xmx:H8GjYLiMYBt5zU-a-TLpDw7FRuw5sEOnCforb6SA-U2Cr7bJY03Xyg>\n <xmx:H8GjYLD-bOy81QXM3QOZ2qtl8W3bbPQ8YziAqnezRkVJ06c9Rxj-AQ>\n <xmx:IMGjYOoqMkRkOSMDTwtZyWLKokIfyVFe7ZeUwFVPNG5k4L7C0L4cAw>",
        "From": "Thomas Monjalon <thomas@monjalon.net>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com,\n\tandrew.rybchenko@oktetlabs.ru",
        "Date": "Tue, 18 May 2021 15:28:44 +0200",
        "Message-Id": "<20210518132844.3779728-4-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20210518132844.3779728-1-thomas@monjalon.net>",
        "References": "<1612458325-13508-1-git-send-email-asafp@nvidia.com>\n <20210518132844.3779728-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v6 3/3] devtools: check flow API doc tables",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The script check-doc-vs-code.sh may be used to add\nsome automatic checks of the doc.\n\nIf run without any argument, a complete check is done.\nThe optional argument is a git history reference point\nto check faster only what has changed since this commit.\n\nIn this commit, the only check is for rte_flow tables,\nachieved through the script parse-flow-support.sh.\nIf run without a .ini reference, it prints rte_flow tables.\nNote: detected features are marked with the value Y,\nwhile the real .ini file could have special values like I.\nThe script allow parsing exceptions (exclude or include),\nlike for bnxt code which lists unsupported items and actions.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\nv6 changes:\n\t- fix redundant drivers\n\t- ignore indirect action\n\t- prefix misses with a category (item or action)\n---\n devtools/check-doc-vs-code.sh  | 84 ++++++++++++++++++++++++++++++++++\n devtools/parse-flow-support.sh | 78 +++++++++++++++++++++++++++++++\n 2 files changed, 162 insertions(+)\n create mode 100755 devtools/check-doc-vs-code.sh\n create mode 100755 devtools/parse-flow-support.sh",
    "diff": "diff --git a/devtools/check-doc-vs-code.sh b/devtools/check-doc-vs-code.sh\nnew file mode 100755\nindex 0000000000..c58c239c87\n--- /dev/null\n+++ b/devtools/check-doc-vs-code.sh\n@@ -0,0 +1,84 @@\n+#! /bin/sh -e\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright 2021 Mellanox Technologies, Ltd\n+\n+# Check whether doc & code are in sync.\n+# Optional argument: check only what changed since a commit.\n+trusted_commit=$1 # example: origin/main\n+\n+selfdir=$(dirname $(readlink -f $0))\n+rootdir=$(readlink -f $selfdir/..)\n+\n+# speed up by ignoring Unicode details\n+export LC_COLLATE=C\n+\n+result=0\n+error() # <message>\n+{\n+\techo \"$*\"\n+\tresult=$(($result + 1))\n+}\n+\n+changed_files()\n+{\n+\t[ -n \"$files\" ] ||\n+\t\tfiles=$(git diff-tree --name-only -r $trusted_commit..)\n+\techo \"$files\"\n+}\n+\n+has_code_change() # <pattern>\n+{\n+\ttest -n \"$(git log --format='%h' -S\"$1\" $trusted_commit..)\"\n+}\n+\n+has_file_change() # <pattern>\n+{\n+\tchanged_files | grep -q \"$1\"\n+}\n+\n+changed_net_drivers()\n+{\n+\tnet_paths='drivers/net/|doc/guides/nics/features/'\n+\t[ -n \"$drivers\" ] ||\n+\t\tdrivers=$(changed_files |\n+\t\t\tsed -rn \"s,^($net_paths)([^./]*).*,\\2,p\" |\n+\t\t\tsort -u)\n+\techo \"$drivers\"\n+}\n+\n+all_net_drivers()\n+{\n+\tfind $rootdir/drivers/net -mindepth 1 -maxdepth 1 -type d |\n+\tsed 's,.*/,,' |\n+\tsort\n+}\n+\n+check_rte_flow() # <driver>\n+{\n+\tcode=$rootdir/drivers/net/$1\n+\tdoc=$rootdir/doc/guides/nics/features/$1.ini\n+\t[ -d $code ] || return 0\n+\t[ -f $doc ] || return 0\n+\treport=$($selfdir/parse-flow-support.sh $code $doc)\n+\tif [ -n \"$report\" ]; then\n+\t\terror \"rte_flow doc out of sync for $1\"\n+\t\techo \"$report\" | sed 's,^,\\t,'\n+\tfi\n+}\n+\n+if [ -z \"$trusted_commit\" ]; then\n+\t# check all\n+\tfor driver in $(all_net_drivers); do\n+\t\tcheck_rte_flow $driver\n+\tdone\n+\texit $result\n+fi\n+\n+# find what changed and check\n+if has_code_change 'RTE_FLOW_.*_TYPE_' ||\n+\t\thas_file_change 'doc/guides/nics/features'; then\n+\tfor driver in $(changed_net_drivers); do\n+\t\tcheck_rte_flow $driver\n+\tdone\n+fi\n+exit $result\ndiff --git a/devtools/parse-flow-support.sh b/devtools/parse-flow-support.sh\nnew file mode 100755\nindex 0000000000..aeed76e55f\n--- /dev/null\n+++ b/devtools/parse-flow-support.sh\n@@ -0,0 +1,78 @@\n+#! /bin/sh -e\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright 2021 Mellanox Technologies, Ltd\n+\n+# Parse rte_flow support of a driver directory,\n+# and optionally show difference with a doc file in .ini format.\n+\n+dir=$1 # drivers/net/foo\n+ref=$2 # doc/guides/nics/features/foo.ini\n+\n+if [ -z \"$dir\" ]; then\n+\techo \"directory argument is required\" >&2\n+\texit 1\n+fi\n+\n+# sorting order\n+export LC_COLLATE=C\n+\n+# exclude exceptions\n+exclude() # <pattern>\n+{\n+\tcase $(basename $dir) in\n+\t\tbnxt)\n+\t\t\tfilter=$(sed -n \"/$1/{N;/TYPE_NOT_SUPPORTED/P;}\" \\\n+\t\t\t\t$dir/tf_ulp/ulp_template_db{,_tbl}.c |\n+\t\t\t\tgrep -wo \"$1[[:alnum:]_]*\" | sort -u |\n+\t\t\t\ttr '\\n' '|' | sed 's,.$,\\n,')\n+\t\t\tgrep -vE \"$filter\";;\n+\t\t*) cat\n+\tesac\n+}\n+\n+# include exceptions\n+include() # <pattern>\n+{\n+\tcase $(basename $dir) in\n+\tesac\n+}\n+\n+# generate INI section\n+list() # <title> <pattern>\n+{\n+\techo \"[$1]\"\n+\tgit grep -who \"$2[[:alnum:]_]*\" $dir |\n+\t(exclude $2; include $2) | sort -u |\n+\tawk 'sub(/'$2'/, \"\") {printf \"%-20s = Y\\n\", tolower($0)}'\n+}\n+\n+rte_flow_support() # <category>\n+{\n+\ttitle=\"rte_flow $1s\"\n+\tpattern=$(echo \"RTE_FLOW_$1_TYPE_\" | awk '{print toupper($0)}')\n+\tlist \"$title\" \"$pattern\" | grep -vwE 'void|indirect|end'\n+}\n+\n+if [ -z \"$ref\" ]; then # generate full tables\n+\trte_flow_support item\n+\techo\n+\trte_flow_support action\n+\texit 0\n+fi\n+\n+# compare with reference input\n+rte_flow_compare() # <category>\n+{\n+\tsection=\"rte_flow $1s]\"\n+\t{\n+\t\trte_flow_support $1\n+\t\tsed -n \"/$section/,/]/p\" \"$ref\" | sed '/^$/d'\n+\t} |\n+\tsed '/]/d' | # ignore section title\n+\tsed 's, *=.*,,' | # ignore value (better in doc than generated one)\n+\tsort | uniq -u | # show differences\n+\tsed \"s,^,$1 ,\" # prefix with category name\n+}\n+\n+rte_flow_compare item\n+rte_flow_compare action\n",
    "prefixes": [
        "v6",
        "3/3"
    ]
}