get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 10464,
    "url": "http://patchwork.dpdk.org/api/patches/10464/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1455131536-46285-1-git-send-email-rlane@bigswitch.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1455131536-46285-1-git-send-email-rlane@bigswitch.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1455131536-46285-1-git-send-email-rlane@bigswitch.com",
    "date": "2016-02-10T19:12:16",
    "name": "[dpdk-dev,v3] cfgfile: support looking up sections by index",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "08cb91ef62494adadd86244441ed269bab7ceb52",
    "submitter": {
        "id": 335,
        "url": "http://patchwork.dpdk.org/api/people/335/?format=api",
        "name": "Rich Lane",
        "email": "rich.lane@bigswitch.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1455131536-46285-1-git-send-email-rlane@bigswitch.com/mbox/",
    "series": [],
    "comments": "http://patchwork.dpdk.org/api/patches/10464/comments/",
    "check": "pending",
    "checks": "http://patchwork.dpdk.org/api/patches/10464/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 554145963;\n\tWed, 10 Feb 2016 20:13:07 +0100 (CET)",
            "from mail-pa0-f42.google.com (mail-pa0-f42.google.com\n\t[209.85.220.42]) by dpdk.org (Postfix) with ESMTP id 04188568A\n\tfor <dev@dpdk.org>; Wed, 10 Feb 2016 20:13:06 +0100 (CET)",
            "by mail-pa0-f42.google.com with SMTP id ho8so16226601pac.2\n\tfor <dev@dpdk.org>; Wed, 10 Feb 2016 11:13:05 -0800 (PST)",
            "from rlane-work.eng.bigswitch.com\n\t(c-67-188-28-208.hsd1.ca.comcast.net. [67.188.28.208])\n\tby smtp.gmail.com with ESMTPSA id\n\txz6sm6909810pab.42.2016.02.10.11.13.04\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 10 Feb 2016 11:13:04 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=bigswitch-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=nS7u8p+GbeumedVaYf21MXE3rSS3ya3+9SJ/KUM6iII=;\n\tb=e3KUKtEzYcVWZtxLgH4PPfpPeVyiqyUvRDSuru3LAwW+4BYmf1K2HnVZhBemkqBN3u\n\t5IiYOrXVXrdNY4aPkub0mWaWnVxeOCumRvlwniAUDLVlDt3FnpSnEOyniE8tZ7DPqIpG\n\thT4dId7uvZOekY76WfegBEzjktIr8og5/M7DHgUtWotgfs+zHvLjQ7zq4oklnRCqXce2\n\twMJJGVeQq7Ru2eo+Z8/VK6uErPU6itbQ3AFAdZvpsiLQWvK9CkWsikQXP237QhSSMbhj\n\t3rKidgwzSqTbHw32RVj7sw14jSpfRoSn7vrJ8sbVxDBMgD+h4CGuWy6XkbXCEcEL7h6f\n\tbcRg==",
        "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:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=nS7u8p+GbeumedVaYf21MXE3rSS3ya3+9SJ/KUM6iII=;\n\tb=DHLSm4bSBotmsqvi70buuztiaQIIQjs4t813F7EqVFOmFbbjYI/q04l4dlHBgD/up7\n\tL1QLzrKWMOMZ5ufWAGhmBA7uRsRRxmcNXvJ1DbRBwoajshjELDoMlpfVCeQGL25sTdpx\n\ttkdy91GK9wo9p/img+18H/P9JY+i1/sK4lOZKK5sc69utxInNV0rvEGNnjbXlpRd3+Bj\n\tlyVCBKHxKlkYE0SIVDOLn5caRhU1Cnvyny0poZy2R6fnmmc+ZPo1PG/SRFKiXPr+dBKf\n\tPeeidlUkGmpSSIWLfiOL3w9TLpmqYwMP+1TaOGg9UkqWhyMCxkHZyhnbJYAWIW/eFuEY\n\tRvCQ==",
        "X-Gm-Message-State": "AG10YORpfo23InJ5Bpr0LmJY4LbOIP6Ln5txMfM8xZxYQ+LmWZdTvpxMrHfbVu/wYl033TvM",
        "X-Received": "by 10.66.62.226 with SMTP id b2mr51950239pas.94.1455131585348;\n\tWed, 10 Feb 2016 11:13:05 -0800 (PST)",
        "From": "Rich Lane <rich.lane@bigswitch.com>",
        "X-Google-Original-From": "Rich Lane <rlane@bigswitch.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed, 10 Feb 2016 11:12:16 -0800",
        "Message-Id": "<1455131536-46285-1-git-send-email-rlane@bigswitch.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1453178510-113435-1-git-send-email-rlane@bigswitch.com>",
        "References": "<1453178510-113435-1-git-send-email-rlane@bigswitch.com>",
        "Subject": "[dpdk-dev] [PATCH v3] cfgfile: support looking up sections by index",
        "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 is useful when sections have duplicate names.\n\nSigned-off-by: Rich Lane <rlane@bigswitch.com>\n---\nv2->v3\n- Added check for index < 0.\nv1->v2:\n- Added new symbol to version script.\n\n lib/librte_cfgfile/rte_cfgfile.c           | 16 ++++++++++++++++\n lib/librte_cfgfile/rte_cfgfile.h           | 23 +++++++++++++++++++++++\n lib/librte_cfgfile/rte_cfgfile_version.map |  6 ++++++\n 3 files changed, 45 insertions(+)",
    "diff": "diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c\nindex a677dad..eba0713 100644\n--- a/lib/librte_cfgfile/rte_cfgfile.c\n+++ b/lib/librte_cfgfile/rte_cfgfile.c\n@@ -333,6 +333,22 @@ rte_cfgfile_section_entries(struct rte_cfgfile *cfg, const char *sectionname,\n \treturn i;\n }\n \n+int\n+rte_cfgfile_section_entries_by_index(struct rte_cfgfile *cfg, int index,\n+\t\tstruct rte_cfgfile_entry *entries, int max_entries)\n+{\n+\tint i;\n+\tconst struct rte_cfgfile_section *sect;\n+\n+\tif (index < 0 || index >= cfg->num_sections)\n+\t\treturn -1;\n+\n+\tsect = cfg->sections[index];\n+\tfor (i = 0; i < max_entries && i < sect->num_entries; i++)\n+\t\tentries[i] = *sect->entries[i];\n+\treturn i;\n+}\n+\n const char *\n rte_cfgfile_get_entry(struct rte_cfgfile *cfg, const char *sectionname,\n \t\tconst char *entryname)\ndiff --git a/lib/librte_cfgfile/rte_cfgfile.h b/lib/librte_cfgfile/rte_cfgfile.h\nindex d443782..8e69971 100644\n--- a/lib/librte_cfgfile/rte_cfgfile.h\n+++ b/lib/librte_cfgfile/rte_cfgfile.h\n@@ -155,6 +155,29 @@ int rte_cfgfile_section_entries(struct rte_cfgfile *cfg,\n \tstruct rte_cfgfile_entry *entries,\n \tint max_entries);\n \n+/** Get section entries as key-value pairs\n+*\n+* The index of a section is the same as the index of its name in the\n+* result of rte_cfgfile_sections. This API can be used when there are\n+* multiple sections with the same name.\n+*\n+* @param cfg\n+*   Config file\n+* @param index\n+*   Section index\n+* @param entries\n+*   Pre-allocated array of at least max_entries entries where the section\n+*   entries are stored as key-value pair after successful invocation\n+* @param max_entries\n+*   Maximum number of section entries to be stored in entries array\n+* @return\n+*   Number of entries populated on success, negative error code otherwise\n+*/\n+int rte_cfgfile_section_entries_by_index(struct rte_cfgfile *cfg,\n+\tint index,\n+\tstruct rte_cfgfile_entry *entries,\n+\tint max_entries);\n+\n /** Get value of the named entry in named config file section\n *\n * @param cfg\ndiff --git a/lib/librte_cfgfile/rte_cfgfile_version.map b/lib/librte_cfgfile/rte_cfgfile_version.map\nindex bf6c6fd..f6a27a9 100644\n--- a/lib/librte_cfgfile/rte_cfgfile_version.map\n+++ b/lib/librte_cfgfile/rte_cfgfile_version.map\n@@ -13,3 +13,9 @@ DPDK_2.0 {\n \n \tlocal: *;\n };\n+\n+DPDK_2.3 {\n+\tglobal:\n+\n+\trte_cfgfile_section_entries_by_index;\n+} DPDK_2.0;\n",
    "prefixes": [
        "dpdk-dev",
        "v3"
    ]
}