get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 883394,
    "url": "http://patchwork.ozlabs.org/api/patches/883394/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180308225211.12254-4-jeffrey.t.kirsher@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20180308225211.12254-4-jeffrey.t.kirsher@intel.com>",
    "list_archive_url": null,
    "date": "2018-03-08T22:52:08",
    "name": "[S87,v5,4/7] i40e: track filter type statistics when deleting invalid filters",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1e47510d9e78470bec14019041926bee0fac8856",
    "submitter": {
        "id": 473,
        "url": "http://patchwork.ozlabs.org/api/people/473/?format=api",
        "name": "Kirsher, Jeffrey T",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180308225211.12254-4-jeffrey.t.kirsher@intel.com/mbox/",
    "series": [
        {
            "id": 32763,
            "url": "http://patchwork.ozlabs.org/api/series/32763/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=32763",
            "date": "2018-03-08T22:52:05",
            "name": "[S87,v5,1/7] i40e: Fix attach VF to VM issue",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/32763/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/883394/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/883394/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3zy5P80JCZz9scR\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  9 Mar 2018 09:52:11 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 7157A22906;\n\tThu,  8 Mar 2018 22:52:10 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id yBJBkzj6tJfb; Thu,  8 Mar 2018 22:52:09 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 0A2EB22744;\n\tThu,  8 Mar 2018 22:52:09 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 165301C03E8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Mar 2018 22:52:03 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 1225687BB0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Mar 2018 22:52:03 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id waTgO1MSPk4n for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Mar 2018 22:52:02 +0000 (UTC)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 8F11087A7C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Mar 2018 22:51:47 +0000 (UTC)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Mar 2018 14:51:46 -0800",
            "from jtkirshe-nuc.jf.intel.com ([134.134.177.59])\n\tby orsmga001.jf.intel.com with ESMTP; 08 Mar 2018 14:51:45 -0800"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.47,442,1515484800\"; d=\"scan'208\";a=\"37164040\"",
        "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Thu,  8 Mar 2018 14:52:08 -0800",
        "Message-Id": "<20180308225211.12254-4-jeffrey.t.kirsher@intel.com>",
        "X-Mailer": "git-send-email 2.14.3",
        "In-Reply-To": "<20180308225211.12254-1-jeffrey.t.kirsher@intel.com>",
        "References": "<20180308225211.12254-1-jeffrey.t.kirsher@intel.com>",
        "Subject": "[Intel-wired-lan] [S87 v5 4/7] i40e: track filter type statistics\n\twhen deleting invalid filters",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.24",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "From: Jacob Keller <jacob.e.keller@intel.com>\n\nWhen hardware has trouble with a particular filter, we delete it from\nthe list. Unfortunately, we did not properly update the per-filter\nstatistic when doing so.\n\nCreate a helper function to handle this, and properly reduce the\nnecessary counter so that it tracks the number of active filters\nproperly.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_main.c | 56 ++++++++++++++++++++++++-----\n 1 file changed, 48 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 183c8b84b7ea..0b45650b7e31 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -8136,6 +8136,51 @@ u32 i40e_get_global_fd_count(struct i40e_pf *pf)\n \treturn fcnt_prog;\n }\n \n+/**\n+ * i40e_delete_invalid_filter - Delete an invalid FDIR filter\n+ * @pf: board private structure\n+ * @filter: FDir filter to remove\n+ */\n+static void i40e_delete_invalid_filter(struct i40e_pf *pf,\n+\t\t\t\t       struct i40e_fdir_filter *filter)\n+{\n+\t/* Update counters */\n+\tpf->fdir_pf_active_filters--;\n+\tpf->fd_inv = 0;\n+\n+\tswitch (filter->flow_type) {\n+\tcase TCP_V4_FLOW:\n+\t\tpf->fd_tcp4_filter_cnt--;\n+\t\tbreak;\n+\tcase UDP_V4_FLOW:\n+\t\tpf->fd_udp4_filter_cnt--;\n+\t\tbreak;\n+\tcase SCTP_V4_FLOW:\n+\t\tpf->fd_sctp4_filter_cnt--;\n+\t\tbreak;\n+\tcase IP_USER_FLOW:\n+\t\tswitch (filter->ip4_proto) {\n+\t\tcase IPPROTO_TCP:\n+\t\t\tpf->fd_tcp4_filter_cnt--;\n+\t\t\tbreak;\n+\t\tcase IPPROTO_UDP:\n+\t\t\tpf->fd_udp4_filter_cnt--;\n+\t\t\tbreak;\n+\t\tcase IPPROTO_SCTP:\n+\t\t\tpf->fd_sctp4_filter_cnt--;\n+\t\t\tbreak;\n+\t\tcase IPPROTO_IP:\n+\t\t\tpf->fd_ip4_filter_cnt--;\n+\t\t\tbreak;\n+\t\t}\n+\t\tbreak;\n+\t}\n+\n+\t/* Remove the filter from the list and free memory */\n+\thlist_del(&filter->fdir_node);\n+\tkfree(filter);\n+}\n+\n /**\n  * i40e_fdir_check_and_reenable - Function to reenabe FD ATR or SB if disabled\n  * @pf: board private structure\n@@ -8180,14 +8225,9 @@ void i40e_fdir_check_and_reenable(struct i40e_pf *pf)\n \t/* if hw had a problem adding a filter, delete it */\n \tif (pf->fd_inv > 0) {\n \t\thlist_for_each_entry_safe(filter, node,\n-\t\t\t\t\t  &pf->fdir_filter_list, fdir_node) {\n-\t\t\tif (filter->fd_id == pf->fd_inv) {\n-\t\t\t\thlist_del(&filter->fdir_node);\n-\t\t\t\tkfree(filter);\n-\t\t\t\tpf->fdir_pf_active_filters--;\n-\t\t\t\tpf->fd_inv = 0;\n-\t\t\t}\n-\t\t}\n+\t\t\t\t\t  &pf->fdir_filter_list, fdir_node)\n+\t\t\tif (filter->fd_id == pf->fd_inv)\n+\t\t\t\ti40e_delete_invalid_filter(pf, filter);\n \t}\n }\n \n",
    "prefixes": [
        "S87",
        "v5",
        "4/7"
    ]
}