get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 135637,
    "url": "http://patches.dpdk.org/api/patches/135637/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240102102900.3435496-2-qi.z.zhang@intel.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": "<20240102102900.3435496-2-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240102102900.3435496-2-qi.z.zhang@intel.com",
    "date": "2024-01-02T10:29:00",
    "name": "[v4,2/2] net/ice: support Tx sched commit before dev_start",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b726bebcc509b76c90caa929debfab2f32dff7ec",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "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/20240102102900.3435496-2-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 30688,
            "url": "http://patches.dpdk.org/api/series/30688/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30688",
            "date": "2024-01-02T10:28:59",
            "name": "[v4,1/2] net/ice: reset Tx sched node during commit",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/30688/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/135637/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/135637/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 793F0437F7;\n\tTue,  2 Jan 2024 03:08:12 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EA40E40633;\n\tTue,  2 Jan 2024 03:08:08 +0100 (CET)",
            "from mgamail.intel.com (mgamail.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 1B1AE402BD\n for <dev@dpdk.org>; Tue,  2 Jan 2024 03:08:05 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 Jan 2024 18:08:00 -0800",
            "from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.37])\n by FMSMGA003.fm.intel.com with ESMTP; 01 Jan 2024 18:07:59 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1704161286; x=1735697286;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=UnvqRHv/oJ9XnzETyAtvHDF0beIPjFHQe0kAI/uFdgI=;\n b=HJ3qLtUxuIA7rCLlT0/ORq965LUdB+MEsXSyVzmebQ6ZL6G0tFRJURbZ\n 4FD0apSYP20HbZiZkzLNiwHZksQ8IOn2ubQeg8/jUv5SPTYL50GpNzxdN\n r7ckIfkcjWwp331xx8W1mlBodm0EqCbuVCkmvoUy2FjZ13enhtEoYeCgG\n 9ooJWhoJT4leNqifGFkVQX7cIHZ0h5hSRVA3ArAgcmp/98CNKBXeoD8B+\n f76KlpMByuua4ezA5PrpakTLflY+rzoOMYr6y5rQCZi30hoHVdshQRFzb\n aTBfsgt36vO+fzjmpJW40iUSeAquR0ZPXF1z3jtacm2+LHI1mf3YwLSjB g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10940\"; a=\"427991436\"",
            "E=Sophos;i=\"6.04,324,1695711600\"; d=\"scan'208\";a=\"427991436\"",
            "E=McAfee;i=\"6600,9927,10940\"; a=\"870108609\"",
            "E=Sophos;i=\"6.04,324,1695711600\"; d=\"scan'208\";a=\"870108609\""
        ],
        "X-ExtLoop1": "1",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "qiming.yang@intel.com,\n\twenjun1.wu@intel.com",
        "Cc": "dev@dpdk.org,\n\tQi Zhang <qi.z.zhang@intel.com>",
        "Subject": "[PATCH v4 2/2] net/ice: support Tx sched commit before dev_start",
        "Date": "Tue,  2 Jan 2024 05:29:00 -0500",
        "Message-Id": "<20240102102900.3435496-2-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20240102102900.3435496-1-qi.z.zhang@intel.com>",
        "References": "<20231226185428.3158880-1-qi.z.zhang@intel.com>\n <20240102102900.3435496-1-qi.z.zhang@intel.com>",
        "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": "Currently Tx hierarchy commit only take effect if device\nalready be started, as after a dev start / stop cycle, queues\nhas been removed and added back which cause the Tx scheduler\ntree return to orignal topo.\n\nIn this patch, the hierarchy commit function will simply return\nif device has not be started yet and all the commit actions will\nbe deferred to dev_start.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/ice/ice_ethdev.c |  9 +++++++++\n drivers/net/ice/ice_ethdev.h |  3 +++\n drivers/net/ice/ice_tm.c     | 23 ++++++++++++++++++++---\n 3 files changed, 32 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex 3c3bc49dc2..d425a8f98b 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -3717,6 +3717,7 @@ ice_dev_start(struct rte_eth_dev *dev)\n \tint mask, ret;\n \tuint8_t timer = hw->func_caps.ts_func_info.tmr_index_owned;\n \tuint32_t pin_idx = ad->devargs.pin_idx;\n+\tstruct rte_tm_error tm_err;\n \n \t/* program Tx queues' context in hardware */\n \tfor (nb_txq = 0; nb_txq < data->nb_tx_queues; nb_txq++) {\n@@ -3746,6 +3747,14 @@ ice_dev_start(struct rte_eth_dev *dev)\n \t\t}\n \t}\n \n+\tif (pf->tm_conf.committed) {\n+\t\tret = ice_do_hierarchy_commit(dev, true, &tm_err);\n+\t\tif (ret) {\n+\t\t\tPMD_DRV_LOG(ERR, \"fail to commit Tx scheduler\");\n+\t\t\tgoto rx_err;\n+\t\t}\n+\t}\n+\n \tice_set_rx_function(dev);\n \tice_set_tx_function(dev);\n \ndiff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h\nindex 3b2db6aaa6..5448dff48d 100644\n--- a/drivers/net/ice/ice_ethdev.h\n+++ b/drivers/net/ice/ice_ethdev.h\n@@ -686,6 +686,9 @@ int ice_rem_rss_cfg_wrap(struct ice_pf *pf, uint16_t vsi_id,\n \t\t\t struct ice_rss_hash_cfg *cfg);\n void ice_tm_conf_init(struct rte_eth_dev *dev);\n void ice_tm_conf_uninit(struct rte_eth_dev *dev);\n+int ice_do_hierarchy_commit(struct rte_eth_dev *dev,\n+\t\t\t    int clear_on_fail,\n+\t\t\t    struct rte_tm_error *error);\n extern const struct rte_tm_ops ice_tm_ops;\n \n static inline int\ndiff --git a/drivers/net/ice/ice_tm.c b/drivers/net/ice/ice_tm.c\nindex 2ae55418b0..26a440124a 100644\n--- a/drivers/net/ice/ice_tm.c\n+++ b/drivers/net/ice/ice_tm.c\n@@ -843,9 +843,9 @@ static int ice_add_leaf_nodes(struct rte_eth_dev *dev)\n \treturn ret;\n }\n \n-static int ice_hierarchy_commit(struct rte_eth_dev *dev,\n-\t\t\t\t int clear_on_fail,\n-\t\t\t\t struct rte_tm_error *error)\n+int ice_do_hierarchy_commit(struct rte_eth_dev *dev,\n+\t\t\t    int clear_on_fail,\n+\t\t\t    struct rte_tm_error *error)\n {\n \tstruct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);\n \tstruct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n@@ -977,6 +977,8 @@ static int ice_hierarchy_commit(struct rte_eth_dev *dev,\n \t\t}\n \t}\n \n+\tpf->tm_conf.committed = true;\n+\n \treturn ret_val;\n \n reset_leaf:\n@@ -992,3 +994,18 @@ static int ice_hierarchy_commit(struct rte_eth_dev *dev,\n \t}\n \treturn ret_val;\n }\n+\n+static int ice_hierarchy_commit(struct rte_eth_dev *dev,\n+\t\t\t\t int clear_on_fail,\n+\t\t\t\t struct rte_tm_error *error)\n+{\n+\tstruct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);\n+\n+\t/* if device not started, simply set committed flag and return. */\n+\tif (!dev->data->dev_started) {\n+\t\tpf->tm_conf.committed = true;\n+\t\treturn 0;\n+\t}\n+\n+\treturn ice_do_hierarchy_commit(dev, clear_on_fail, error);\n+}\n",
    "prefixes": [
        "v4",
        "2/2"
    ]
}