get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66583,
    "url": "http://patches.dpdk.org/api/patches/66583/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200312111907.31555-9-ndabilpuram@marvell.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": "<20200312111907.31555-9-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200312111907.31555-9-ndabilpuram@marvell.com",
    "date": "2020-03-12T11:19:04",
    "name": "[08/11] net/octeontx2: add tm dynamic topology update cb",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "313d210f042dbbc6917093bb802b0b6b94d7d821",
    "submitter": {
        "id": 1202,
        "url": "http://patches.dpdk.org/api/people/1202/?format=api",
        "name": "Nithin Dabilpuram",
        "email": "ndabilpuram@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200312111907.31555-9-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 8894,
            "url": "http://patches.dpdk.org/api/series/8894/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8894",
            "date": "2020-03-12T11:18:56",
            "name": "net/octeontx2: add traffic manager support",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8894/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66583/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/66583/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 07C62A056B;\n\tThu, 12 Mar 2020 12:21:23 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 491501C0BD;\n\tThu, 12 Mar 2020 12:19:38 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id B0F371C02A\n for <dev@dpdk.org>; Thu, 12 Mar 2020 12:19:35 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 02CBGjUj014745 for <dev@dpdk.org>; Thu, 12 Mar 2020 04:19:34 -0700",
            "from sc-exch03.marvell.com ([199.233.58.183])\n by mx0a-0016f401.pphosted.com with ESMTP id 2yqfwuh10j-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 12 Mar 2020 04:19:34 -0700",
            "from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 12 Mar\n 2020 04:19:33 -0700",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH02.marvell.com\n (10.93.176.82) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Thu, 12 Mar 2020 04:19:33 -0700",
            "from hyd1588t430.marvell.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id 8E17C3F7040;\n Thu, 12 Mar 2020 04:19:31 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-type; s=pfpt0818; bh=eoGLwD14qgfHwGZF7rEPJ7YBCViA/ihtk5MKSqszK48=;\n b=D8kDc3aYc+t3Zr8JJ3T8R+cMi3AHg4nkxIIA9MgiG/Ik99FD8qCMzpSfPromwHLhCTpO\n WIiSagXwKTU7HEJjl4hh1EeFsVS78p1An5aSe3qRXnvTOcoWCYxpAT8TdxMa5RdYW0F5\n 1sKxcQI6JIkyT1pnlsh0Y43b07+HhTJ8vcv83XL7ZZxiE6qJCuOc5iMTUP4P1oVB8Biy\n dHeZKDykX+7D249fUsLhwCA8gbLKaGXSaXlsi3Zfou/rBae4RXpKuDdTVzPU1qUApzzL\n uxFQNdHuT7J+a9AJEBVJiSwZHXB/JfrK2Ud5w3nebEjydmgzqBCoSvDRauJDYmDIvz1g 6A==",
        "From": "Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "To": "Jerin Jacob <jerinj@marvell.com>, Nithin Dabilpuram\n <ndabilpuram@marvell.com>, Kiran Kumar K <kirankumark@marvell.com>",
        "CC": "Krzysztof Kanas <kkanas@marvell.com>, <dev@dpdk.org>",
        "Date": "Thu, 12 Mar 2020 16:49:04 +0530",
        "Message-ID": "<20200312111907.31555-9-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "In-Reply-To": "<20200312111907.31555-1-ndabilpuram@marvell.com>",
        "References": "<20200312111907.31555-1-ndabilpuram@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572\n definitions=2020-03-12_03:2020-03-11,\n 2020-03-12 signatures=0",
        "Subject": "[dpdk-dev] [PATCH 08/11] net/octeontx2: add tm dynamic topology\n\tupdate cb",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add dynamic parent and shaper update callbacks that\ncan be used to change RR Quantum or PIR/CIR rate dynamically\npost hierarchy commit. Dynamic parent update callback only\nsupports updating RR quantum of a given child with respect to\nits parent. There is no support yet to change priority or parent\nitself.\n\nSigned-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\nSigned-off-by: Krzysztof Kanas <kkanas@marvell.com>\n---\n drivers/net/octeontx2/otx2_tm.c | 190 ++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 190 insertions(+)",
    "diff": "diff --git a/drivers/net/octeontx2/otx2_tm.c b/drivers/net/octeontx2/otx2_tm.c\nindex 6cc07fc..f84d166 100644\n--- a/drivers/net/octeontx2/otx2_tm.c\n+++ b/drivers/net/octeontx2/otx2_tm.c\n@@ -2229,6 +2229,194 @@ nix_tm_hierarchy_commit(struct rte_eth_dev *eth_dev,\n }\n \n static int\n+nix_tm_node_shaper_update(struct rte_eth_dev *eth_dev,\n+\t\t\t  uint32_t node_id,\n+\t\t\t  uint32_t profile_id,\n+\t\t\t  struct rte_tm_error *error)\n+{\n+\tstruct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);\n+\tstruct otx2_nix_tm_shaper_profile *profile = NULL;\n+\tstruct otx2_mbox *mbox = dev->mbox;\n+\tstruct otx2_nix_tm_node *tm_node;\n+\tstruct nix_txschq_config *req;\n+\tuint8_t k;\n+\tint rc;\n+\n+\ttm_node = nix_tm_node_search(dev, node_id, true);\n+\tif (!tm_node || nix_tm_is_leaf(dev, tm_node->lvl)) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_NODE_ID;\n+\t\terror->message = \"invalid node\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (profile_id == tm_node->params.shaper_profile_id)\n+\t\treturn 0;\n+\n+\tif (profile_id != RTE_TM_SHAPER_PROFILE_ID_NONE) {\n+\t\tprofile = nix_tm_shaper_profile_search(dev, profile_id);\n+\t\tif (!profile) {\n+\t\t\terror->type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_ID;\n+\t\t\terror->message = \"shaper profile ID not exist\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n+\n+\ttm_node->params.shaper_profile_id = profile_id;\n+\n+\t/* Nothing to do if not yet committed */\n+\tif (!(dev->tm_flags & NIX_TM_COMMITTED))\n+\t\treturn 0;\n+\n+\ttm_node->flags &= ~NIX_TM_NODE_ENABLED;\n+\n+\t/* Flush the specific node with SW_XOFF */\n+\treq = otx2_mbox_alloc_msg_nix_txschq_cfg(mbox);\n+\treq->lvl = tm_node->hw_lvl;\n+\tk = prepare_tm_sw_xoff(tm_node, true, req->reg, req->regval);\n+\treq->num_regs = k;\n+\n+\trc = send_tm_reqval(mbox, req, error);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\t/* Update the PIR/CIR and clear SW XOFF */\n+\treq = otx2_mbox_alloc_msg_nix_txschq_cfg(mbox);\n+\treq->lvl = tm_node->hw_lvl;\n+\n+\tk = prepare_tm_shaper_reg(tm_node, profile, req->reg, req->regval);\n+\n+\tk += prepare_tm_sw_xoff(tm_node, false, &req->reg[k], &req->regval[k]);\n+\n+\treq->num_regs = k;\n+\trc = send_tm_reqval(mbox, req, error);\n+\tif (!rc)\n+\t\ttm_node->flags |= NIX_TM_NODE_ENABLED;\n+\treturn rc;\n+}\n+\n+static int\n+nix_tm_node_parent_update(struct rte_eth_dev *eth_dev,\n+\t\t\t  uint32_t node_id, uint32_t new_parent_id,\n+\t\t\t  uint32_t priority, uint32_t weight,\n+\t\t\t  struct rte_tm_error *error)\n+{\n+\tstruct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);\n+\tstruct otx2_nix_tm_node *tm_node, *sibling;\n+\tstruct otx2_nix_tm_node *new_parent;\n+\tstruct nix_txschq_config *req;\n+\tuint8_t k;\n+\tint rc;\n+\n+\tif (!(dev->tm_flags & NIX_TM_COMMITTED)) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;\n+\t\terror->message = \"hierarchy doesn't exist\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\ttm_node = nix_tm_node_search(dev, node_id, true);\n+\tif (!tm_node) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_NODE_ID;\n+\t\terror->message = \"no such node\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* Parent id valid only for non root nodes */\n+\tif (tm_node->hw_lvl != dev->otx2_tm_root_lvl) {\n+\t\tnew_parent = nix_tm_node_search(dev, new_parent_id, true);\n+\t\tif (!new_parent) {\n+\t\t\terror->type = RTE_TM_ERROR_TYPE_NODE_PARENT_NODE_ID;\n+\t\t\terror->message = \"no such parent node\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\t/* Current support is only for dynamic weight update */\n+\t\tif (tm_node->parent != new_parent ||\n+\t\t    tm_node->priority != priority) {\n+\t\t\terror->type = RTE_TM_ERROR_TYPE_NODE_PARENT_NODE_ID;\n+\t\t\terror->message = \"only weight update supported\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n+\n+\t/* Skip if no change */\n+\tif (tm_node->weight == weight)\n+\t\treturn 0;\n+\n+\ttm_node->weight = weight;\n+\n+\t/* For leaf nodes, SQ CTX needs update */\n+\tif (nix_tm_is_leaf(dev, tm_node->lvl)) {\n+\t\t/* Update SQ quantum data on the fly */\n+\t\trc = nix_sq_sched_data(dev, tm_node, true);\n+\t\tif (rc) {\n+\t\t\terror->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;\n+\t\t\terror->message = \"sq sched data update failed\";\n+\t\t\treturn rc;\n+\t\t}\n+\t} else {\n+\t\t/* XOFF Parent node */\n+\t\treq = otx2_mbox_alloc_msg_nix_txschq_cfg(dev->mbox);\n+\t\treq->lvl = tm_node->parent->hw_lvl;\n+\t\treq->num_regs = prepare_tm_sw_xoff(tm_node->parent, true,\n+\t\t\t\t\t\t   req->reg, req->regval);\n+\t\trc = send_tm_reqval(dev->mbox, req, error);\n+\t\tif (rc)\n+\t\t\treturn rc;\n+\n+\t\t/* XOFF this node and all other siblings */\n+\t\treq = otx2_mbox_alloc_msg_nix_txschq_cfg(dev->mbox);\n+\t\treq->lvl = tm_node->hw_lvl;\n+\n+\t\tk = 0;\n+\t\tTAILQ_FOREACH(sibling, &dev->node_list, node) {\n+\t\t\tif (sibling->parent != tm_node->parent)\n+\t\t\t\tcontinue;\n+\t\t\tk += prepare_tm_sw_xoff(sibling, true, &req->reg[k],\n+\t\t\t\t\t\t&req->regval[k]);\n+\t\t}\n+\t\treq->num_regs = k;\n+\t\trc = send_tm_reqval(dev->mbox, req, error);\n+\t\tif (rc)\n+\t\t\treturn rc;\n+\n+\t\t/* Update new weight for current node */\n+\t\treq = otx2_mbox_alloc_msg_nix_txschq_cfg(dev->mbox);\n+\t\treq->lvl = tm_node->hw_lvl;\n+\t\treq->num_regs = prepare_tm_sched_reg(dev, tm_node,\n+\t\t\t\t\t\t     req->reg, req->regval);\n+\t\trc = send_tm_reqval(dev->mbox, req, error);\n+\t\tif (rc)\n+\t\t\treturn rc;\n+\n+\t\t/* XON this node and all other siblings */\n+\t\treq = otx2_mbox_alloc_msg_nix_txschq_cfg(dev->mbox);\n+\t\treq->lvl = tm_node->hw_lvl;\n+\n+\t\tk = 0;\n+\t\tTAILQ_FOREACH(sibling, &dev->node_list, node) {\n+\t\t\tif (sibling->parent != tm_node->parent)\n+\t\t\t\tcontinue;\n+\t\t\tk += prepare_tm_sw_xoff(sibling, false, &req->reg[k],\n+\t\t\t\t\t\t&req->regval[k]);\n+\t\t}\n+\t\treq->num_regs = k;\n+\t\trc = send_tm_reqval(dev->mbox, req, error);\n+\t\tif (rc)\n+\t\t\treturn rc;\n+\n+\t\t/* XON Parent node */\n+\t\treq = otx2_mbox_alloc_msg_nix_txschq_cfg(dev->mbox);\n+\t\treq->lvl = tm_node->parent->hw_lvl;\n+\t\treq->num_regs = prepare_tm_sw_xoff(tm_node->parent, false,\n+\t\t\t\t\t\t   req->reg, req->regval);\n+\t\trc = send_tm_reqval(dev->mbox, req, error);\n+\t\tif (rc)\n+\t\t\treturn rc;\n+\t}\n+\treturn 0;\n+}\n+\n+static int\n nix_tm_node_stats_read(struct rte_eth_dev *eth_dev, uint32_t node_id,\n \t\t       struct rte_tm_node_stats *stats, uint64_t *stats_mask,\n \t\t       int clear, struct rte_tm_error *error)\n@@ -2324,6 +2512,8 @@ const struct rte_tm_ops otx2_tm_ops = {\n \t.node_resume = nix_tm_node_resume,\n \t.hierarchy_commit = nix_tm_hierarchy_commit,\n \n+\t.node_shaper_update = nix_tm_node_shaper_update,\n+\t.node_parent_update = nix_tm_node_parent_update,\n \t.node_stats_read = nix_tm_node_stats_read,\n };\n \n",
    "prefixes": [
        "08/11"
    ]
}