Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/55332/?format=api
http://patches.dpdk.org/api/patches/55332/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190625153217.24301-9-jasvinder.singh@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": "<20190625153217.24301-9-jasvinder.singh@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190625153217.24301-9-jasvinder.singh@intel.com", "date": "2019-06-25T15:31:57", "name": "[v2,08/28] sched: update pipe config API", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "075954662aa32eba9c660c27f33a5d63c8c31e6c", "submitter": { "id": 285, "url": "http://patches.dpdk.org/api/people/285/?format=api", "name": "Jasvinder Singh", "email": "jasvinder.singh@intel.com" }, "delegate": { "id": 10018, "url": "http://patches.dpdk.org/api/users/10018/?format=api", "username": "cristian_dumitrescu", "first_name": "Cristian", "last_name": "Dumitrescu", "email": "cristian.dumitrescu@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190625153217.24301-9-jasvinder.singh@intel.com/mbox/", "series": [ { "id": 5160, "url": "http://patches.dpdk.org/api/series/5160/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5160", "date": "2019-06-25T15:31:49", "name": "sched: feature enhancements", "version": 2, "mbox": "http://patches.dpdk.org/series/5160/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/55332/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/55332/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B0CA51BB06;\n\tTue, 25 Jun 2019 17:32:22 +0200 (CEST)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 9827F1BA5D\n\tfor <dev@dpdk.org>; Tue, 25 Jun 2019 17:32:11 +0200 (CEST)", "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jun 2019 08:32:11 -0700", "from silpixa00381635.ir.intel.com (HELO\n\tsilpixa00381635.ger.corp.intel.com) ([10.237.223.4])\n\tby orsmga006.jf.intel.com with ESMTP; 25 Jun 2019 08:32:09 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.63,416,1557212400\"; d=\"scan'208\";a=\"166711469\"", "From": "Jasvinder Singh <jasvinder.singh@intel.com>", "To": "dev@dpdk.org", "Cc": "cristian.dumitrescu@intel.com, Abraham Tovar <abrahamx.tovar@intel.com>, \n\tLukasz Krakowiak <lukaszx.krakowiak@intel.com>", "Date": "Tue, 25 Jun 2019 16:31:57 +0100", "Message-Id": "<20190625153217.24301-9-jasvinder.singh@intel.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190625153217.24301-1-jasvinder.singh@intel.com>", "References": "<20190528120553.2992-2-lukaszx.krakowiak@intel.com>\n\t<20190625153217.24301-1-jasvinder.singh@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2 08/28] sched: update pipe config API", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Update pipe configuration api implementation to allow\nconfiguration flexiblity for pipe traffic classes and queues,\nand subport level configuration of the pipe parameters.\n\nSigned-off-by: Jasvinder Singh <jasvinder.singh@intel.com>\nSigned-off-by: Abraham Tovar <abrahamx.tovar@intel.com>\nSigned-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>\n---\n lib/librte_sched/rte_sched.c | 83 +++++++++++++++++++++++-------------\n lib/librte_sched/rte_sched.h | 2 +-\n 2 files changed, 55 insertions(+), 30 deletions(-)", "diff": "diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c\nindex 619b4763f..1999bbfa3 100644\n--- a/lib/librte_sched/rte_sched.c\n+++ b/lib/librte_sched/rte_sched.c\n@@ -1258,40 +1258,59 @@ rte_sched_pipe_config(struct rte_sched_port *port,\n \tprofile = (uint32_t) pipe_profile;\n \tdeactivate = (pipe_profile < 0);\n \n-\tif (port == NULL ||\n-\t subport_id >= port->n_subports_per_port ||\n-\t pipe_id >= port->n_pipes_per_subport ||\n-\t (!deactivate && profile >= port->n_pipe_profiles))\n-\t\treturn -1;\n+\tif (port == NULL) {\n+\t\tRTE_LOG(ERR, SCHED,\n+\t\t\t\"%s: Incorrect value for parameter port \\n\", __func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (subport_id >= port->n_subports_per_port) {\n+\t\tRTE_LOG(ERR, SCHED,\n+\t\t\t\"%s: Incorrect value for subport id \\n\", __func__);\n+\t\treturn -EINVAL;\n+\t}\n \n+\tif (pipe_id >= port->subports[subport_id]->n_subport_pipes) {\n+\t\tRTE_LOG(ERR, SCHED,\n+\t\t\t\"%s: Incorrect value for pipe id \\n\", __func__);\n+\t\treturn -EINVAL;\n+\t}\n \n-\t/* Check that subport configuration is valid */\n-\ts = port->subport + subport_id;\n-\tif (s->tb_period == 0)\n-\t\treturn -2;\n+\tif (!deactivate &&\n+\t\tprofile >= port->subports[subport_id]->n_pipe_profiles) {\n+\t\tRTE_LOG(ERR, SCHED,\n+\t\t\t\"%s: Incorrect value for pipe profile \\n\", __func__);\n+\t\treturn -EINVAL;\n+\t}\n \n-\tp = port->pipe + (subport_id * port->n_pipes_per_subport + pipe_id);\n+\t/* Check that subport configuration is valid */\n+\ts = port->subports[subport_id];\n+\tp = s->pipe + pipe_id;\n \n \t/* Handle the case when pipe already has a valid configuration */\n \tif (p->tb_time) {\n-\t\tparams = port->pipe_profiles + p->profile;\n+\t\tparams = s->pipe_profiles + p->profile;\n \n #ifdef RTE_SCHED_SUBPORT_TC_OV\n-\t\tdouble subport_tc3_rate = (double) s->tc_credits_per_period[3]\n+\t\tdouble subport_tc_be_rate =\n+\t\t\t(double) s->tc_credits_per_period[\n+\t\t\t\t\tRTE_SCHED_TRAFFIC_CLASS_BE]\n \t\t\t/ (double) s->tc_period;\n-\t\tdouble pipe_tc3_rate = (double) params->tc_credits_per_period[3]\n+\t\tdouble pipe_tc_be_rate =\n+\t\t\t(double) params->tc_credits_per_period[\n+\t\t\t\t\tRTE_SCHED_TRAFFIC_CLASS_BE]\n \t\t\t/ (double) params->tc_period;\n-\t\tuint32_t tc3_ov = s->tc_ov;\n+\t\tuint32_t tc_be_ov = s->tc_ov;\n \n \t\t/* Unplug pipe from its subport */\n \t\ts->tc_ov_n -= params->tc_ov_weight;\n-\t\ts->tc_ov_rate -= pipe_tc3_rate;\n-\t\ts->tc_ov = s->tc_ov_rate > subport_tc3_rate;\n+\t\ts->tc_ov_rate -= pipe_tc_be_rate;\n+\t\ts->tc_ov = s->tc_ov_rate > subport_tc_be_rate;\n \n-\t\tif (s->tc_ov != tc3_ov) {\n+\t\tif (s->tc_ov != tc_be_ov) {\n \t\t\tRTE_LOG(DEBUG, SCHED,\n-\t\t\t\t\"Subport %u TC3 oversubscription is OFF (%.4lf >= %.4lf)\\n\",\n-\t\t\t\tsubport_id, subport_tc3_rate, s->tc_ov_rate);\n+\t\t\t\t\"Subport %u Best effort TC oversubscription is OFF (%.4lf >= %.4lf)\\n\",\n+\t\t\t\tsubport_id, subport_tc_be_rate, s->tc_ov_rate);\n \t\t}\n #endif\n \n@@ -1304,34 +1323,40 @@ rte_sched_pipe_config(struct rte_sched_port *port,\n \n \t/* Apply the new pipe configuration */\n \tp->profile = profile;\n-\tparams = port->pipe_profiles + p->profile;\n+\tparams = s->pipe_profiles + p->profile;\n \n \t/* Token Bucket (TB) */\n \tp->tb_time = port->time;\n \tp->tb_credits = params->tb_size / 2;\n \n \t/* Traffic Classes (TCs) */\n+\tp->n_be_queues = params->n_be_queues;\n \tp->tc_time = port->time + params->tc_period;\n \tfor (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++)\n-\t\tp->tc_credits[i] = params->tc_credits_per_period[i];\n+\t\tif (s->qsize[i])\n+\t\t\tp->tc_credits[i] = params->tc_credits_per_period[i];\n \n #ifdef RTE_SCHED_SUBPORT_TC_OV\n \t{\n \t\t/* Subport TC3 oversubscription */\n-\t\tdouble subport_tc3_rate = (double) s->tc_credits_per_period[3]\n+\t\tdouble subport_tc_be_rate =\n+\t\t\t(double) s->tc_credits_per_period[\n+\t\t\t\t\tRTE_SCHED_TRAFFIC_CLASS_BE]\n \t\t\t/ (double) s->tc_period;\n-\t\tdouble pipe_tc3_rate = (double) params->tc_credits_per_period[3]\n+\t\tdouble pipe_tc_be_rate =\n+\t\t\t(double) params->tc_credits_per_period[\n+\t\t\t\t\tRTE_SCHED_TRAFFIC_CLASS_BE]\n \t\t\t/ (double) params->tc_period;\n-\t\tuint32_t tc3_ov = s->tc_ov;\n+\t\tuint32_t tc_be_ov = s->tc_ov;\n \n \t\ts->tc_ov_n += params->tc_ov_weight;\n-\t\ts->tc_ov_rate += pipe_tc3_rate;\n-\t\ts->tc_ov = s->tc_ov_rate > subport_tc3_rate;\n+\t\ts->tc_ov_rate += pipe_tc_be_rate;\n+\t\ts->tc_ov = s->tc_ov_rate > subport_tc_be_rate;\n \n-\t\tif (s->tc_ov != tc3_ov) {\n+\t\tif (s->tc_ov != tc_be_ov) {\n \t\t\tRTE_LOG(DEBUG, SCHED,\n-\t\t\t\t\"Subport %u TC3 oversubscription is ON (%.4lf < %.4lf)\\n\",\n-\t\t\t\tsubport_id, subport_tc3_rate, s->tc_ov_rate);\n+\t\t\t\t\"Subport %u Best effort TC oversubscription is ON (%.4lf < %.4lf)\\n\",\n+\t\t\t\tsubport_id, subport_tc_be_rate, s->tc_ov_rate);\n \t\t}\n \t\tp->tc_ov_period_id = s->tc_ov_period_id;\n \t\tp->tc_ov_credits = s->tc_ov_wm;\ndiff --git a/lib/librte_sched/rte_sched.h b/lib/librte_sched/rte_sched.h\nindex 6ebc592ff..121e1f669 100644\n--- a/lib/librte_sched/rte_sched.h\n+++ b/lib/librte_sched/rte_sched.h\n@@ -338,7 +338,7 @@ rte_sched_subport_config(struct rte_sched_port *port,\n * @param pipe_id\n * Pipe ID within subport\n * @param pipe_profile\n- * ID of port-level pre-configured pipe profile\n+ * ID of subport-level pre-configured pipe profile\n * @return\n * 0 upon success, error code otherwise\n */\n", "prefixes": [ "v2", "08/28" ] }{ "id": 55332, "url": "