get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 77214,
    "url": "http://patches.dpdk.org/api/patches/77214/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1599763717-135002-6-git-send-email-savinay.dharmappa@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": "<1599763717-135002-6-git-send-email-savinay.dharmappa@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1599763717-135002-6-git-send-email-savinay.dharmappa@intel.com",
    "date": "2020-09-10T18:48:32",
    "name": "[v2,05/10] sched: update the pipe config api implementation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "bc307cb50d9ccd17e6ba1091ceb89cffb9be9eb0",
    "submitter": {
        "id": 1535,
        "url": "http://patches.dpdk.org/api/people/1535/?format=api",
        "name": "Savinay Dharmappa",
        "email": "savinay.dharmappa@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1599763717-135002-6-git-send-email-savinay.dharmappa@intel.com/mbox/",
    "series": [
        {
            "id": 12110,
            "url": "http://patches.dpdk.org/api/series/12110/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12110",
            "date": "2020-09-10T18:48:27",
            "name": "Enable dynamic config of subport bandwidth",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/12110/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/77214/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/77214/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E11B2A04B5;\n\tThu, 10 Sep 2020 20:49:37 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9C7281C11A;\n\tThu, 10 Sep 2020 20:48:58 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id 9F1B91BFB4\n for <dev@dpdk.org>; Thu, 10 Sep 2020 20:48:52 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Sep 2020 11:48:52 -0700",
            "from silpixa00400629.ir.intel.com ([10.237.214.135])\n by orsmga007.jf.intel.com with ESMTP; 10 Sep 2020 11:48:50 -0700"
        ],
        "IronPort-SDR": [
            "\n RRx75giP6n8VrXQ0EVInTVZBpwyw2AJLAmBtTs5pcB22dFBld/A9qinCwiEMqP0v/AnMbsScVS\n C4z7rZFEzQ4Q==",
            "\n 6zQUXZp8Bmz46gk7N+YIdbAm+M1XhgctN4ZMviGJdP5UOZIMV850RnsDbJ46zlNuu38/uNpypu\n UElWK2h/y0TA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9740\"; a=\"138130665\"",
            "E=Sophos;i=\"5.76,413,1592895600\"; d=\"scan'208\";a=\"138130665\"",
            "E=Sophos;i=\"5.76,413,1592895600\"; d=\"scan'208\";a=\"344371101\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Savinay Dharmappa <savinay.dharmappa@intel.com>",
        "To": "jasvinder.singh@intel.com,\n\tcristian.dumitrescu@intel.com,\n\tdev@dpdk.org",
        "Cc": "savinay.dharmappa@intel.com",
        "Date": "Thu, 10 Sep 2020 19:48:32 +0100",
        "Message-Id": "<1599763717-135002-6-git-send-email-savinay.dharmappa@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1599763717-135002-1-git-send-email-savinay.dharmappa@intel.com>",
        "References": "<1599037006-3931-1-git-send-email-savinay.dharmappa@intel.com>\n <1599763717-135002-1-git-send-email-savinay.dharmappa@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 05/10] sched: update the pipe config api\n\timplementation",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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": "Subport profile parameters are fetched from subport profile\ntable to calculate the subport best effort tc rate.\n\nSigned-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>\nSigned-off-by: Jasvinder Singh <jasvinder.singh@intel.com>\n---\n lib/librte_sched/rte_sched.c | 40 +++++++++++++++++++++-------------------\n 1 file changed, 21 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c\nindex 8e66d08..9ff67e0 100644\n--- a/lib/librte_sched/rte_sched.c\n+++ b/lib/librte_sched/rte_sched.c\n@@ -1403,6 +1403,7 @@ rte_sched_pipe_config(struct rte_sched_port *port,\n \tint32_t pipe_profile)\n {\n \tstruct rte_sched_subport *s;\n+\tstruct rte_sched_subport_profile *sp;\n \tstruct rte_sched_pipe *p;\n \tstruct rte_sched_pipe_profile *params;\n \tuint32_t n_subports = subport_id + 1;\n@@ -1443,14 +1444,15 @@ rte_sched_pipe_config(struct rte_sched_port *port,\n \t\treturn -EINVAL;\n \t}\n \n+\tsp = port->subport_profiles + s->profile;\n \t/* Handle the case when pipe already has a valid configuration */\n \tp = s->pipe + pipe_id;\n \tif (p->tb_time) {\n \t\tparams = s->pipe_profiles + p->profile;\n \n \t\tdouble subport_tc_be_rate =\n-\t\t\t(double) s->tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE]\n-\t\t\t/ (double) s->tc_period;\n+\t\t(double)sp->tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE]\n+\t\t\t/ (double) sp->tc_period;\n \t\tdouble pipe_tc_be_rate =\n \t\t\t(double) params->tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE]\n \t\t\t/ (double) params->tc_period;\n@@ -1492,8 +1494,8 @@ rte_sched_pipe_config(struct rte_sched_port *port,\n \t{\n \t\t/* Subport best effort tc oversubscription */\n \t\tdouble subport_tc_be_rate =\n-\t\t\t(double) s->tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE]\n-\t\t\t/ (double) s->tc_period;\n+\t\t(double)sp->tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE]\n+\t\t\t/ (double) sp->tc_period;\n \t\tdouble pipe_tc_be_rate =\n \t\t\t(double) params->tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE]\n \t\t\t/ (double) params->tc_period;\n@@ -2286,11 +2288,11 @@ grinder_credits_update(struct rte_sched_port *port,\n \tuint32_t i;\n \n \t/* Subport TB */\n-\tn_periods = (port->time - subport->tb_time) / sp_params->sp_tb_period;\n-\tsubport->tb_credits += n_periods * sp_params->sp_tb_credits_per_period;\n+\tn_periods = (port->time - subport->tb_time) / sp_params->tb_period;\n+\tsubport->tb_credits += n_periods * sp_params->tb_credits_per_period;\n \tsubport->tb_credits = RTE_MIN(subport->tb_credits,\n-\t\t\t\tsp_params->sp_tb_size);\n-\tsubport->tb_time += n_periods * sp_params->sp_tb_period;\n+\t\t\t\tsp_params->tb_size);\n+\tsubport->tb_time += n_periods * sp_params->tb_period;\n \n \t/* Pipe TB */\n \tn_periods = (port->time - pipe->tb_time) / params->tb_period;\n@@ -2302,9 +2304,9 @@ grinder_credits_update(struct rte_sched_port *port,\n \tif (unlikely(port->time >= subport->tc_time)) {\n \t\tfor (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++)\n \t\t\tsubport->tc_credits[i] =\n-\t\t\t\t\tsp_params->sp_tc_credits_per_period[i];\n+\t\t\t\t\tsp_params->tc_credits_per_period[i];\n \n-\t\tsubport->tc_time = port->time + sp_params->sp_tc_period;\n+\t\tsubport->tc_time = port->time + sp_params->tc_period;\n \t}\n \n \t/* Pipe TCs */\n@@ -2333,17 +2335,17 @@ grinder_tc_ov_credits_update(struct rte_sched_port *port,\n \t\treturn subport->tc_ov_wm_max;\n \n \tfor (i = 0; i < RTE_SCHED_TRAFFIC_CLASS_BE; i++) {\n-\t\ttc_ov_consumption[i] = sp_params->sp_tc_credits_per_period[i]\n+\t\ttc_ov_consumption[i] = sp_params->tc_credits_per_period[i]\n \t\t\t\t\t-  subport->tc_credits[i];\n \t\ttc_consumption += tc_ov_consumption[i];\n \t}\n \n \ttc_ov_consumption[RTE_SCHED_TRAFFIC_CLASS_BE] =\n-\tsp_params->sp_tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] -\n+\tsp_params->tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] -\n \t\tsubport->tc_credits[RTE_SCHED_TRAFFIC_CLASS_BE];\n \n \ttc_ov_consumption_max =\n-\tsp_params->sp_tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] -\n+\tsp_params->tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASS_BE] -\n \t\t\ttc_consumption;\n \n \tif (tc_ov_consumption[RTE_SCHED_TRAFFIC_CLASS_BE] >\n@@ -2374,11 +2376,11 @@ grinder_credits_update(struct rte_sched_port *port,\n \tuint32_t i;\n \n \t/* Subport TB */\n-\tn_periods = (port->time - subport->tb_time) / sp_params->sp_tb_period;\n-\tsubport->tb_credits += n_periods * sp_params->sp_tb_credits_per_period;\n+\tn_periods = (port->time - subport->tb_time) / sp_params->tb_period;\n+\tsubport->tb_credits += n_periods * sp_params->tb_credits_per_period;\n \tsubport->tb_credits = RTE_MIN(subport->tb_credits,\n-\t\t\t\tsp_params->sp_tb_size);\n-\tsubport->tb_time += n_periods * sp_params->sp_tb_period;\n+\t\t\t\tsp_params->tb_size);\n+\tsubport->tb_time += n_periods * sp_params->tb_period;\n \n \t/* Pipe TB */\n \tn_periods = (port->time - pipe->tb_time) / params->tb_period;\n@@ -2393,9 +2395,9 @@ grinder_credits_update(struct rte_sched_port *port,\n \n \t\tfor (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++)\n \t\t\tsubport->tc_credits[i] =\n-\t\t\t\tsp_params->sp_tc_credits_per_period[i];\n+\t\t\t\tsp_params->tc_credits_per_period[i];\n \n-\t\tsubport->tc_time = port->time + sp_params->sp_tc_period;\n+\t\tsubport->tc_time = port->time + sp_params->tc_period;\n \t\tsubport->tc_ov_period_id++;\n \t}\n \n",
    "prefixes": [
        "v2",
        "05/10"
    ]
}