Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/66580/?format=api
http://patches.dpdk.org/api/patches/66580/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200312111907.31555-6-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-6-ndabilpuram@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200312111907.31555-6-ndabilpuram@marvell.com", "date": "2020-03-12T11:19:01", "name": "[05/11] net/octeontx2: add tm node suspend and resume cb", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "c89ab38728298c6983ca8393af9f3f510f09b8be", "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-6-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/66580/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/66580/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 A012EA056B;\n\tThu, 12 Mar 2020 12:20:42 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4FA5D1C0AF;\n\tThu, 12 Mar 2020 12:19:31 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 56A051C07E\n for <dev@dpdk.org>; Thu, 12 Mar 2020 12:19:29 +0100 (CET)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 02CBFfME017712 for <dev@dpdk.org>; Thu, 12 Mar 2020 04:19:28 -0700", "from sc-exch02.marvell.com ([199.233.58.182])\n by mx0b-0016f401.pphosted.com with ESMTP id 2yqfggs6ex-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:28 -0700", "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com\n (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 12 Mar\n 2020 04:19:26 -0700", "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Thu, 12 Mar 2020 04:19:26 -0700", "from hyd1588t430.marvell.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id D6AF03F7041;\n Thu, 12 Mar 2020 04:19:24 -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=kjIFXMpm5y4VAuplX02ma+iAhuwevvoTGY3TvazB3a0=;\n b=LP9IoG3b2dIycEfpL9onWNRa+yqUU/gzgsDLjhJFvmn52GV6HvrqpBd4DiCvIIAffWgo\n Xbp4fwZISXoxUquLm4o1/7NGNgec52GYFgbxxN5yQQaYg4B98mamvzqDZ1W1+03lQs8f\n MvAsJHvHDQGnjM2R463JUh9vSBuIQ6qEjAcyCa71hCZdY9Q+TdIT7TcIO6MjS4S2YKzV\n xtvHOJ9Mi6C+BdvhDPWdAq4ZwWP5AFITonkBnuXArrt5DJpha60dR65mqJN0jQBd3CI5\n pTJcVoR4lvW0zfFmRxczlgLpHKH1L3jrqWGhNK58Gy4pgv1NhHEhzp8osOftSlNrLFpl Lw==", "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:01 +0530", "Message-ID": "<20200312111907.31555-6-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 05/11] net/octeontx2: add tm node suspend and\n\tresume 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": "From: Krzysztof Kanas <kkanas@marvell.com>\n\nAdd TM support to suspend and resume nodes post hierarchy\ncommit.\n\nSigned-off-by: Krzysztof Kanas <kkanas@marvell.com>\nSigned-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\n---\n drivers/net/octeontx2/otx2_tm.c | 81 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 81 insertions(+)", "diff": "diff --git a/drivers/net/octeontx2/otx2_tm.c b/drivers/net/octeontx2/otx2_tm.c\nindex 579265c..175d1d5 100644\n--- a/drivers/net/octeontx2/otx2_tm.c\n+++ b/drivers/net/octeontx2/otx2_tm.c\n@@ -1534,6 +1534,28 @@ nix_tm_alloc_resources(struct rte_eth_dev *eth_dev, bool xmit_enable)\n \treturn 0;\n }\n \n+static int\n+send_tm_reqval(struct otx2_mbox *mbox,\n+\t struct nix_txschq_config *req,\n+\t struct rte_tm_error *error)\n+{\n+\tint rc;\n+\n+\tif (!req->num_regs ||\n+\t req->num_regs > MAX_REGS_PER_MBOX_MSG) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;\n+\t\terror->message = \"invalid config\";\n+\t\treturn -EIO;\n+\t}\n+\n+\trc = otx2_mbox_process(mbox);\n+\tif (rc) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;\n+\t\terror->message = \"unexpected fatal error\";\n+\t}\n+\treturn rc;\n+}\n+\n static uint16_t\n nix_tm_lvl2nix(struct otx2_eth_dev *dev, uint32_t lvl)\n {\n@@ -1800,9 +1822,68 @@ nix_tm_node_delete(struct rte_eth_dev *eth_dev, uint32_t node_id,\n \treturn 0;\n }\n \n+static int\n+nix_tm_node_suspend_resume(struct rte_eth_dev *eth_dev, uint32_t node_id,\n+\t\t\t struct rte_tm_error *error, bool suspend)\n+{\n+\tstruct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);\n+\tstruct otx2_mbox *mbox = dev->mbox;\n+\tstruct otx2_nix_tm_node *tm_node;\n+\tstruct nix_txschq_config *req;\n+\tuint16_t flags;\n+\tint rc;\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+\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+\tflags = tm_node->flags;\n+\tflags = suspend ? (flags & ~NIX_TM_NODE_ENABLED) :\n+\t\t(flags | NIX_TM_NODE_ENABLED);\n+\n+\tif (tm_node->flags == flags)\n+\t\treturn 0;\n+\n+\t/* send mbox for state change */\n+\treq = otx2_mbox_alloc_msg_nix_txschq_cfg(mbox);\n+\n+\treq->lvl = tm_node->hw_lvl;\n+\treq->num_regs =\tprepare_tm_sw_xoff(tm_node, suspend,\n+\t\t\t\t\t req->reg, req->regval);\n+\trc = send_tm_reqval(mbox, req, error);\n+\tif (!rc)\n+\t\ttm_node->flags = flags;\n+\treturn rc;\n+}\n+\n+static int\n+nix_tm_node_suspend(struct rte_eth_dev *eth_dev, uint32_t node_id,\n+\t\t struct rte_tm_error *error)\n+{\n+\treturn nix_tm_node_suspend_resume(eth_dev, node_id, error, true);\n+}\n+\n+static int\n+nix_tm_node_resume(struct rte_eth_dev *eth_dev, uint32_t node_id,\n+\t\t struct rte_tm_error *error)\n+{\n+\treturn nix_tm_node_suspend_resume(eth_dev, node_id, error, false);\n+}\n+\n const struct rte_tm_ops otx2_tm_ops = {\n \t.node_add = nix_tm_node_add,\n \t.node_delete = nix_tm_node_delete,\n+\t.node_suspend = nix_tm_node_suspend,\n+\t.node_resume = nix_tm_node_resume,\n };\n \n static int\n", "prefixes": [ "05/11" ] }{ "id": 66580, "url": "