Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/85434/?format=api
http://patches.dpdk.org/api/patches/85434/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201218093702.3651867-28-jiawenwu@trustnetic.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": "<20201218093702.3651867-28-jiawenwu@trustnetic.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201218093702.3651867-28-jiawenwu@trustnetic.com", "date": "2020-12-18T09:36:56", "name": "[v3,27/33] net/txgbe: add TM hierarchy commit", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1e70254a71ab940ee4b969ecb4d03cf3785d3302", "submitter": { "id": 1932, "url": "http://patches.dpdk.org/api/people/1932/?format=api", "name": "Jiawen Wu", "email": "jiawenwu@trustnetic.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201218093702.3651867-28-jiawenwu@trustnetic.com/mbox/", "series": [ { "id": 14363, "url": "http://patches.dpdk.org/api/series/14363/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14363", "date": "2020-12-18T09:36:30", "name": "net: add txgbe PMD part 2", "version": 3, "mbox": "http://patches.dpdk.org/series/14363/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/85434/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/85434/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 496CBA09F6;\n\tFri, 18 Dec 2020 10:43:22 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D2D79CCA5;\n\tFri, 18 Dec 2020 10:35:20 +0100 (CET)", "from smtpbgsg2.qq.com (smtpbgsg2.qq.com [54.254.200.128])\n by dpdk.org (Postfix) with ESMTP id 37A8ACBDC\n for <dev@dpdk.org>; Fri, 18 Dec 2020 10:35:13 +0100 (CET)", "from localhost.localdomain.com (unknown [183.129.236.74])\n by esmtp10.qq.com (ESMTP) with\n id ; Fri, 18 Dec 2020 17:35:07 +0800 (CST)" ], "X-QQ-mid": "bizesmtp28t1608284107t9oqomi6", "X-QQ-SSF": "01400000002000C0D000B00A0000000", "X-QQ-FEAT": "jE/Jgvobnf9JCE3RwROcskiHHRo39ESSytpJCXNahegqf+97jfE8Nv7KfAFzo\n o8WdtwSu0eQybynW7CEG3lCW33xutJaUdKPX8D6LEcWdJcvHA9hQVF2bhnX7qhW7e8bpiRC\n ACs6PBTLdN4ma+Tm9ryvoTOEyz2sOsXvO6OZzFCTWcYrjVS/zSC4ETf1kca8ABC4l6b4dhy\n NSCHe0cW4E6MMblJGhfNx8v8vmIciZ/7uxkNWIX7fquzkXL9txsz2wpaF0Nz2+m+EWYLmEg\n IRoJ/S77hfykyOhURZxR2AucROEvjEh33lSS64KPbGOpn1y989rD9I/IA+0f6O/xWvcFJxj\n nPA56KDs+svvWJ40hodQxSpJ69HLQ==", "X-QQ-GoodBg": "2", "From": "Jiawen Wu <jiawenwu@trustnetic.com>", "To": "dev@dpdk.org", "Cc": "Jiawen Wu <jiawenwu@trustnetic.com>", "Date": "Fri, 18 Dec 2020 17:36:56 +0800", "Message-Id": "<20201218093702.3651867-28-jiawenwu@trustnetic.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20201218093702.3651867-1-jiawenwu@trustnetic.com>", "References": "<20201218093702.3651867-1-jiawenwu@trustnetic.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-QQ-SENDSIZE": "520", "Feedback-ID": "bizesmtp:trustnetic.com:qybgforeign:qybgforeign6", "X-QQ-Bgrelay": "1", "Subject": "[dpdk-dev] [PATCH v3 27/33] net/txgbe: add TM hierarchy commit", "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 traffic manager hierarchy commit.\n\nSigned-off-by: Jiawen Wu <jiawenwu@trustnetic.com>\n---\n drivers/net/txgbe/txgbe_tm.c | 70 ++++++++++++++++++++++++++++++++++++\n 1 file changed, 70 insertions(+)", "diff": "diff --git a/drivers/net/txgbe/txgbe_tm.c b/drivers/net/txgbe/txgbe_tm.c\nindex 6dd593e54..b8edd78bf 100644\n--- a/drivers/net/txgbe/txgbe_tm.c\n+++ b/drivers/net/txgbe/txgbe_tm.c\n@@ -33,6 +33,9 @@ static int txgbe_node_capabilities_get(struct rte_eth_dev *dev,\n \t\t\t\t uint32_t node_id,\n \t\t\t\t struct rte_tm_node_capabilities *cap,\n \t\t\t\t struct rte_tm_error *error);\n+static int txgbe_hierarchy_commit(struct rte_eth_dev *dev,\n+\t\t\t\t int clear_on_fail,\n+\t\t\t\t struct rte_tm_error *error);\n \n const struct rte_tm_ops txgbe_tm_ops = {\n \t.capabilities_get = txgbe_tm_capabilities_get,\n@@ -43,6 +46,7 @@ const struct rte_tm_ops txgbe_tm_ops = {\n \t.node_type_get = txgbe_node_type_get,\n \t.level_capabilities_get = txgbe_level_capabilities_get,\n \t.node_capabilities_get = txgbe_node_capabilities_get,\n+\t.hierarchy_commit = txgbe_hierarchy_commit,\n };\n \n int\n@@ -950,3 +954,69 @@ txgbe_node_capabilities_get(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+static int\n+txgbe_hierarchy_commit(struct rte_eth_dev *dev,\n+\t\t int clear_on_fail,\n+\t\t struct rte_tm_error *error)\n+{\n+\tstruct txgbe_tm_conf *tm_conf = TXGBE_DEV_TM_CONF(dev);\n+\tstruct txgbe_tm_node *tm_node;\n+\tuint64_t bw;\n+\tint ret;\n+\n+\tif (!error)\n+\t\treturn -EINVAL;\n+\n+\t/* check the setting */\n+\tif (!tm_conf->root)\n+\t\tgoto done;\n+\n+\t/* not support port max bandwidth yet */\n+\tif (tm_conf->root->shaper_profile &&\n+\t tm_conf->root->shaper_profile->profile.peak.rate) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE;\n+\t\terror->message = \"no port max bandwidth\";\n+\t\tgoto fail_clear;\n+\t}\n+\n+\t/* HW not support TC max bandwidth */\n+\tTAILQ_FOREACH(tm_node, &tm_conf->tc_list, node) {\n+\t\tif (tm_node->shaper_profile &&\n+\t\t tm_node->shaper_profile->profile.peak.rate) {\n+\t\t\terror->type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE;\n+\t\t\terror->message = \"no TC max bandwidth\";\n+\t\t\tgoto fail_clear;\n+\t\t}\n+\t}\n+\n+\t/* queue max bandwidth */\n+\tTAILQ_FOREACH(tm_node, &tm_conf->queue_list, node) {\n+\t\tif (tm_node->shaper_profile)\n+\t\t\tbw = tm_node->shaper_profile->profile.peak.rate;\n+\t\telse\n+\t\t\tbw = 0;\n+\t\tif (bw) {\n+\t\t\t/* interpret Bps to Mbps */\n+\t\t\tbw = bw * 8 / 1000 / 1000;\n+\t\t\tret = txgbe_set_queue_rate_limit(dev, tm_node->no, bw);\n+\t\t\tif (ret) {\n+\t\t\t\terror->type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE;\n+\t\t\t\terror->message =\n+\t\t\t\t\t\"failed to set queue max bandwidth\";\n+\t\t\t\tgoto fail_clear;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+done:\n+\ttm_conf->committed = true;\n+\treturn 0;\n+\n+fail_clear:\n+\t/* clear all the traffic manager configuration */\n+\tif (clear_on_fail) {\n+\t\ttxgbe_tm_conf_uninit(dev);\n+\t\ttxgbe_tm_conf_init(dev);\n+\t}\n+\treturn -EINVAL;\n+}\n", "prefixes": [ "v3", "27/33" ] }{ "id": 85434, "url": "