get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 101553,
    "url": "https://patches.dpdk.org/api/patches/101553/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211014065152.102685-1-ting.xu@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20211014065152.102685-1-ting.xu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211014065152.102685-1-ting.xu@intel.com",
    "date": "2021-10-14T06:51:52",
    "name": "net/ice: fix TM hierarchy commit flag not reset correctly",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "07086a35e411e6bc7bbf7e83f1d5284e93991c0f",
    "submitter": {
        "id": 1363,
        "url": "https://patches.dpdk.org/api/people/1363/?format=api",
        "name": "Xu, Ting",
        "email": "ting.xu@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20211014065152.102685-1-ting.xu@intel.com/mbox/",
    "series": [
        {
            "id": 19633,
            "url": "https://patches.dpdk.org/api/series/19633/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=19633",
            "date": "2021-10-14T06:51:52",
            "name": "net/ice: fix TM hierarchy commit flag not reset correctly",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/19633/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/101553/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/101553/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 F04FAA0C53;\n\tThu, 14 Oct 2021 08:59:47 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 83D9740042;\n\tThu, 14 Oct 2021 08:59:47 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 63FB840041;\n Thu, 14 Oct 2021 08:59:45 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Oct 2021 23:59:44 -0700",
            "from dpdk-xuting-third.sh.intel.com ([10.67.111.93])\n by orsmga008.jf.intel.com with ESMTP; 13 Oct 2021 23:59:40 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10136\"; a=\"214771554\"",
            "E=Sophos;i=\"5.85,371,1624345200\"; d=\"scan'208\";a=\"214771554\"",
            "E=Sophos;i=\"5.85,371,1624345200\"; d=\"scan'208\";a=\"491815435\""
        ],
        "X-ExtLoop1": "1",
        "From": "Ting Xu <ting.xu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qi.z.zhang@intel.com, qiming.yang@intel.com, Ting Xu <ting.xu@intel.com>,\n stable@dpdk.org",
        "Date": "Thu, 14 Oct 2021 06:51:52 +0000",
        "Message-Id": "<20211014065152.102685-1-ting.xu@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH] net/ice: fix TM hierarchy commit flag not reset\n correctly",
        "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": "After DCF commits TM hierarchy configuration, the commit flag is set to\navoid duplicated commit. But the flag is not reset after device stop,\nwhich prevents the update of hierarchy configuration unless close the\ndevice. It is not reasonable. This patch fix to reset the commit flag\nafter device stop. Then users can delete and add nodes to commit a new\nTM hierarchy configuration.\n\nFixes: 3a6bfc37eaf4 (\"net/ice: support QoS config VF bandwidth in DCF\")\nCc: stable@dpdk.org\n\nSigned-off-by: Ting Xu <ting.xu@intel.com>\n---\n drivers/net/ice/ice_dcf_ethdev.c | 7 +++++++\n drivers/net/ice/ice_dcf_sched.c  | 8 ++++++++\n 2 files changed, 15 insertions(+)",
    "diff": "diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c\nindex 3eb3b077e6..23e2d91c13 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.c\n+++ b/drivers/net/ice/ice_dcf_ethdev.c\n@@ -529,6 +529,11 @@ ice_dcf_dev_start(struct rte_eth_dev *dev)\n \t\treturn -EIO;\n \t}\n \n+\tif (hw->tm_conf.root && !hw->tm_conf.committed) {\n+\t\tPMD_DRV_LOG(ERR, \"please call hierarchy_commit() before starting the port\");\n+\t\treturn -EIO;\n+\t}\n+\n \tad->pf.adapter_stopped = 0;\n \n \thw->num_queue_pairs = RTE_MAX(dev->data->nb_rx_queues,\n@@ -620,6 +625,7 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev)\n \tstruct ice_dcf_adapter *dcf_ad = dev->data->dev_private;\n \tstruct rte_intr_handle *intr_handle = dev->intr_handle;\n \tstruct ice_adapter *ad = &dcf_ad->parent;\n+\tstruct ice_dcf_hw *hw = &dcf_ad->real_hw;\n \n \tif (ad->pf.adapter_stopped == 1) {\n \t\tPMD_DRV_LOG(DEBUG, \"Port is already stopped\");\n@@ -640,6 +646,7 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev)\n \tice_dcf_add_del_all_mac_addr(&dcf_ad->real_hw, false);\n \tdev->data->dev_link.link_status = ETH_LINK_DOWN;\n \tad->pf.adapter_stopped = 1;\n+\thw->tm_conf.committed = false;\n \n \treturn 0;\n }\ndiff --git a/drivers/net/ice/ice_dcf_sched.c b/drivers/net/ice/ice_dcf_sched.c\nindex dcf2723494..65c4c82a5b 100644\n--- a/drivers/net/ice/ice_dcf_sched.c\n+++ b/drivers/net/ice/ice_dcf_sched.c\n@@ -754,6 +754,13 @@ static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,\n \tuint8_t num_elem = 0;\n \tint i, ret_val;\n \n+\t/* check if port is stopped */\n+\tif (adapter->parent.pf.adapter_stopped != 1) {\n+\t\tPMD_DRV_LOG(ERR, \"Please stop port first\");\n+\t\tret_val = ICE_ERR_NOT_READY;\n+\t\tgoto err;\n+\t}\n+\n \tret_val = ice_dcf_commit_check(hw);\n \tif (ret_val)\n \t\tgoto fail_clear;\n@@ -871,5 +878,6 @@ static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,\n \t\tice_dcf_tm_conf_uninit(dev);\n \t\tice_dcf_tm_conf_init(dev);\n \t}\n+err:\n \treturn ret_val;\n }\n",
    "prefixes": []
}