get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 18687,
    "url": "https://patches.dpdk.org/api/patches/18687/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1483027473-89042-17-git-send-email-beilei.xing@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": "<1483027473-89042-17-git-send-email-beilei.xing@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1483027473-89042-17-git-send-email-beilei.xing@intel.com",
    "date": "2016-12-29T16:04:32",
    "name": "[dpdk-dev,v3,16/17] net/i40e: flush ethertype filters",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "efff054dae12281468c8ea30ccfcc5d906750d29",
    "submitter": {
        "id": 410,
        "url": "https://patches.dpdk.org/api/people/410/?format=api",
        "name": "Xing, Beilei",
        "email": "beilei.xing@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1483027473-89042-17-git-send-email-beilei.xing@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/18687/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/18687/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 28822F937;\n\tThu, 29 Dec 2016 17:06:06 +0100 (CET)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id C062658CF\n\tfor <dev@dpdk.org>; Thu, 29 Dec 2016 17:05:31 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga105.fm.intel.com with ESMTP; 29 Dec 2016 08:05:31 -0800",
            "from unknown (HELO dpdk9.sh.intel.com) ([10.239.129.31])\n\tby fmsmga002.fm.intel.com with ESMTP; 29 Dec 2016 08:05:29 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos; i=\"5.33,427,1477983600\"; d=\"scan'208\";\n\ta=\"1105685115\"",
        "From": "Beilei Xing <beilei.xing@intel.com>",
        "To": "jingjing.wu@intel.com,\n\thelin.zhang@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Fri, 30 Dec 2016 00:04:32 +0800",
        "Message-Id": "<1483027473-89042-17-git-send-email-beilei.xing@intel.com>",
        "X-Mailer": "git-send-email 2.5.5",
        "In-Reply-To": "<1483027473-89042-1-git-send-email-beilei.xing@intel.com>",
        "References": "<1482819984-14120-1-git-send-email-beilei.xing@intel.com>\n\t<1483027473-89042-1-git-send-email-beilei.xing@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 16/17] net/i40e: flush ethertype filters",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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 patch adds i40e_ethertype_filter_flush function\nto flush all ethertype filters, including filters in\nSW and HW.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n drivers/net/i40e/i40e_flow.c | 41 ++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 40 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c\nindex ee463c9..947199d 100644\n--- a/drivers/net/i40e/i40e_flow.c\n+++ b/drivers/net/i40e/i40e_flow.c\n@@ -104,6 +104,7 @@ static int i40e_dev_destroy_ethertype_filter(struct i40e_pf *pf,\n static int i40e_dev_destroy_tunnel_filter(struct i40e_pf *pf,\n \t\t\t\t\t  struct i40e_tunnel_filter *filter);\n static int i40e_fdir_filter_flush(struct i40e_pf *pf);\n+static int i40e_ethertype_filter_flush(struct i40e_pf *pf);\n \n const struct rte_flow_ops i40e_flow_ops = {\n \t.validate = i40e_flow_validate,\n@@ -1655,10 +1656,20 @@ i40e_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)\n \tint ret;\n \n \tret = i40e_fdir_filter_flush(pf);\n-\tif (ret)\n+\tif (ret) {\n \t\trte_flow_error_set(error, -ret,\n \t\t\t\t   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,\n \t\t\t\t   \"Failed to flush FDIR flows.\");\n+\t\treturn -rte_errno;\n+\t}\n+\n+\tret = i40e_ethertype_filter_flush(pf);\n+\tif (ret) {\n+\t\trte_flow_error_set(error, -ret,\n+\t\t\t\t   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,\n+\t\t\t\t   \"Failed to ethertype flush flows.\");\n+\t\treturn -rte_errno;\n+\t}\n \n \treturn ret;\n }\n@@ -1694,3 +1705,31 @@ i40e_fdir_filter_flush(struct i40e_pf *pf)\n \n \treturn ret;\n }\n+\n+/* Flush all ethertype filters */\n+static int\n+i40e_ethertype_filter_flush(struct i40e_pf *pf)\n+{\n+\tstruct i40e_ethertype_filter_list\n+\t\t*ethertype_list = &pf->ethertype.ethertype_list;\n+\tstruct i40e_ethertype_filter *f;\n+\tstruct i40e_flow *flow;\n+\tvoid *temp;\n+\tint ret = 0;\n+\n+\twhile ((f = TAILQ_FIRST(ethertype_list))) {\n+\t\tret = i40e_dev_destroy_ethertype_filter(pf, f);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\t/* Delete ethertype flows in flow list. */\n+\tTAILQ_FOREACH_SAFE(flow, &pf->flow_list, node, temp) {\n+\t\tif (flow->filter_type == RTE_ETH_FILTER_ETHERTYPE) {\n+\t\t\tTAILQ_REMOVE(&pf->flow_list, flow, node);\n+\t\t\trte_free(flow);\n+\t\t}\n+\t}\n+\n+\treturn ret;\n+}\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "16/17"
    ]
}