get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99393,
    "url": "http://patches.dpdk.org/api/patches/99393/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1632291108-28780-6-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-6-git-send-email-skoteshwar@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1632291108-28780-6-git-send-email-skoteshwar@marvell.com",
    "date": "2021-09-22T06:11:45",
    "name": "[v3,5/8] common/cnxk: support TM error type get",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e0667366b595001d6a667ec863c118128d0cd3db",
    "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-6-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/99393/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/99393/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 712D1A0C45;\n\tWed, 22 Sep 2021 08:12:55 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BB6E5411B5;\n\tWed, 22 Sep 2021 08:12:36 +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 33CB141184\n for <dev@dpdk.org>; Wed, 22 Sep 2021 08:12:29 +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\n 18LLFpF0022454;\n Tue, 21 Sep 2021 23:12:23 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 3b7q5dhe7g-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Tue, 21 Sep 2021 23:12:23 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) 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:10 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Tue, 21 Sep 2021 23:12:10 -0700",
            "from cavium.marvell.com (cavium.marvell.com [10.28.34.244])\n by maili.marvell.com (Postfix) with ESMTP id 0C3973F7078;\n Tue, 21 Sep 2021 23:12:08 -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=hEl5MqErsPmpC9ACqbOTc1//5alCbPwdcPif4NZLfA4=;\n b=fotvsnd2FO4l+YBEID0BbjimZKhdIKtFy0xxGB3kpxnVmO088E5HsvbqXWusOMauH1dn\n 3n9wlHxaKnDoC74btgTlfdM1K6KoSdo86+Wd60c0dDlMv9eXfu0trzPa1s1wJ57O4qmp\n +ah4rpGexbfDVjcJV6WHcx4m0PvgOR18cp/UyL66wUzII4TER4ZhiLYO+JwnzxPceWuy\n gnMfmt1RaPQ8shl6GZ1VlM+mt2uv9Ep0RQ6aWJm3sdzMaa8xfa89qkTDKiITddA7BgN0\n OO2t0f0mZTM5U9juTc88G9QA7ykY1fGA7B4+4xm1F5qjqI1glnaeiw29QVizYthxJxFz Cg==",
        "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>, Ray Kinsella <mdr@ashroe.eu>",
        "CC": "<dev@dpdk.org>",
        "Date": "Wed, 22 Sep 2021 02:11:45 -0400",
        "Message-ID": "<1632291108-28780-6-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": "ngM-k3lAQj441Q6l8yJP6c1DJ_Siefus",
        "X-Proofpoint-ORIG-GUID": "ngM-k3lAQj441Q6l8yJP6c1DJ_Siefus",
        "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 5/8] common/cnxk: support TM error type get",
        "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\nDifferent TM handlers returns various platform specific errors,\nthis patch introduces new API to convert these internal error\ntypes to RTE_TM* error types.\nAlso updated error message API with missed TM error types.\n\nSigned-off-by: Satha Rao <skoteshwar@marvell.com>\nAcked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\n---\n drivers/common/cnxk/cnxk_utils.c | 68 ++++++++++++++++++++++++++++++++\n drivers/common/cnxk/cnxk_utils.h | 11 ++++++\n drivers/common/cnxk/meson.build  |  5 +++\n drivers/common/cnxk/roc_utils.c  |  6 +++\n drivers/common/cnxk/version.map  |  1 +\n 5 files changed, 91 insertions(+)\n create mode 100644 drivers/common/cnxk/cnxk_utils.c\n create mode 100644 drivers/common/cnxk/cnxk_utils.h",
    "diff": "diff --git a/drivers/common/cnxk/cnxk_utils.c b/drivers/common/cnxk/cnxk_utils.c\nnew file mode 100644\nindex 0000000000..4e56adc659\n--- /dev/null\n+++ b/drivers/common/cnxk/cnxk_utils.c\n@@ -0,0 +1,68 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2021 Marvell.\n+ */\n+#include <rte_log.h>\n+#include <rte_tm_driver.h>\n+\n+#include \"roc_api.h\"\n+#include \"roc_priv.h\"\n+\n+#include \"cnxk_utils.h\"\n+\n+int\n+roc_nix_tm_err_to_rte_err(int errorcode)\n+{\n+\tint err_type;\n+\n+\tswitch (errorcode) {\n+\tcase NIX_ERR_TM_SHAPER_PKT_LEN_ADJUST:\n+\t\terr_type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PKT_ADJUST_LEN;\n+\t\tbreak;\n+\tcase NIX_ERR_TM_INVALID_COMMIT_SZ:\n+\t\terr_type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_COMMITTED_SIZE;\n+\t\tbreak;\n+\tcase NIX_ERR_TM_INVALID_COMMIT_RATE:\n+\t\terr_type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_COMMITTED_RATE;\n+\t\tbreak;\n+\tcase NIX_ERR_TM_INVALID_PEAK_SZ:\n+\t\terr_type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PEAK_SIZE;\n+\t\tbreak;\n+\tcase NIX_ERR_TM_INVALID_PEAK_RATE:\n+\t\terr_type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PEAK_RATE;\n+\t\tbreak;\n+\tcase NIX_ERR_TM_INVALID_SHAPER_PROFILE:\n+\t\terr_type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_ID;\n+\t\tbreak;\n+\tcase NIX_ERR_TM_SHAPER_PROFILE_IN_USE:\n+\t\terr_type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE;\n+\t\tbreak;\n+\tcase NIX_ERR_TM_INVALID_NODE:\n+\t\terr_type = RTE_TM_ERROR_TYPE_NODE_ID;\n+\t\tbreak;\n+\tcase NIX_ERR_TM_PKT_MODE_MISMATCH:\n+\t\terr_type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE_ID;\n+\t\tbreak;\n+\tcase NIX_ERR_TM_INVALID_PARENT:\n+\tcase NIX_ERR_TM_PARENT_PRIO_UPDATE:\n+\t\terr_type = RTE_TM_ERROR_TYPE_NODE_PARENT_NODE_ID;\n+\t\tbreak;\n+\tcase NIX_ERR_TM_PRIO_ORDER:\n+\tcase NIX_ERR_TM_MULTIPLE_RR_GROUPS:\n+\t\terr_type = RTE_TM_ERROR_TYPE_NODE_PRIORITY;\n+\t\tbreak;\n+\tcase NIX_ERR_TM_PRIO_EXCEEDED:\n+\t\terr_type = RTE_TM_ERROR_TYPE_CAPABILITIES;\n+\t\tbreak;\n+\tdefault:\n+\t\t/**\n+\t\t * Handle general error (as defined in linux errno.h)\n+\t\t */\n+\t\tif (abs(errorcode) < 300)\n+\t\t\terr_type = errorcode;\n+\t\telse\n+\t\t\terr_type = RTE_TM_ERROR_TYPE_UNSPECIFIED;\n+\t\tbreak;\n+\t}\n+\n+\treturn err_type;\n+}\ndiff --git a/drivers/common/cnxk/cnxk_utils.h b/drivers/common/cnxk/cnxk_utils.h\nnew file mode 100644\nindex 0000000000..5463cd49c4\n--- /dev/null\n+++ b/drivers/common/cnxk/cnxk_utils.h\n@@ -0,0 +1,11 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2021 Marvell.\n+ */\n+#ifndef _CNXK_UTILS_H_\n+#define _CNXK_UTILS_H_\n+\n+#include \"roc_platform.h\"\n+\n+int __roc_api roc_nix_tm_err_to_rte_err(int errorcode);\n+\n+#endif /* _CNXK_UTILS_H_ */\ndiff --git a/drivers/common/cnxk/meson.build b/drivers/common/cnxk/meson.build\nindex 8a551d15d6..258429d54b 100644\n--- a/drivers/common/cnxk/meson.build\n+++ b/drivers/common/cnxk/meson.build\n@@ -61,5 +61,10 @@ sources = files(\n # Security common code\n sources += files('cnxk_security.c')\n \n+# common DPDK utilities code\n+sources += files('cnxk_utils.c')\n+\n includes += include_directories('../../bus/pci')\n includes += include_directories('../../../lib/net')\n+includes += include_directories('../../../lib/ethdev')\n+includes += include_directories('../../../lib/meter')\ndiff --git a/drivers/common/cnxk/roc_utils.c b/drivers/common/cnxk/roc_utils.c\nindex 9cb8708a74..751486f503 100644\n--- a/drivers/common/cnxk/roc_utils.c\n+++ b/drivers/common/cnxk/roc_utils.c\n@@ -64,6 +64,9 @@ roc_error_msg_get(int errorcode)\n \tcase NIX_ERR_TM_INVALID_SHAPER_PROFILE:\n \t\terr_msg = \"TM shaper profile invalid\";\n \t\tbreak;\n+\tcase NIX_ERR_TM_PKT_MODE_MISMATCH:\n+\t\terr_msg = \"shaper profile pkt mode mismatch\";\n+\t\tbreak;\n \tcase NIX_ERR_TM_WEIGHT_EXCEED:\n \t\terr_msg = \"TM DWRR weight exceeded\";\n \t\tbreak;\n@@ -88,6 +91,9 @@ roc_error_msg_get(int errorcode)\n \tcase NIX_ERR_TM_SHAPER_PROFILE_EXISTS:\n \t\terr_msg = \"TM shaper profile exists\";\n \t\tbreak;\n+\tcase NIX_ERR_TM_SHAPER_PKT_LEN_ADJUST:\n+\t\terr_msg = \"length adjust invalid\";\n+\t\tbreak;\n \tcase NIX_ERR_TM_INVALID_TREE:\n \t\terr_msg = \"TM tree invalid\";\n \t\tbreak;\ndiff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map\nindex 388f9385e0..776cabbdef 100644\n--- a/drivers/common/cnxk/version.map\n+++ b/drivers/common/cnxk/version.map\n@@ -172,6 +172,7 @@ INTERNAL {\n \troc_nix_eeprom_info_get;\n \troc_nix_smq_flush;\n \troc_nix_tm_dump;\n+\troc_nix_tm_err_to_rte_err;\n \troc_nix_tm_fini;\n \troc_nix_tm_free_resources;\n \troc_nix_tm_hierarchy_disable;\n",
    "prefixes": [
        "v3",
        "5/8"
    ]
}