get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129339,
    "url": "http://patches.dpdk.org/api/patches/129339/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230706114514.106330-1-markus.theil@tu-ilmenau.de/",
    "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": "<20230706114514.106330-1-markus.theil@tu-ilmenau.de>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230706114514.106330-1-markus.theil@tu-ilmenau.de",
    "date": "2023-07-06T11:45:14",
    "name": "net/ice: allow setting CIR",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7512456dc5f6e63d5833db7437d71d9cb395b5b8",
    "submitter": {
        "id": 747,
        "url": "http://patches.dpdk.org/api/people/747/?format=api",
        "name": "Markus Theil",
        "email": "markus.theil@tu-ilmenau.de"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230706114514.106330-1-markus.theil@tu-ilmenau.de/mbox/",
    "series": [
        {
            "id": 28860,
            "url": "http://patches.dpdk.org/api/series/28860/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28860",
            "date": "2023-07-06T11:45:14",
            "name": "net/ice: allow setting CIR",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/28860/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/129339/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/129339/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 6F96C42DE7;\n\tThu,  6 Jul 2023 13:45:19 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 44635410FA;\n\tThu,  6 Jul 2023 13:45:19 +0200 (CEST)",
            "from smail.rz.tu-ilmenau.de (smail.rz.tu-ilmenau.de [141.24.186.67])\n by mails.dpdk.org (Postfix) with ESMTP id E5FAC40A79\n for <dev@dpdk.org>; Thu,  6 Jul 2023 13:45:17 +0200 (CEST)",
            "from localhost.localdomain (unknown [91.137.0.140])\n by smail.rz.tu-ilmenau.de (Postfix) with ESMTPA id 839135800A9;\n Thu,  6 Jul 2023 13:45:17 +0200 (CEST)"
        ],
        "From": "markus.theil@tu-ilmenau.de",
        "To": "dev@dpdk.org",
        "Cc": "Qiming Yang <qiming.yang@intel.com>, Qi Zhang <qi.z.zhang@intel.com>,\n Michael Rossberg <michael.rossberg@tu-ilmenau.de>",
        "Subject": "[PATCH] net/ice: allow setting CIR",
        "Date": "Thu,  6 Jul 2023 13:45:14 +0200",
        "Message-ID": "<20230706114514.106330-1-markus.theil@tu-ilmenau.de>",
        "X-Mailer": "git-send-email 2.41.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "From: Michael Rossberg <michael.rossberg@tu-ilmenau.de>\n\nice only allowed to set peak information rate (PIR), while the hardware\nalso supports setting committed information rate (CIR). In many use\ncases both values are needed, therefore add support for CIR.\n\nSigned-off-by: Michael Rossberg <michael.rossberg@tu-ilmenau.de>\n---\n drivers/net/ice/ice_tm.c | 39 ++++++++++++++++++++++++++++-----------\n 1 file changed, 28 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/ice_tm.c b/drivers/net/ice/ice_tm.c\nindex 34a0bfcff8..f5ea47ae83 100644\n--- a/drivers/net/ice/ice_tm.c\n+++ b/drivers/net/ice/ice_tm.c\n@@ -693,6 +693,7 @@ static int ice_hierarchy_commit(struct rte_eth_dev *dev,\n \tstruct ice_vsi *vsi;\n \tint ret_val = ICE_SUCCESS;\n \tuint64_t peak = 0;\n+\tuint64_t committed = 0;\n \tuint8_t priority;\n \tuint32_t i;\n \tuint32_t idx_vsi_child;\n@@ -801,17 +802,33 @@ static int ice_hierarchy_commit(struct rte_eth_dev *dev,\n \t\tq_teid = txq->q_teid;\n \t\tif (tm_node->shaper_profile) {\n \t\t\t/* Transfer from Byte per seconds to Kbps */\n-\t\t\tpeak = tm_node->shaper_profile->profile.peak.rate;\n-\t\t\tpeak = peak / 1000 * BITS_PER_BYTE;\n-\t\t\tret_val = ice_cfg_q_bw_lmt(hw->port_info, vsi->idx,\n-\t\t\t\t\t\t   tm_node->tc, tm_node->id,\n-\t\t\t\t\t\t   ICE_MAX_BW, (u32)peak);\n-\t\t\tif (ret_val) {\n-\t\t\t\terror->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;\n-\t\t\t\tPMD_DRV_LOG(ERR,\n-\t\t\t\t\t    \"configure queue %u bandwidth failed\",\n-\t\t\t\t\t    tm_node->id);\n-\t\t\t\tgoto fail_clear;\n+\t\t\tif (tm_node->shaper_profile->profile.peak.rate > 0) {\n+\t\t\t\tpeak = tm_node->shaper_profile->profile.peak.rate;\n+\t\t\t\tpeak = peak / 1000 * BITS_PER_BYTE;\n+\t\t\t\tret_val = ice_cfg_q_bw_lmt(hw->port_info, vsi->idx,\n+\t\t\t\t\t\t\t   tm_node->tc, tm_node->id,\n+\t\t\t\t\t\t\t   ICE_MAX_BW, (u32)peak);\n+\t\t\t\tif (ret_val) {\n+\t\t\t\t\terror->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;\n+\t\t\t\t\tPMD_DRV_LOG(ERR,\n+\t\t\t\t\t\t    \"configure queue %u peak bandwidth failed\",\n+\t\t\t\t\t\t    tm_node->id);\n+\t\t\t\t\tgoto fail_clear;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\tif (tm_node->shaper_profile->profile.committed.rate > 0) {\n+\t\t\t\tcommitted = tm_node->shaper_profile->profile.committed.rate;\n+\t\t\t\tcommitted = committed / 1000 * BITS_PER_BYTE;\n+\t\t\t\tret_val = ice_cfg_q_bw_lmt(hw->port_info, vsi->idx,\n+\t\t\t\t\t\t\t   tm_node->tc, tm_node->id,\n+\t\t\t\t\t\t\t   ICE_MIN_BW, (u32)committed);\n+\t\t\t\tif (ret_val) {\n+\t\t\t\t\terror->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;\n+\t\t\t\t\tPMD_DRV_LOG(ERR,\n+\t\t\t\t\t\t    \"configure queue %u committed bandwidth failed\",\n+\t\t\t\t\t\t    tm_node->id);\n+\t\t\t\t\tgoto fail_clear;\n+\t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tpriority = 7 - tm_node->priority;\n",
    "prefixes": []
}