get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44571,
    "url": "http://patchwork.dpdk.org/api/patches/44571/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1536675645-10105-4-git-send-email-reshma.pattan@intel.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": "<1536675645-10105-4-git-send-email-reshma.pattan@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1536675645-10105-4-git-send-email-reshma.pattan@intel.com",
    "date": "2018-09-11T14:20:33",
    "name": "[v2,03/15] net/softnic: add new cli for flow attribute map",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "217eb4ce662455319ac9a7456b5183d2c6e716e6",
    "submitter": {
        "id": 70,
        "url": "http://patchwork.dpdk.org/api/people/70/?format=api",
        "name": "Pattan, Reshma",
        "email": "reshma.pattan@intel.com"
    },
    "delegate": {
        "id": 10018,
        "url": "http://patchwork.dpdk.org/api/users/10018/?format=api",
        "username": "cristian_dumitrescu",
        "first_name": "Cristian",
        "last_name": "Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1536675645-10105-4-git-send-email-reshma.pattan@intel.com/mbox/",
    "series": [
        {
            "id": 1269,
            "url": "http://patchwork.dpdk.org/api/series/1269/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=1269",
            "date": "2018-09-11T14:20:33",
            "name": null,
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/1269/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/44571/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/44571/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 0932D54AE;\n\tTue, 11 Sep 2018 16:20:55 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 8B4CF4F93\n\tfor <dev@dpdk.org>; Tue, 11 Sep 2018 16:20:52 +0200 (CEST)",
            "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Sep 2018 07:20:52 -0700",
            "from sivswdev02.ir.intel.com (HELO localhost.localdomain)\n\t([10.237.217.46])\n\tby fmsmga007.fm.intel.com with ESMTP; 11 Sep 2018 07:20:50 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,360,1531810800\"; d=\"scan'208\";a=\"69156858\"",
        "From": "Reshma Pattan <reshma.pattan@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>,\n\tReshma Pattan <reshma.pattan@intel.com>",
        "Date": "Tue, 11 Sep 2018 15:20:33 +0100",
        "Message-Id": "<1536675645-10105-4-git-send-email-reshma.pattan@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": "<1536251222-17275-1-git-send-email-reshma.pattan@intel.com>",
        "References": "<1536251222-17275-1-git-send-email-reshma.pattan@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 03/15] net/softnic: add new cli for flow\n\tattribute map",
        "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": "Added new cli by which user can specify to softnic\nwhich rte flow group and direction has to mapped to\nwhich pipeline and table.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Reshma Pattan <reshma.pattan@intel.com>\n---\n drivers/net/softnic/rte_eth_softnic_cli.c | 81 +++++++++++++++++++++++++++++++\n 1 file changed, 81 insertions(+)",
    "diff": "diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c\nindex 0c7448cc4..8f5f82555 100644\n--- a/drivers/net/softnic/rte_eth_softnic_cli.c\n+++ b/drivers/net/softnic/rte_eth_softnic_cli.c\n@@ -4797,6 +4797,81 @@ cmd_softnic_thread_pipeline_disable(struct pmd_internals *softnic,\n \t}\n }\n \n+/**\n+ * flowapi map\n+ *  group <group_id>\n+ *  ingress | egress\n+ *  pipeline <pipeline_name>\n+ *  table <table_id>\n+ */\n+static void\n+cmd_softnic_flowapi_map(struct pmd_internals *softnic,\n+\t\tchar **tokens,\n+\t\tuint32_t n_tokens,\n+\t\tchar *out,\n+\t\tsize_t out_size)\n+{\n+\tchar *pipeline_name;\n+\tuint32_t group_id, table_id;\n+\tint ingress, status;\n+\n+\tif (n_tokens != 9) {\n+\t\tsnprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);\n+\t\treturn;\n+\t}\n+\n+\tif (strcmp(tokens[1], \"map\") != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"map\");\n+\t\treturn;\n+\t}\n+\n+\tif (strcmp(tokens[2], \"group\") != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"group\");\n+\t\treturn;\n+\t}\n+\n+\tif (softnic_parser_read_uint32(&group_id, tokens[3]) != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"group_id\");\n+\t\treturn;\n+\t}\n+\n+\tif (strcmp(tokens[4], \"ingress\") == 0) {\n+\t\tingress = 1;\n+\t} else if (strcmp(tokens[4], \"egress\") == 0) {\n+\t\tingress = 0;\n+\t} else {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"ingress | egress\");\n+\t\treturn;\n+\t}\n+\n+\tif (strcmp(tokens[5], \"pipeline\") != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"pipeline\");\n+\t\treturn;\n+\t}\n+\n+\tpipeline_name = tokens[6];\n+\n+\tif (strcmp(tokens[7], \"table\") != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"table\");\n+\t\treturn;\n+\t}\n+\n+\tif (softnic_parser_read_uint32(&table_id, tokens[8]) != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"table_id\");\n+\t\treturn;\n+\t}\n+\n+\tstatus = flow_attr_map_set(softnic,\n+\t\t\tgroup_id,\n+\t\t\tingress,\n+\t\t\tpipeline_name,\n+\t\t\ttable_id);\n+\tif (status) {\n+\t\tsnprintf(out, out_size, MSG_CMD_FAIL, tokens[0]);\n+\t\treturn;\n+\t}\n+}\n+\n void\n softnic_cli_process(char *in, char *out, size_t out_size, void *arg)\n {\n@@ -5089,6 +5164,12 @@ softnic_cli_process(char *in, char *out, size_t out_size, void *arg)\n \t\t}\n \t}\n \n+\tif (strcmp(tokens[0], \"flowapi\") == 0) {\n+\t\tcmd_softnic_flowapi_map(softnic, tokens, n_tokens, out,\n+\t\t\t\t\tout_size);\n+\t\treturn;\n+\t}\n+\n \tsnprintf(out, out_size, MSG_CMD_UNKNOWN, tokens[0]);\n }\n \n",
    "prefixes": [
        "v2",
        "03/15"
    ]
}