get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43375,
    "url": "http://patches.dpdk.org/api/patches/43375/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180725171007.94198-6-jasvinder.singh@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": "<20180725171007.94198-6-jasvinder.singh@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180725171007.94198-6-jasvinder.singh@intel.com",
    "date": "2018-07-25T17:10:06",
    "name": "[5/6] net/softnic: add CLI command for tmgr hierarchy commit",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "45a804bcce4916c7ee2c8ecdd75a7c1f0aefad41",
    "submitter": {
        "id": 285,
        "url": "http://patches.dpdk.org/api/people/285/?format=api",
        "name": "Jasvinder Singh",
        "email": "jasvinder.singh@intel.com"
    },
    "delegate": {
        "id": 10018,
        "url": "http://patches.dpdk.org/api/users/10018/?format=api",
        "username": "cristian_dumitrescu",
        "first_name": "Cristian",
        "last_name": "Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180725171007.94198-6-jasvinder.singh@intel.com/mbox/",
    "series": [
        {
            "id": 775,
            "url": "http://patches.dpdk.org/api/series/775/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=775",
            "date": "2018-07-25T17:10:01",
            "name": "net/softnic: expose tmgr through firmware",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/775/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43375/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/43375/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 AA0314B4B;\n\tWed, 25 Jul 2018 19:10:23 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id 5BAA2326C\n\tfor <dev@dpdk.org>; Wed, 25 Jul 2018 19:10:15 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jul 2018 10:10:15 -0700",
            "from silpixa00381635.ir.intel.com (HELO\n\tsilpixa00381635.ger.corp.intel.com) ([10.237.222.149])\n\tby orsmga003.jf.intel.com with ESMTP; 25 Jul 2018 10:10:14 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,401,1526367600\"; d=\"scan'208\";a=\"69856164\"",
        "From": "Jasvinder Singh <jasvinder.singh@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "cristian.dumitrescu@intel.com",
        "Date": "Wed, 25 Jul 2018 18:10:06 +0100",
        "Message-Id": "<20180725171007.94198-6-jasvinder.singh@intel.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20180725171007.94198-1-jasvinder.singh@intel.com>",
        "References": "<20180725171007.94198-1-jasvinder.singh@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 5/6] net/softnic: add CLI command for tmgr\n\thierarchy commit",
        "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://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n\nAdd support for Traffic Manager (TMGR) hierarchy commit through\nfirmware CLI script.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Jasvinder Singh <jasvinder.singh@intel.com>\n---\n drivers/net/softnic/rte_eth_softnic_cli.c | 47 +++++++++++++++++++++++++++++++\n 1 file changed, 47 insertions(+)",
    "diff": "diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c\nindex d5485b5..4bd792b 100644\n--- a/drivers/net/softnic/rte_eth_softnic_cli.c\n+++ b/drivers/net/softnic/rte_eth_softnic_cli.c\n@@ -503,6 +503,46 @@ cmd_tmgr_node(struct pmd_internals *softnic,\n }\n \n /**\n+ * tmgr hierarchy commit\n+ */\n+static void\n+cmd_tmgr_hierarchy_commit(struct pmd_internals *softnic,\n+\tchar **tokens,\n+\tuint32_t n_tokens,\n+\tchar *out,\n+\tsize_t out_size)\n+{\n+\tstruct rte_tm_error error;\n+\tuint16_t port_id;\n+\tint status;\n+\n+\tif (n_tokens != 3) {\n+\t\tsnprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);\n+\t\treturn;\n+\t}\n+\n+\tif (strcmp(tokens[1], \"hierarchy\") != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"hierarchy\");\n+\t\treturn;\n+\t}\n+\n+\tif (strcmp(tokens[2], \"commit\") != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"commit\");\n+\t\treturn;\n+\t}\n+\n+\tstatus = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id);\n+\tif (status != 0)\n+\t\treturn;\n+\n+\tstatus = rte_tm_hierarchy_commit(port_id, 1, &error);\n+\tif (status) {\n+\t\tsnprintf(out, out_size, MSG_CMD_FAIL, tokens[0]);\n+\t\treturn;\n+\t}\n+}\n+\n+/**\n  * tmgr <tmgr_name>\n  */\n static void\n@@ -4325,6 +4365,13 @@ softnic_cli_process(char *in, char *out, size_t out_size, void *arg)\n \t\t\tcmd_tmgr_node(softnic, tokens, n_tokens, out, out_size);\n \t\t\treturn;\n \t\t}\n+\n+\t\tif (n_tokens >= 3 &&\n+\t\t\t(strcmp(tokens[1], \"hierarchy\") == 0) &&\n+\t\t\t(strcmp(tokens[2], \"commit\") == 0)) {\n+\t\t\tcmd_tmgr_hierarchy_commit(softnic, tokens, n_tokens, out, out_size);\n+\t\t\treturn;\n+\t\t}\n \t}\n \n \tif (strcmp(tokens[0], \"tap\") == 0) {\n",
    "prefixes": [
        "5/6"
    ]
}