get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1418,
    "url": "https://patches.dpdk.org/api/patches/1418/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1416530816-2159-14-git-send-email-jingjing.wu@intel.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": "<1416530816-2159-14-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1416530816-2159-14-git-send-email-jingjing.wu@intel.com",
    "date": "2014-11-21T00:46:47",
    "name": "[dpdk-dev,v6,13/22] testpmd: add test command to flush flow director table",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "443c7ab251d32f0272cba6b4e2cd77e7a11f159c",
    "submitter": {
        "id": 47,
        "url": "https://patches.dpdk.org/api/people/47/?format=api",
        "name": "Jingjing Wu",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1416530816-2159-14-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1418/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1418/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 90C7D7FDB;\n\tFri, 21 Nov 2014 01:37:06 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 5CEF87FCB\n\tfor <dev@dpdk.org>; Fri, 21 Nov 2014 01:37:02 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga101.fm.intel.com with ESMTP; 20 Nov 2014 16:47:31 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 20 Nov 2014 16:38:02 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id sAL0lTKU004179;\n\tFri, 21 Nov 2014 08:47:29 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid sAL0lRGB002285; Fri, 21 Nov 2014 08:47:29 +0800",
            "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sAL0lQZo002281; \n\tFri, 21 Nov 2014 08:47:26 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"4.97,862,1389772800\"; d=\"scan'208\";a=\"419585451\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 21 Nov 2014 08:46:47 +0800",
        "Message-Id": "<1416530816-2159-14-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1416530816-2159-1-git-send-email-jingjing.wu@intel.com>",
        "References": "<1414654006-7472-1-git-send-email-jingjing.wu@intel.com>\n\t<1416530816-2159-1-git-send-email-jingjing.wu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v6 13/22] testpmd: add test command to flush flow\n\tdirector table",
        "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": "Test command is added to flush flow director table\n\nSigned-off-by: jingjing.wu <jingjing.wu@intel.com>\n---\n app/test-pmd/cmdline.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 49 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 91f6388..066769f 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -706,6 +706,9 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\" flexbytes (flexbytes_value) (drop|fwd)\"\n \t\t\t\" queue (queue_id) fd_id (fd_id_value)\\n\"\n \t\t\t\"    Add/Del a SCTP type flow director filter.\\n\\n\"\n+\n+\t\t\t\"flush_flow_director (port_id)\\n\"\n+\t\t\t\"    Flush all flow director entries of a device.\\n\\n\"\n \t\t);\n \t}\n }\n@@ -8123,6 +8126,51 @@ cmdline_parse_inst_t cmd_add_del_sctp_flow_director = {\n \t},\n };\n \n+struct cmd_flush_flow_director_result {\n+\tcmdline_fixed_string_t flush_flow_director;\n+\tuint8_t port_id;\n+};\n+\n+cmdline_parse_token_string_t cmd_flush_flow_director_flush =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flush_flow_director_result,\n+\t\t\t\t flush_flow_director, \"flush_flow_director\");\n+cmdline_parse_token_num_t cmd_flush_flow_director_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_flush_flow_director_result,\n+\t\t\t      port_id, UINT8);\n+\n+static void\n+cmd_flush_flow_director_parsed(void *parsed_result,\n+\t\t\t  __attribute__((unused)) struct cmdline *cl,\n+\t\t\t  __attribute__((unused)) void *data)\n+{\n+\tstruct cmd_flow_director_result *res = parsed_result;\n+\tint ret = 0;\n+\n+\tret = rte_eth_dev_filter_supported(res->port_id, RTE_ETH_FILTER_FDIR);\n+\tif (ret < 0) {\n+\t\tprintf(\"flow director is not supported on port %u.\\n\",\n+\t\t\tres->port_id);\n+\t\treturn;\n+\t}\n+\n+\tret = rte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_FDIR,\n+\t\t\tRTE_ETH_FILTER_FLUSH, NULL);\n+\tif (ret < 0)\n+\t\tprintf(\"flow director table flushing error: (%s)\\n\",\n+\t\t\tstrerror(-ret));\n+}\n+\n+cmdline_parse_inst_t cmd_flush_flow_director = {\n+\t.f = cmd_flush_flow_director_parsed,\n+\t.data = NULL,\n+\t.help_str = \"flush all flow director entries of a device on NIC\",\n+\t.tokens = {\n+\t\t(void *)&cmd_flush_flow_director_flush,\n+\t\t(void *)&cmd_flush_flow_director_port_id,\n+\t\tNULL,\n+\t},\n+};\n+\n /* ******************************************************************************** */\n \n /* list of instructions */\n@@ -8255,6 +8303,7 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_add_del_ip_flow_director,\n \t(cmdline_parse_inst_t *)&cmd_add_del_udp_flow_director,\n \t(cmdline_parse_inst_t *)&cmd_add_del_sctp_flow_director,\n+\t(cmdline_parse_inst_t *)&cmd_flush_flow_director,\n \tNULL,\n };\n \n",
    "prefixes": [
        "dpdk-dev",
        "v6",
        "13/22"
    ]
}