get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99392,
    "url": "http://patches.dpdk.org/api/patches/99392/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1632291108-28780-9-git-send-email-skoteshwar@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": "<1632291108-28780-9-git-send-email-skoteshwar@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1632291108-28780-9-git-send-email-skoteshwar@marvell.com",
    "date": "2021-09-22T06:11:48",
    "name": "[v3,8/8] net/cnxk: TM shaper and node operations",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f96b5761282fdf835c3f35b846f1cd12faab0e75",
    "submitter": {
        "id": 2009,
        "url": "http://patches.dpdk.org/api/people/2009/?format=api",
        "name": "Satha Koteswara Rao Kottidi",
        "email": "skoteshwar@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/1632291108-28780-9-git-send-email-skoteshwar@marvell.com/mbox/",
    "series": [
        {
            "id": 19067,
            "url": "http://patches.dpdk.org/api/series/19067/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19067",
            "date": "2021-09-22T06:11:40",
            "name": "Add TM Support for CN9K and CN10K",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/19067/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/99392/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/99392/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 94B35A0C45;\n\tWed, 22 Sep 2021 08:12:48 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5E8E5411AE;\n\tWed, 22 Sep 2021 08:12:35 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id B27314118D\n for <dev@dpdk.org>; Wed, 22 Sep 2021 08:12:27 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18LLFpF3022454\n for <dev@dpdk.org>; Tue, 21 Sep 2021 23:12:27 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 3b7q5dhe7g-6\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 21 Sep 2021 23:12:26 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Tue, 21 Sep 2021 23:12:18 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Tue, 21 Sep 2021 23:12:18 -0700",
            "from cavium.marvell.com (cavium.marvell.com [10.28.34.244])\n by maili.marvell.com (Postfix) with ESMTP id A30C33F7079;\n Tue, 21 Sep 2021 23:12:16 -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=pfpt0220; bh=QfAu/MJ3rAXd3dtg0nOb2wBlS214tcczaP82bl4owv8=;\n b=gf3KD/kJpw9E1wKUTsRDRC1Mm3UoI2lpcfwigsVJemow9QMk+/AP/nAn584yq6yAIM/n\n hWaTi1SrR0FbG4HELXaVB7LXv96Lo2tLQiUVB8VF8h7SGC0FNTKglpomwM/pYNTYzPUS\n jdU0m8pkzOBBI9QO1TtfBthPOd1yNQAIGJE7nFreVAIsq8+pT9Ma7lRTXVvzlDNHZosO\n kg31FOeLdnqspqnyUcAV8hKhBb5/ZcTs+cKxuuiISl3yuMANIH97PgWc33vEbsXg3ECc\n n1SCdAAXyJSAMuC1cg/30J7nx1YLONKXC1PbsQB/2SBWSRyX3+B5WtfYd5P2iFLCNIIx zg==",
        "From": "<skoteshwar@marvell.com>",
        "To": "Nithin Dabilpuram <ndabilpuram@marvell.com>, Kiran Kumar K\n <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>, Satha Rao\n <skoteshwar@marvell.com>",
        "CC": "<dev@dpdk.org>",
        "Date": "Wed, 22 Sep 2021 02:11:48 -0400",
        "Message-ID": "<1632291108-28780-9-git-send-email-skoteshwar@marvell.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1632291108-28780-1-git-send-email-skoteshwar@marvell.com>",
        "References": "<1630516236-10526-1-git-send-email-skoteshwar@marvell.com>\n <1632291108-28780-1-git-send-email-skoteshwar@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "TJFhycff7AEFt1othSrwPXC0s5clfN5Q",
        "X-Proofpoint-ORIG-GUID": "TJFhycff7AEFt1othSrwPXC0s5clfN5Q",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475\n definitions=2021-09-22_01,2021-09-20_01,2020-04-07_01",
        "Subject": "[dpdk-dev] [PATCH v3 8/8] net/cnxk: TM shaper and node operations",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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: Satha Rao <skoteshwar@marvell.com>\n\nImplemented TM node, shaper profile, hierarchy_commit and\nstatistic operations.\n\nSigned-off-by: Satha Rao <skoteshwar@marvell.com>\nAcked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\n---\n doc/guides/rel_notes/release_21_11.rst |   1 +\n drivers/net/cnxk/cnxk_tm.c             | 353 +++++++++++++++++++++++++\n drivers/net/cnxk/cnxk_tm.h             |   5 +\n 3 files changed, 359 insertions(+)",
    "diff": "diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst\nindex b44c077fd6..7e732d003b 100644\n--- a/doc/guides/rel_notes/release_21_11.rst\n+++ b/doc/guides/rel_notes/release_21_11.rst\n@@ -65,6 +65,7 @@ New Features\n * **Updated Marvell cnxk ethdev driver.**\n \n   * Added rte_flow support for dual VLAN insert and strip actions\n+  * Added rte_tm support\n \n * **Updated Marvell cnxk crypto PMD.**\n \ndiff --git a/drivers/net/cnxk/cnxk_tm.c b/drivers/net/cnxk/cnxk_tm.c\nindex 87fd8bec92..9015a452f8 100644\n--- a/drivers/net/cnxk/cnxk_tm.c\n+++ b/drivers/net/cnxk/cnxk_tm.c\n@@ -259,11 +259,364 @@ cnxk_nix_tm_node_capa_get(struct rte_eth_dev *eth_dev, uint32_t node_id,\n \treturn 0;\n }\n \n+static int\n+cnxk_nix_tm_shaper_profile_add(struct rte_eth_dev *eth_dev, uint32_t id,\n+\t\t\t       struct rte_tm_shaper_params *params,\n+\t\t\t       struct rte_tm_error *error)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tstruct cnxk_nix_tm_shaper_profile *profile;\n+\tstruct roc_nix *nix = &dev->nix;\n+\tint rc;\n+\n+\tif (roc_nix_tm_shaper_profile_get(nix, id)) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_ID;\n+\t\terror->message = \"shaper profile ID exist\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tprofile = rte_zmalloc(\"cnxk_nix_tm_shaper_profile\",\n+\t\t\t      sizeof(struct cnxk_nix_tm_shaper_profile), 0);\n+\tif (!profile)\n+\t\treturn -ENOMEM;\n+\tprofile->profile.id = id;\n+\tprofile->profile.commit_rate = params->committed.rate;\n+\tprofile->profile.peak_rate = params->peak.rate;\n+\tprofile->profile.commit_sz = params->committed.size;\n+\tprofile->profile.peak_sz = params->peak.size;\n+\t/* If Byte mode, then convert to bps */\n+\tif (!params->packet_mode) {\n+\t\tprofile->profile.commit_rate *= 8;\n+\t\tprofile->profile.peak_rate *= 8;\n+\t\tprofile->profile.commit_sz *= 8;\n+\t\tprofile->profile.peak_sz *= 8;\n+\t}\n+\tprofile->profile.pkt_len_adj = params->pkt_length_adjust;\n+\tprofile->profile.pkt_mode = params->packet_mode;\n+\tprofile->profile.free_fn = rte_free;\n+\trte_memcpy(&profile->params, params,\n+\t\t   sizeof(struct rte_tm_shaper_params));\n+\n+\trc = roc_nix_tm_shaper_profile_add(nix, &profile->profile);\n+\n+\t/* fill error information based on return value */\n+\tif (rc) {\n+\t\terror->type = roc_nix_tm_err_to_rte_err(rc);\n+\t\terror->message = roc_error_msg_get(rc);\n+\t}\n+\n+\treturn rc;\n+}\n+\n+static int\n+cnxk_nix_tm_shaper_profile_delete(struct rte_eth_dev *eth_dev,\n+\t\t\t\t  uint32_t profile_id,\n+\t\t\t\t  struct rte_tm_error *error)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tstruct roc_nix *nix = &dev->nix;\n+\tint rc;\n+\n+\trc = roc_nix_tm_shaper_profile_delete(nix, profile_id);\n+\tif (rc) {\n+\t\terror->type = roc_nix_tm_err_to_rte_err(rc);\n+\t\terror->message = roc_error_msg_get(rc);\n+\t}\n+\n+\treturn rc;\n+}\n+\n+static int\n+cnxk_nix_tm_node_add(struct rte_eth_dev *eth_dev, uint32_t node_id,\n+\t\t     uint32_t parent_node_id, uint32_t priority,\n+\t\t     uint32_t weight, uint32_t lvl,\n+\t\t     struct rte_tm_node_params *params,\n+\t\t     struct rte_tm_error *error)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tstruct roc_nix_tm_shaper_profile *profile;\n+\tstruct roc_nix_tm_node *parent_node;\n+\tstruct roc_nix *nix = &dev->nix;\n+\tstruct cnxk_nix_tm_node *node;\n+\tint rc;\n+\n+\t/* we don't support dynamic updates */\n+\tif (roc_nix_tm_is_user_hierarchy_enabled(nix)) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_CAPABILITIES;\n+\t\terror->message = \"dynamic update not supported\";\n+\t\treturn -EIO;\n+\t}\n+\n+\tparent_node = roc_nix_tm_node_get(nix, parent_node_id);\n+\t/* find the right level */\n+\tif (lvl == RTE_TM_NODE_LEVEL_ID_ANY) {\n+\t\tif (parent_node_id == RTE_TM_NODE_ID_NULL) {\n+\t\t\tlvl = ROC_TM_LVL_ROOT;\n+\t\t} else if (parent_node) {\n+\t\t\tlvl = parent_node->lvl + 1;\n+\t\t} else {\n+\t\t\t/* Neither proper parent nor proper level id given */\n+\t\t\terror->type = RTE_TM_ERROR_TYPE_NODE_PARENT_NODE_ID;\n+\t\t\terror->message = \"invalid parent node id\";\n+\t\t\treturn -ERANGE;\n+\t\t}\n+\t}\n+\n+\tnode = rte_zmalloc(\"cnxk_nix_tm_node\", sizeof(struct cnxk_nix_tm_node),\n+\t\t\t   0);\n+\tif (!node)\n+\t\treturn -ENOMEM;\n+\n+\trte_memcpy(&node->params, params, sizeof(struct rte_tm_node_params));\n+\n+\tnode->nix_node.id = node_id;\n+\tnode->nix_node.parent_id = parent_node_id;\n+\tnode->nix_node.priority = priority;\n+\tnode->nix_node.weight = weight;\n+\tnode->nix_node.lvl = lvl;\n+\tnode->nix_node.shaper_profile_id = params->shaper_profile_id;\n+\n+\tprofile = roc_nix_tm_shaper_profile_get(nix, params->shaper_profile_id);\n+\t/* Packet mode */\n+\tif (!roc_nix_tm_lvl_is_leaf(nix, lvl) &&\n+\t    ((profile && profile->pkt_mode) ||\n+\t     (params->nonleaf.wfq_weight_mode &&\n+\t      params->nonleaf.n_sp_priorities &&\n+\t      !params->nonleaf.wfq_weight_mode[0])))\n+\t\tnode->nix_node.pkt_mode = 1;\n+\n+\trc = roc_nix_tm_node_add(nix, &node->nix_node);\n+\tif (rc < 0) {\n+\t\terror->type = roc_nix_tm_err_to_rte_err(rc);\n+\t\terror->message = roc_error_msg_get(rc);\n+\t\treturn rc;\n+\t}\n+\terror->type = RTE_TM_ERROR_TYPE_NONE;\n+\troc_nix_tm_shaper_default_red_algo(&node->nix_node, profile);\n+\n+\treturn 0;\n+}\n+\n+static int\n+cnxk_nix_tm_node_delete(struct rte_eth_dev *eth_dev, uint32_t node_id,\n+\t\t\tstruct rte_tm_error *error)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tstruct roc_nix *nix = &dev->nix;\n+\tstruct cnxk_nix_tm_node *node;\n+\tint rc;\n+\n+\t/* we don't support dynamic updates yet */\n+\tif (roc_nix_tm_is_user_hierarchy_enabled(nix)) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_CAPABILITIES;\n+\t\terror->message = \"hierarchy exists\";\n+\t\treturn -EIO;\n+\t}\n+\n+\tif (node_id == RTE_TM_NODE_ID_NULL) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_NODE_ID;\n+\t\terror->message = \"invalid node id\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tnode = (struct cnxk_nix_tm_node *)roc_nix_tm_node_get(nix, node_id);\n+\n+\trc = roc_nix_tm_node_delete(nix, node_id, 0);\n+\tif (rc) {\n+\t\terror->type = roc_nix_tm_err_to_rte_err(rc);\n+\t\terror->message = roc_error_msg_get(rc);\n+\t} else {\n+\t\trte_free(node);\n+\t}\n+\n+\treturn rc;\n+}\n+\n+static int\n+cnxk_nix_tm_node_suspend(struct rte_eth_dev *eth_dev, uint32_t node_id,\n+\t\t\t struct rte_tm_error *error)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tint rc;\n+\n+\trc = roc_nix_tm_node_suspend_resume(&dev->nix, node_id, true);\n+\tif (rc) {\n+\t\terror->type = roc_nix_tm_err_to_rte_err(rc);\n+\t\terror->message = roc_error_msg_get(rc);\n+\t}\n+\n+\treturn rc;\n+}\n+\n+static int\n+cnxk_nix_tm_node_resume(struct rte_eth_dev *eth_dev, uint32_t node_id,\n+\t\t\tstruct rte_tm_error *error)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tint rc;\n+\n+\trc = roc_nix_tm_node_suspend_resume(&dev->nix, node_id, false);\n+\tif (rc) {\n+\t\terror->type = roc_nix_tm_err_to_rte_err(rc);\n+\t\terror->message = roc_error_msg_get(rc);\n+\t}\n+\n+\treturn rc;\n+}\n+\n+static int\n+cnxk_nix_tm_hierarchy_commit(struct rte_eth_dev *eth_dev,\n+\t\t\t     int clear_on_fail __rte_unused,\n+\t\t\t     struct rte_tm_error *error)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tstruct roc_nix *nix = &dev->nix;\n+\tint rc;\n+\n+\tif (roc_nix_tm_is_user_hierarchy_enabled(nix)) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;\n+\t\terror->message = \"hierarchy exists\";\n+\t\treturn -EIO;\n+\t}\n+\n+\tif (roc_nix_tm_leaf_cnt(nix) < dev->nb_txq) {\n+\t\terror->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;\n+\t\terror->message = \"incomplete hierarchy\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\trc = roc_nix_tm_hierarchy_disable(nix);\n+\tif (rc) {\n+\t\terror->type = roc_nix_tm_err_to_rte_err(rc);\n+\t\terror->message = roc_error_msg_get(rc);\n+\t\treturn -EIO;\n+\t}\n+\n+\trc = roc_nix_tm_hierarchy_enable(nix, ROC_NIX_TM_USER, true);\n+\tif (rc) {\n+\t\terror->type = roc_nix_tm_err_to_rte_err(rc);\n+\t\terror->message = roc_error_msg_get(rc);\n+\t\treturn -EIO;\n+\t}\n+\terror->type = RTE_TM_ERROR_TYPE_NONE;\n+\n+\treturn 0;\n+}\n+\n+static int\n+cnxk_nix_tm_node_shaper_update(struct rte_eth_dev *eth_dev, uint32_t node_id,\n+\t\t\t       uint32_t profile_id, struct rte_tm_error *error)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tstruct roc_nix_tm_shaper_profile *profile;\n+\tstruct roc_nix *nix = &dev->nix;\n+\tstruct roc_nix_tm_node *node;\n+\tint rc;\n+\n+\trc = roc_nix_tm_node_shaper_update(nix, node_id, profile_id, false);\n+\tif (rc) {\n+\t\terror->type = roc_nix_tm_err_to_rte_err(rc);\n+\t\terror->message = roc_error_msg_get(rc);\n+\t\treturn -EINVAL;\n+\t}\n+\tnode = roc_nix_tm_node_get(nix, node_id);\n+\tif (!node)\n+\t\treturn -EINVAL;\n+\n+\tprofile = roc_nix_tm_shaper_profile_get(nix, profile_id);\n+\troc_nix_tm_shaper_default_red_algo(node, profile);\n+\n+\treturn 0;\n+}\n+\n+static int\n+cnxk_nix_tm_node_parent_update(struct rte_eth_dev *eth_dev, uint32_t node_id,\n+\t\t\t       uint32_t new_parent_id, uint32_t priority,\n+\t\t\t       uint32_t weight, struct rte_tm_error *error)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tstruct roc_nix *nix = &dev->nix;\n+\tint rc;\n+\n+\trc = roc_nix_tm_node_parent_update(nix, node_id, new_parent_id,\n+\t\t\t\t\t   priority, weight);\n+\tif (rc) {\n+\t\terror->type = roc_nix_tm_err_to_rte_err(rc);\n+\t\terror->message = roc_error_msg_get(rc);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n+cnxk_nix_tm_node_stats_read(struct rte_eth_dev *eth_dev, uint32_t node_id,\n+\t\t\t    struct rte_tm_node_stats *stats,\n+\t\t\t    uint64_t *stats_mask, int clear,\n+\t\t\t    struct rte_tm_error *error)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tstruct roc_nix_tm_node_stats nix_tm_stats;\n+\tstruct roc_nix *nix = &dev->nix;\n+\tstruct roc_nix_tm_node *node;\n+\tint rc;\n+\n+\tnode = roc_nix_tm_node_get(nix, node_id);\n+\tif (!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 (roc_nix_tm_lvl_is_leaf(nix, node->lvl)) {\n+\t\tstruct roc_nix_stats_queue qstats;\n+\n+\t\trc = roc_nix_stats_queue_get(nix, node->id, 0, &qstats);\n+\t\tif (!rc) {\n+\t\t\tstats->n_pkts = qstats.tx_pkts;\n+\t\t\tstats->n_bytes = qstats.tx_octs;\n+\t\t\t*stats_mask =\n+\t\t\t\tRTE_TM_STATS_N_PKTS | RTE_TM_STATS_N_BYTES;\n+\t\t}\n+\t\tgoto exit;\n+\t}\n+\n+\trc = roc_nix_tm_node_stats_get(nix, node_id, clear, &nix_tm_stats);\n+\tif (!rc) {\n+\t\tstats->leaf.n_pkts_dropped[RTE_COLOR_RED] =\n+\t\t\tnix_tm_stats.stats[ROC_NIX_TM_NODE_PKTS_DROPPED];\n+\t\tstats->leaf.n_bytes_dropped[RTE_COLOR_RED] =\n+\t\t\tnix_tm_stats.stats[ROC_NIX_TM_NODE_BYTES_DROPPED];\n+\t\t*stats_mask = RTE_TM_STATS_N_PKTS_RED_DROPPED |\n+\t\t\t      RTE_TM_STATS_N_BYTES_RED_DROPPED;\n+\t}\n+\n+exit:\n+\tif (rc) {\n+\t\terror->type = roc_nix_tm_err_to_rte_err(rc);\n+\t\terror->message = roc_error_msg_get(rc);\n+\t}\n+\treturn rc;\n+}\n+\n const struct rte_tm_ops cnxk_tm_ops = {\n \t.node_type_get = cnxk_nix_tm_node_type_get,\n \t.capabilities_get = cnxk_nix_tm_capa_get,\n \t.level_capabilities_get = cnxk_nix_tm_level_capa_get,\n \t.node_capabilities_get = cnxk_nix_tm_node_capa_get,\n+\n+\t.shaper_profile_add = cnxk_nix_tm_shaper_profile_add,\n+\t.shaper_profile_delete = cnxk_nix_tm_shaper_profile_delete,\n+\n+\t.node_add = cnxk_nix_tm_node_add,\n+\t.node_delete = cnxk_nix_tm_node_delete,\n+\t.node_suspend = cnxk_nix_tm_node_suspend,\n+\t.node_resume = cnxk_nix_tm_node_resume,\n+\t.hierarchy_commit = cnxk_nix_tm_hierarchy_commit,\n+\n+\t.node_shaper_update = cnxk_nix_tm_node_shaper_update,\n+\t.node_parent_update = cnxk_nix_tm_node_parent_update,\n+\t.node_stats_read = cnxk_nix_tm_node_stats_read,\n };\n \n int\ndiff --git a/drivers/net/cnxk/cnxk_tm.h b/drivers/net/cnxk/cnxk_tm.h\nindex f7470c2634..419c551bcb 100644\n--- a/drivers/net/cnxk/cnxk_tm.h\n+++ b/drivers/net/cnxk/cnxk_tm.h\n@@ -15,4 +15,9 @@ struct cnxk_nix_tm_node {\n \tstruct rte_tm_node_params params;\n };\n \n+struct cnxk_nix_tm_shaper_profile {\n+\tstruct roc_nix_tm_shaper_profile profile;\n+\tstruct rte_tm_shaper_params params; /* Rate in bits/sec */\n+};\n+\n #endif /* __CNXK_TM_H__ */\n",
    "prefixes": [
        "v3",
        "8/8"
    ]
}