Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/57875/?format=api
http://patches.dpdk.org/api/patches/57875/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190823144602.58213-11-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": "<20190823144602.58213-11-jasvinder.singh@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190823144602.58213-11-jasvinder.singh@intel.com", "date": "2019-08-23T14:45:57", "name": "[10/15] sched: update queue stats read for config flexibility", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "008fc056d7cb050a0b56373c1f07fbba81420488", "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/20190823144602.58213-11-jasvinder.singh@intel.com/mbox/", "series": [ { "id": 6115, "url": "http://patches.dpdk.org/api/series/6115/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6115", "date": "2019-08-23T14:45:47", "name": "sched: subport level configuration of pipe nodes", "version": 1, "mbox": "http://patches.dpdk.org/series/6115/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/57875/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/57875/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 A68321C0C2;\n\tFri, 23 Aug 2019 16:46:32 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 615F71C00D\n\tfor <dev@dpdk.org>; Fri, 23 Aug 2019 16:46:17 +0200 (CEST)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t23 Aug 2019 07:46:16 -0700", "from silpixa00381635.ir.intel.com (HELO\n\tsilpixa00381635.ger.corp.intel.com) ([10.237.223.4])\n\tby orsmga001.jf.intel.com with ESMTP; 23 Aug 2019 07:46:15 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.64,421,1559545200\"; d=\"scan'208\";a=\"263211302\"", "From": "Jasvinder Singh <jasvinder.singh@intel.com>", "To": "dev@dpdk.org", "Cc": "cristian.dumitrescu@intel.com,\n\tLukasz Krakowiak <lukaszx.krakowiak@intel.com>", "Date": "Fri, 23 Aug 2019 15:45:57 +0100", "Message-Id": "<20190823144602.58213-11-jasvinder.singh@intel.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190823144602.58213-1-jasvinder.singh@intel.com>", "References": "<20190823144602.58213-1-jasvinder.singh@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 10/15] sched: update queue stats read for config\n\tflexibility", "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": "Modify pipe queue stats read function to allow different subports\nof the same port to have different configuration in terms of number\nof pipes, pipe queue sizes, etc.\n\nSigned-off-by: Jasvinder Singh <jasvinder.singh@intel.com>\nSigned-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>\n---\n lib/librte_sched/rte_sched.c | 28 +++++++++++++++-------------\n 1 file changed, 15 insertions(+), 13 deletions(-)", "diff": "diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c\nindex e0ef86f40..8a7727286 100644\n--- a/lib/librte_sched/rte_sched.c\n+++ b/lib/librte_sched/rte_sched.c\n@@ -284,16 +284,6 @@ enum rte_sched_subport_array {\n \te_RTE_SCHED_SUBPORT_ARRAY_TOTAL,\n };\n \n-#ifdef RTE_SCHED_COLLECT_STATS\n-\n-static inline uint32_t\n-rte_sched_port_queues_per_subport(struct rte_sched_port *port)\n-{\n-\treturn RTE_SCHED_QUEUES_PER_PIPE * port->n_pipes_per_subport;\n-}\n-\n-#endif\n-\n static inline uint32_t\n rte_sched_subport_pipe_queues(struct rte_sched_subport *subport)\n {\n@@ -322,7 +312,12 @@ struct rte_sched_subport *subport, uint32_t qindex)\n static inline uint32_t\n rte_sched_port_queues_per_port(struct rte_sched_port *port)\n {\n-\treturn RTE_SCHED_QUEUES_PER_PIPE * port->n_pipes_per_subport * port->n_subports_per_port;\n+\tuint32_t n_queues = 0, i;\n+\n+\tfor (i = 0; i < port->n_subports_per_port; i++)\n+\t\tn_queues += rte_sched_subport_pipe_queues(port->subports[i]);\n+\n+\treturn n_queues;\n }\n \n static inline uint16_t\n@@ -1487,8 +1482,10 @@ rte_sched_queue_read_stats(struct rte_sched_port *port,\n \tstruct rte_sched_queue_stats *stats,\n \tuint16_t *qlen)\n {\n+\tstruct rte_sched_subport *s;\n \tstruct rte_sched_queue *q;\n \tstruct rte_sched_queue_extra *qe;\n+\tuint32_t subport_id, subport_qmask, subport_qindex;\n \n \t/* Check user parameters */\n \tif (port == NULL) {\n@@ -1514,8 +1511,13 @@ rte_sched_queue_read_stats(struct rte_sched_port *port,\n \t\t\t\"%s: Incorrect value for parameter qlen\\n\", __func__);\n \t\treturn -EINVAL;\n \t}\n-\tq = port->queue + queue_id;\n-\tqe = port->queue_extra + queue_id;\n+\tsubport_qmask = port->n_max_pipes_per_subport_log2 + 4;\n+\tsubport_id = (queue_id >> subport_qmask) & (port->n_subports_per_port - 1);\n+\n+\ts = port->subports[subport_id];\n+\tsubport_qindex = ((1 << subport_qmask) - 1) & queue_id;\n+\tq = s->queue + subport_qindex;\n+\tqe = s->queue_extra + subport_qindex;\n \n \t/* Copy queue stats and clear */\n \tmemcpy(stats, &qe->stats, sizeof(struct rte_sched_queue_stats));\n", "prefixes": [ "10/15" ] }{ "id": 57875, "url": "