Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/55344/?format=api
http://patches.dpdk.org/api/patches/55344/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190625153217.24301-21-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-21-jasvinder.singh@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190625153217.24301-21-jasvinder.singh@intel.com", "date": "2019-06-25T15:32:09", "name": "[v2,20/28] sched: update grinder handle function", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "31ea1cb3824e7358d76d07cb31513bd3297c62ec", "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-21-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/55344/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/55344/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 65B341BBE5;\n\tTue, 25 Jun 2019 17:32:52 +0200 (CEST)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 980F11BB27\n\tfor <dev@dpdk.org>; Tue, 25 Jun 2019 17:32:28 +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:28 -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:26 -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=\"166711627\"", "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:32:09 +0100", "Message-Id": "<20190625153217.24301-21-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 20/28] sched: update grinder handle function", "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 grinder handle function 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 | 52 ++++++++++++++++++++----------------\n 1 file changed, 29 insertions(+), 23 deletions(-)", "diff": "diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c\nindex f468827f4..6bdf1b831 100644\n--- a/lib/librte_sched/rte_sched.c\n+++ b/lib/librte_sched/rte_sched.c\n@@ -2537,7 +2537,7 @@ grinder_wrr(struct rte_sched_subport *subport, uint32_t pos)\n }\n \n \n-#define grinder_evict(port, pos)\n+#define grinder_evict(subport, pos)\n \n static inline void\n grinder_prefetch_pipe(struct rte_sched_subport *subport, uint32_t pos)\n@@ -2549,9 +2549,9 @@ grinder_prefetch_pipe(struct rte_sched_subport *subport, uint32_t pos)\n }\n \n static inline void\n-grinder_prefetch_tc_queue_arrays(struct rte_sched_port *port, uint32_t pos)\n+grinder_prefetch_tc_queue_arrays(struct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->subport->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tstruct rte_sched_pipe *pipe = grinder->pipe;\n \tstruct rte_sched_queue *queue;\n \tuint32_t i;\n@@ -2575,8 +2575,8 @@ grinder_prefetch_tc_queue_arrays(struct rte_sched_port *port, uint32_t pos)\n \t\trte_prefetch0(grinder->qbase[i] + qr[i]);\n \t}\n \n-\tgrinder_wrr_load(port->subport, pos);\n-\tgrinder_wrr(port->subport, pos);\n+\tgrinder_wrr_load(subport, pos);\n+\tgrinder_wrr(subport, pos);\n }\n \n static inline void\n@@ -2602,9 +2602,9 @@ grinder_prefetch_mbuf(struct rte_sched_subport *subport, uint32_t pos)\n }\n \n static inline uint32_t\n-grinder_handle(struct rte_sched_port *port, uint32_t pos)\n+grinder_handle(struct rte_sched_port *port,\n+\tstruct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_subport *subport = port->subport;\n \tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \n \tswitch (grinder->state) {\n@@ -2625,9 +2625,9 @@ grinder_handle(struct rte_sched_port *port, uint32_t pos)\n \t{\n \t\tstruct rte_sched_pipe *pipe = grinder->pipe;\n \n-\t\tgrinder->pipe_params = port->pipe_profiles + pipe->profile;\n-\t\tgrinder_prefetch_tc_queue_arrays(port, pos);\n-\t\tgrinder_credits_update(port, port->subport, pos);\n+\t\tgrinder->pipe_params = subport->pipe_profiles + pipe->profile;\n+\t\tgrinder_prefetch_tc_queue_arrays(subport, pos);\n+\t\tgrinder_credits_update(port, subport, pos);\n \n \t\tgrinder->state = e_GRINDER_PREFETCH_MBUF;\n \t\treturn 0;\n@@ -2643,43 +2643,48 @@ grinder_handle(struct rte_sched_port *port, uint32_t pos)\n \n \tcase e_GRINDER_READ_MBUF:\n \t{\n-\t\tuint32_t result = 0;\n+\t\tuint32_t wrr_active, result = 0;\n \n \t\tresult = grinder_schedule(port, subport, pos);\n+\t\twrr_active = (grinder->tc_index == RTE_SCHED_TRAFFIC_CLASS_BE);\n \n \t\t/* Look for next packet within the same TC */\n \t\tif (result && grinder->qmask) {\n-\t\t\tgrinder_wrr(port->subport, pos);\n-\t\t\tgrinder_prefetch_mbuf(port->subport, pos);\n+\t\t\tif (wrr_active)\n+\t\t\t\tgrinder_wrr(subport, pos);\n+\n+\t\t\tgrinder_prefetch_mbuf(subport, pos);\n \n \t\t\treturn 1;\n \t\t}\n-\t\tgrinder_wrr_store(port->subport, pos);\n+\n+\t\tif (wrr_active)\n+\t\t\tgrinder_wrr_store(subport, pos);\n \n \t\t/* Look for another active TC within same pipe */\n-\t\tif (grinder_next_tc(port->subport, pos)) {\n-\t\t\tgrinder_prefetch_tc_queue_arrays(port, pos);\n+\t\tif (grinder_next_tc(subport, pos)) {\n+\t\t\tgrinder_prefetch_tc_queue_arrays(subport, pos);\n \n \t\t\tgrinder->state = e_GRINDER_PREFETCH_MBUF;\n \t\t\treturn result;\n \t\t}\n \n \t\tif (grinder->productive == 0 &&\n-\t\t port->pipe_loop == RTE_SCHED_PIPE_INVALID)\n-\t\t\tport->pipe_loop = grinder->pindex;\n+\t\t subport->pipe_loop == RTE_SCHED_PIPE_INVALID)\n+\t\t\tsubport->pipe_loop = grinder->pindex;\n \n-\t\tgrinder_evict(port, pos);\n+\t\tgrinder_evict(subport, pos);\n \n \t\t/* Look for another active pipe */\n-\t\tif (grinder_next_pipe(port->subport, pos)) {\n-\t\t\tgrinder_prefetch_pipe(port->subport, pos);\n+\t\tif (grinder_next_pipe(subport, pos)) {\n+\t\t\tgrinder_prefetch_pipe(subport, pos);\n \n \t\t\tgrinder->state = e_GRINDER_PREFETCH_TC_QUEUE_ARRAYS;\n \t\t\treturn result;\n \t\t}\n \n \t\t/* No active pipe found */\n-\t\tport->busy_grinders--;\n+\t\tsubport->busy_grinders--;\n \n \t\tgrinder->state = e_GRINDER_PREFETCH_PIPE;\n \t\treturn result;\n@@ -2739,7 +2744,8 @@ rte_sched_port_dequeue(struct rte_sched_port *port, struct rte_mbuf **pkts, uint\n \n \t/* Take each queue in the grinder one step further */\n \tfor (i = 0, count = 0; ; i++) {\n-\t\tcount += grinder_handle(port, i & (RTE_SCHED_PORT_N_GRINDERS - 1));\n+\t\tcount += grinder_handle(port, port->subport,\n+\t\t\t\ti & (RTE_SCHED_PORT_N_GRINDERS - 1));\n \t\tif ((count == n_pkts) ||\n \t\t rte_sched_port_exceptions(port, i >= RTE_SCHED_PORT_N_GRINDERS)) {\n \t\t\tbreak;\n", "prefixes": [ "v2", "20/28" ] }{ "id": 55344, "url": "