get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54319,
    "url": "http://patches.dpdk.org/api/patches/54319/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190604054248.68510-44-leyi.rong@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20190604054248.68510-44-leyi.rong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190604054248.68510-44-leyi.rong@intel.com",
    "date": "2019-06-04T05:42:42",
    "name": "[43/49] net/ice/base: refactor VSI node sched code",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3c05369df7ff27bdbbc5140f48f2c304dc10e992",
    "submitter": {
        "id": 1204,
        "url": "http://patches.dpdk.org/api/people/1204/?format=api",
        "name": "Leyi Rong",
        "email": "leyi.rong@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190604054248.68510-44-leyi.rong@intel.com/mbox/",
    "series": [
        {
            "id": 4879,
            "url": "http://patches.dpdk.org/api/series/4879/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4879",
            "date": "2019-06-04T05:41:59",
            "name": "shared code update",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4879/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54319/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54319/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 ABDB31BC8A;\n\tTue,  4 Jun 2019 07:45:29 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 148FE1BB3D\n\tfor <dev@dpdk.org>; Tue,  4 Jun 2019 07:44:42 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Jun 2019 22:44:42 -0700",
            "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby fmsmga008.fm.intel.com with ESMTP; 03 Jun 2019 22:44:41 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Leyi Rong <leyi.rong@intel.com>",
        "To": "qi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, Leyi Rong <leyi.rong@intel.com>,\n\tGrzegorz Nitka <grzegorz.nitka@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Tue,  4 Jun 2019 13:42:42 +0800",
        "Message-Id": "<20190604054248.68510-44-leyi.rong@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190604054248.68510-1-leyi.rong@intel.com>",
        "References": "<20190604054248.68510-1-leyi.rong@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 43/49] net/ice/base: refactor VSI node sched code",
        "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": "Refactored VSI node sched code to use port_info ptr as call arg.\n\nThe declaration of VSI node getter function has been modified to use\npointer to ice_port_info structure instead of pointer to hw structure.\nThis way suitable port_info structure is used to find VSI node.\n\nSigned-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com>\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Leyi Rong <leyi.rong@intel.com>\n---\n drivers/net/ice/base/ice_sched.c | 47 ++++++++++++++++----------------\n drivers/net/ice/base/ice_sched.h |  2 +-\n 2 files changed, 24 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c\nindex fa3158a7b..0f4153146 100644\n--- a/drivers/net/ice/base/ice_sched.c\n+++ b/drivers/net/ice/base/ice_sched.c\n@@ -1451,7 +1451,7 @@ ice_sched_get_free_qparent(struct ice_port_info *pi, u16 vsi_handle, u8 tc,\n \n /**\n  * ice_sched_get_vsi_node - Get a VSI node based on VSI ID\n- * @hw: pointer to the HW struct\n+ * @pi: pointer to the port information structure\n  * @tc_node: pointer to the TC node\n  * @vsi_handle: software VSI handle\n  *\n@@ -1459,14 +1459,14 @@ ice_sched_get_free_qparent(struct ice_port_info *pi, u16 vsi_handle, u8 tc,\n  * TC branch\n  */\n struct ice_sched_node *\n-ice_sched_get_vsi_node(struct ice_hw *hw, struct ice_sched_node *tc_node,\n+ice_sched_get_vsi_node(struct ice_port_info *pi, struct ice_sched_node *tc_node,\n \t\t       u16 vsi_handle)\n {\n \tstruct ice_sched_node *node;\n \tu8 vsi_layer;\n \n-\tvsi_layer = ice_sched_get_vsi_layer(hw);\n-\tnode = ice_sched_get_first_node(hw->port_info, tc_node, vsi_layer);\n+\tvsi_layer = ice_sched_get_vsi_layer(pi->hw);\n+\tnode = ice_sched_get_first_node(pi, tc_node, vsi_layer);\n \n \t/* Check whether it already exists */\n \twhile (node) {\n@@ -1587,7 +1587,7 @@ ice_sched_add_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle,\n \n \tqgl = ice_sched_get_qgrp_layer(hw);\n \tvsil = ice_sched_get_vsi_layer(hw);\n-\tparent = ice_sched_get_vsi_node(hw, tc_node, vsi_handle);\n+\tparent = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);\n \tfor (i = vsil + 1; i <= qgl; i++) {\n \t\tif (!parent)\n \t\t\treturn ICE_ERR_CFG;\n@@ -1620,7 +1620,7 @@ ice_sched_add_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle,\n \n /**\n  * ice_sched_calc_vsi_support_nodes - calculate number of VSI support nodes\n- * @hw: pointer to the HW struct\n+ * @pi: pointer to the port info structure\n  * @tc_node: pointer to TC node\n  * @num_nodes: pointer to num nodes array\n  *\n@@ -1629,15 +1629,15 @@ ice_sched_add_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle,\n  * layers\n  */\n static void\n-ice_sched_calc_vsi_support_nodes(struct ice_hw *hw,\n+ice_sched_calc_vsi_support_nodes(struct ice_port_info *pi,\n \t\t\t\t struct ice_sched_node *tc_node, u16 *num_nodes)\n {\n \tstruct ice_sched_node *node;\n \tu8 vsil;\n \tint i;\n \n-\tvsil = ice_sched_get_vsi_layer(hw);\n-\tfor (i = vsil; i >= hw->sw_entry_point_layer; i--)\n+\tvsil = ice_sched_get_vsi_layer(pi->hw);\n+\tfor (i = vsil; i >= pi->hw->sw_entry_point_layer; i--)\n \t\t/* Add intermediate nodes if TC has no children and\n \t\t * need at least one node for VSI\n \t\t */\n@@ -1647,11 +1647,11 @@ ice_sched_calc_vsi_support_nodes(struct ice_hw *hw,\n \t\t\t/* If intermediate nodes are reached max children\n \t\t\t * then add a new one.\n \t\t\t */\n-\t\t\tnode = ice_sched_get_first_node(hw->port_info, tc_node,\n-\t\t\t\t\t\t\t(u8)i);\n+\t\t\tnode = ice_sched_get_first_node(pi, tc_node, (u8)i);\n \t\t\t/* scan all the siblings */\n \t\t\twhile (node) {\n-\t\t\t\tif (node->num_children < hw->max_children[i])\n+\t\t\t\tif (node->num_children <\n+\t\t\t\t    pi->hw->max_children[i])\n \t\t\t\t\tbreak;\n \t\t\t\tnode = node->sibling;\n \t\t\t}\n@@ -1731,14 +1731,13 @@ ice_sched_add_vsi_to_topo(struct ice_port_info *pi, u16 vsi_handle, u8 tc)\n {\n \tu16 num_nodes[ICE_AQC_TOPO_MAX_LEVEL_NUM] = { 0 };\n \tstruct ice_sched_node *tc_node;\n-\tstruct ice_hw *hw = pi->hw;\n \n \ttc_node = ice_sched_get_tc_node(pi, tc);\n \tif (!tc_node)\n \t\treturn ICE_ERR_PARAM;\n \n \t/* calculate number of supported nodes needed for this VSI */\n-\tice_sched_calc_vsi_support_nodes(hw, tc_node, num_nodes);\n+\tice_sched_calc_vsi_support_nodes(pi, tc_node, num_nodes);\n \n \t/* add VSI supported nodes to TC subtree */\n \treturn ice_sched_add_vsi_support_nodes(pi, vsi_handle, tc_node,\n@@ -1771,7 +1770,7 @@ ice_sched_update_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle,\n \tif (!tc_node)\n \t\treturn ICE_ERR_CFG;\n \n-\tvsi_node = ice_sched_get_vsi_node(hw, tc_node, vsi_handle);\n+\tvsi_node = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);\n \tif (!vsi_node)\n \t\treturn ICE_ERR_CFG;\n \n@@ -1834,7 +1833,7 @@ ice_sched_cfg_vsi(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 maxqs,\n \tvsi_ctx = ice_get_vsi_ctx(hw, vsi_handle);\n \tif (!vsi_ctx)\n \t\treturn ICE_ERR_PARAM;\n-\tvsi_node = ice_sched_get_vsi_node(hw, tc_node, vsi_handle);\n+\tvsi_node = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);\n \n \t/* suspend the VSI if TC is not enabled */\n \tif (!enable) {\n@@ -1855,7 +1854,7 @@ ice_sched_cfg_vsi(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 maxqs,\n \t\tif (status)\n \t\t\treturn status;\n \n-\t\tvsi_node = ice_sched_get_vsi_node(hw, tc_node, vsi_handle);\n+\t\tvsi_node = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);\n \t\tif (!vsi_node)\n \t\t\treturn ICE_ERR_CFG;\n \n@@ -1966,7 +1965,7 @@ ice_sched_rm_vsi_cfg(struct ice_port_info *pi, u16 vsi_handle, u8 owner)\n \t\tif (!tc_node)\n \t\t\tcontinue;\n \n-\t\tvsi_node = ice_sched_get_vsi_node(pi->hw, tc_node, vsi_handle);\n+\t\tvsi_node = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);\n \t\tif (!vsi_node)\n \t\t\tcontinue;\n \n@@ -2256,7 +2255,7 @@ ice_sched_move_vsi_to_agg(struct ice_port_info *pi, u16 vsi_handle, u32 agg_id,\n \tif (!agg_node)\n \t\treturn ICE_ERR_DOES_NOT_EXIST;\n \n-\tvsi_node = ice_sched_get_vsi_node(pi->hw, tc_node, vsi_handle);\n+\tvsi_node = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);\n \tif (!vsi_node)\n \t\treturn ICE_ERR_DOES_NOT_EXIST;\n \n@@ -3537,7 +3536,7 @@ ice_cfg_agg_vsi_priority_per_tc(struct ice_port_info *pi, u32 agg_id,\n \t\tif (!vsi_handle_valid)\n \t\t\tgoto exit_agg_priority_per_tc;\n \n-\t\tvsi_node = ice_sched_get_vsi_node(hw, tc_node, vsi_handle);\n+\t\tvsi_node = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);\n \t\tif (!vsi_node)\n \t\t\tgoto exit_agg_priority_per_tc;\n \n@@ -3593,7 +3592,7 @@ ice_cfg_vsi_bw_alloc(struct ice_port_info *pi, u16 vsi_handle, u8 ena_tcmap,\n \t\tif (!tc_node)\n \t\t\tcontinue;\n \n-\t\tvsi_node = ice_sched_get_vsi_node(pi->hw, tc_node, vsi_handle);\n+\t\tvsi_node = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);\n \t\tif (!vsi_node)\n \t\t\tcontinue;\n \n@@ -4805,7 +4804,7 @@ ice_sched_validate_vsi_srl_node(struct ice_port_info *pi, u16 vsi_handle)\n \t\tif (!tc_node)\n \t\t\tcontinue;\n \n-\t\tvsi_node = ice_sched_get_vsi_node(pi->hw, tc_node, vsi_handle);\n+\t\tvsi_node = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);\n \t\tif (!vsi_node)\n \t\t\tcontinue;\n \n@@ -4864,7 +4863,7 @@ ice_sched_set_vsi_bw_shared_lmt(struct ice_port_info *pi, u16 vsi_handle,\n \t\tif (!tc_node)\n \t\t\tcontinue;\n \n-\t\tvsi_node = ice_sched_get_vsi_node(pi->hw, tc_node, vsi_handle);\n+\t\tvsi_node = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);\n \t\tif (!vsi_node)\n \t\t\tcontinue;\n \n@@ -5368,7 +5367,7 @@ ice_sched_replay_vsi_bw(struct ice_hw *hw, u16 vsi_handle,\n \t\ttc_node = ice_sched_get_tc_node(pi, tc);\n \t\tif (!tc_node)\n \t\t\tcontinue;\n-\t\tvsi_node = ice_sched_get_vsi_node(hw, tc_node, vsi_handle);\n+\t\tvsi_node = ice_sched_get_vsi_node(pi, tc_node, vsi_handle);\n \t\tif (!vsi_node)\n \t\t\tcontinue;\n \t\tbw_t_info = &vsi_ctx->sched.bw_t_info[tc];\ndiff --git a/drivers/net/ice/base/ice_sched.h b/drivers/net/ice/base/ice_sched.h\nindex e444dc880..38f8f93d2 100644\n--- a/drivers/net/ice/base/ice_sched.h\n+++ b/drivers/net/ice/base/ice_sched.h\n@@ -107,7 +107,7 @@ ice_sched_cfg_vsi(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 maxqs,\n \t\t  u8 owner, bool enable);\n enum ice_status ice_rm_vsi_lan_cfg(struct ice_port_info *pi, u16 vsi_handle);\n struct ice_sched_node *\n-ice_sched_get_vsi_node(struct ice_hw *hw, struct ice_sched_node *tc_node,\n+ice_sched_get_vsi_node(struct ice_port_info *pi, struct ice_sched_node *tc_node,\n \t\t       u16 vsi_handle);\n bool ice_sched_is_tree_balanced(struct ice_hw *hw, struct ice_sched_node *node);\n enum ice_status\n",
    "prefixes": [
        "43/49"
    ]
}