get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1016213,
    "url": "http://patchwork.ozlabs.org/api/patches/1016213/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20181219180334.1104-10-anirudh.venkataramanan@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": "<20181219180334.1104-10-anirudh.venkataramanan@intel.com>",
    "list_archive_url": null,
    "date": "2018-12-19T18:03:28",
    "name": "[S10,09/15] ice: Move aggregator list into ice_hw instance",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1ad50d8a3cdcb1974391add60bfb8bad262031a1",
    "submitter": {
        "id": 73601,
        "url": "http://patchwork.ozlabs.org/api/people/73601/?format=api",
        "name": "Anirudh Venkataramanan",
        "email": "anirudh.venkataramanan@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/20181219180334.1104-10-anirudh.venkataramanan@intel.com/mbox/",
    "series": [
        {
            "id": 82906,
            "url": "http://patchwork.ozlabs.org/api/series/82906/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=82906",
            "date": "2018-12-19T18:03:28",
            "name": "Feature updates for ice",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/82906/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1016213/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1016213/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.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 43KjSF2yqZz9sB5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 20 Dec 2018 05:03:41 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D31E787866;\n\tWed, 19 Dec 2018 18:03:39 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Ru834blja4Yx; Wed, 19 Dec 2018 18:03:39 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 6264287994;\n\tWed, 19 Dec 2018 18:03:39 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 770D31C2A9B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 19 Dec 2018 18:03:37 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 74BF887994\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 19 Dec 2018 18:03:37 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 50h6Diivd+5Q for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 19 Dec 2018 18:03:36 +0000 (UTC)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 852D687829\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 19 Dec 2018 18:03:36 +0000 (UTC)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Dec 2018 10:03:36 -0800",
            "from shasta.jf.intel.com ([10.166.241.11])\n\tby fmsmga002.fm.intel.com with ESMTP; 19 Dec 2018 10:03:35 -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.56,373,1539673200\"; d=\"scan'208\";a=\"127400080\"",
        "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Wed, 19 Dec 2018 10:03:28 -0800",
        "Message-Id": "<20181219180334.1104-10-anirudh.venkataramanan@intel.com>",
        "X-Mailer": "git-send-email 2.14.5",
        "In-Reply-To": "<20181219180334.1104-1-anirudh.venkataramanan@intel.com>",
        "References": "<20181219180334.1104-1-anirudh.venkataramanan@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH S10 09/15] ice: Move aggregator list into\n\tice_hw instance",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "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": "The aggregator list needs to be preserved for use after a reset. This\npatch moves it out of the port_info instance and into the ice_hw instance.\n\nSigned-off-by: Tarun Singh <tarun.k.singh@intel.com>\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_common.c |  2 ++\n drivers/net/ethernet/intel/ice/ice_sched.c  | 34 ++++++++++++++++++-----------\n drivers/net/ethernet/intel/ice/ice_sched.h  |  2 ++\n drivers/net/ethernet/intel/ice/ice_type.h   |  2 +-\n 4 files changed, 26 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c\nindex 2bcd8230d35e..19695749f903 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.c\n+++ b/drivers/net/ethernet/intel/ice/ice_common.c\n@@ -750,6 +750,7 @@ enum ice_status ice_init_hw(struct ice_hw *hw)\n \t\tstatus = ICE_ERR_CFG;\n \t\tgoto err_unroll_sched;\n \t}\n+\tINIT_LIST_HEAD(&hw->agg_list);\n \n \tstatus = ice_init_fltr_mgmt_struct(hw);\n \tif (status)\n@@ -800,6 +801,7 @@ void ice_deinit_hw(struct ice_hw *hw)\n \tice_cleanup_fltr_mgmt_struct(hw);\n \n \tice_sched_cleanup_all(hw);\n+\tice_sched_clear_agg(hw);\n \n \tif (hw->port_info) {\n \t\tdevm_kfree(ice_hw_to_dev(hw), hw->port_info);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_sched.c b/drivers/net/ethernet/intel/ice/ice_sched.c\nindex 99d51990bd54..8091179362d1 100644\n--- a/drivers/net/ethernet/intel/ice/ice_sched.c\n+++ b/drivers/net/ethernet/intel/ice/ice_sched.c\n@@ -561,23 +561,18 @@ ice_sched_suspend_resume_elems(struct ice_hw *hw, u8 num_nodes, u32 *node_teids,\n }\n \n /**\n- * ice_sched_clear_tx_topo - clears the schduler tree nodes\n- * @pi: port information structure\n+ * ice_sched_clear_agg - clears the agg related information\n+ * @hw: pointer to the hardware structure\n  *\n- * This function removes all the nodes from HW as well as from SW DB.\n+ * This function removes agg list and free up agg related memory\n+ * previously allocated.\n  */\n-static void ice_sched_clear_tx_topo(struct ice_port_info *pi)\n+void ice_sched_clear_agg(struct ice_hw *hw)\n {\n \tstruct ice_sched_agg_info *agg_info;\n \tstruct ice_sched_agg_info *atmp;\n-\tstruct ice_hw *hw;\n \n-\tif (!pi)\n-\t\treturn;\n-\n-\thw = pi->hw;\n-\n-\tlist_for_each_entry_safe(agg_info, atmp, &pi->agg_list, list_entry) {\n+\tlist_for_each_entry_safe(agg_info, atmp, &hw->agg_list, list_entry) {\n \t\tstruct ice_sched_agg_vsi_info *agg_vsi_info;\n \t\tstruct ice_sched_agg_vsi_info *vtmp;\n \n@@ -586,8 +581,21 @@ static void ice_sched_clear_tx_topo(struct ice_port_info *pi)\n \t\t\tlist_del(&agg_vsi_info->list_entry);\n \t\t\tdevm_kfree(ice_hw_to_dev(hw), agg_vsi_info);\n \t\t}\n+\t\tlist_del(&agg_info->list_entry);\n+\t\tdevm_kfree(ice_hw_to_dev(hw), agg_info);\n \t}\n+}\n \n+/**\n+ * ice_sched_clear_tx_topo - clears the schduler tree nodes\n+ * @pi: port information structure\n+ *\n+ * This function removes all the nodes from HW as well as from SW DB.\n+ */\n+static void ice_sched_clear_tx_topo(struct ice_port_info *pi)\n+{\n+\tif (!pi)\n+\t\treturn;\n \tif (pi->root) {\n \t\tice_free_sched_node(pi, pi->root);\n \t\tpi->root = NULL;\n@@ -1005,7 +1013,6 @@ enum ice_status ice_sched_init_port(struct ice_port_info *pi)\n \t/* initialize the port for handling the scheduler tree */\n \tpi->port_state = ICE_SCHED_PORT_STATE_READY;\n \tmutex_init(&pi->sched_lock);\n-\tINIT_LIST_HEAD(&pi->agg_list);\n \n err_init_port:\n \tif (status && pi->root) {\n@@ -1588,7 +1595,8 @@ ice_sched_rm_agg_vsi_info(struct ice_port_info *pi, u16 vsi_handle)\n \tstruct ice_sched_agg_info *agg_info;\n \tstruct ice_sched_agg_info *atmp;\n \n-\tlist_for_each_entry_safe(agg_info, atmp, &pi->agg_list, list_entry) {\n+\tlist_for_each_entry_safe(agg_info, atmp, &pi->hw->agg_list,\n+\t\t\t\t list_entry) {\n \t\tstruct ice_sched_agg_vsi_info *agg_vsi_info;\n \t\tstruct ice_sched_agg_vsi_info *vtmp;\n \ndiff --git a/drivers/net/ethernet/intel/ice/ice_sched.h b/drivers/net/ethernet/intel/ice/ice_sched.h\nindex da5b4c166da8..bee8221ad146 100644\n--- a/drivers/net/ethernet/intel/ice/ice_sched.h\n+++ b/drivers/net/ethernet/intel/ice/ice_sched.h\n@@ -28,6 +28,8 @@ enum ice_status ice_sched_init_port(struct ice_port_info *pi);\n enum ice_status ice_sched_query_res_alloc(struct ice_hw *hw);\n void ice_sched_clear_port(struct ice_port_info *pi);\n void ice_sched_cleanup_all(struct ice_hw *hw);\n+void ice_sched_clear_agg(struct ice_hw *hw);\n+\n struct ice_sched_node *\n ice_sched_find_node_by_teid(struct ice_sched_node *start_node, u32 teid);\n enum ice_status\ndiff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h\nindex 0ea428104215..a078e2c98871 100644\n--- a/drivers/net/ethernet/intel/ice/ice_type.h\n+++ b/drivers/net/ethernet/intel/ice/ice_type.h\n@@ -272,7 +272,6 @@ struct ice_port_info {\n \tstruct ice_mac_info mac;\n \tstruct ice_phy_info phy;\n \tstruct mutex sched_lock;\t/* protect access to TXSched tree */\n-\tstruct list_head agg_list;\t/* lists all aggregator */\n \tu8 lport;\n #define ICE_LPORT_MASK\t\t0xff\n \tu8 is_vf;\n@@ -326,6 +325,7 @@ struct ice_hw {\n \tu8 max_cgds;\n \tu8 sw_entry_point_layer;\n \tu16 max_children[ICE_AQC_TOPO_MAX_LEVEL_NUM];\n+\tstruct list_head agg_list;\t/* lists all aggregator */\n \n \tstruct ice_vsi_ctx *vsi_ctx[ICE_MAX_VSI];\n \tu8 evb_veb;\t\t/* true for VEB, false for VEPA */\n",
    "prefixes": [
        "S10",
        "09/15"
    ]
}