get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57873,
    "url": "http://patches.dpdk.org/api/patches/57873/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190823144602.58213-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": "<20190823144602.58213-9-jasvinder.singh@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190823144602.58213-9-jasvinder.singh@intel.com",
    "date": "2019-08-23T14:45:55",
    "name": "[08/15] sched: update grinder functions for config flexibility",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0b0662c25bb6017a10cf696e4373be90225a864a",
    "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-9-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/57873/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/57873/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 2BF381C0AF;\n\tFri, 23 Aug 2019 16:46:29 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 0627F1BFCE\n\tfor <dev@dpdk.org>; Fri, 23 Aug 2019 16:46:14 +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:14 -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:12 -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=\"263211291\"",
        "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:55 +0100",
        "Message-Id": "<20190823144602.58213-9-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 08/15] sched: update grinder functions 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 packet grinder functions of the schedule to allow different\nsubports of the same port to have different configuration in terms\nof number of 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 | 223 +++++++++++++++++------------------\n 1 file changed, 106 insertions(+), 117 deletions(-)",
    "diff": "diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c\nindex f8d13c66d..0451e10ea 100644\n--- a/lib/librte_sched/rte_sched.c\n+++ b/lib/librte_sched/rte_sched.c\n@@ -324,24 +324,6 @@ rte_sched_port_queues_per_port(struct rte_sched_port *port)\n \treturn RTE_SCHED_QUEUES_PER_PIPE * port->n_pipes_per_subport * port->n_subports_per_port;\n }\n \n-static inline struct rte_mbuf **\n-rte_sched_port_qbase(struct rte_sched_port *port, uint32_t qindex)\n-{\n-\tuint32_t pindex = qindex >> 4;\n-\tuint32_t qpos = qindex & 0xF;\n-\n-\treturn (port->queue_array + pindex *\n-\t\tport->qsize_sum + port->qsize_add[qpos]);\n-}\n-\n-static inline uint16_t\n-rte_sched_port_qsize(struct rte_sched_port *port, uint32_t qindex)\n-{\n-\tuint32_t tc = port->pipe_tc[qindex & (RTE_SCHED_QUEUES_PER_PIPE - 1)];\n-\n-\treturn port->qsize[tc];\n-}\n-\n static inline uint16_t\n rte_sched_port_pipe_queue(struct rte_sched_port *port, uint32_t traffic_class)\n {\n@@ -1546,9 +1528,10 @@ rte_sched_queue_read_stats(struct rte_sched_port *port,\n #ifdef RTE_SCHED_DEBUG\n \n static inline int\n-rte_sched_port_queue_is_empty(struct rte_sched_port *port, uint32_t qindex)\n+rte_sched_port_queue_is_empty(struct rte_sched_subport *subport,\n+\tuint32_t qindex)\n {\n-\tstruct rte_sched_queue *queue = port->queue + qindex;\n+\tstruct rte_sched_queue *queue = subport->queue + qindex;\n \n \treturn queue->qr == queue->qw;\n }\n@@ -1663,9 +1646,10 @@ rte_sched_port_red_drop(struct rte_sched_port *port,\n }\n \n static inline void\n-rte_sched_port_set_queue_empty_timestamp(struct rte_sched_port *port, uint32_t qindex)\n+rte_sched_port_set_queue_empty_timestamp(struct rte_sched_port *port,\n+\tstruct rte_sched_subport *subport, uint32_t qindex)\n {\n-\tstruct rte_sched_queue_extra *qe = port->queue_extra + qindex;\n+\tstruct rte_sched_queue_extra *qe = subport->queue_extra + qindex;\n \tstruct rte_red *red = &qe->red;\n \n \trte_red_mark_queue_empty(red, port->time);\n@@ -1682,14 +1666,14 @@ static inline int rte_sched_port_red_drop(struct rte_sched_port *port __rte_unus\n \treturn 0;\n }\n \n-#define rte_sched_port_set_queue_empty_timestamp(port, qindex)\n+#define rte_sched_port_set_queue_empty_timestamp(port, subport, qindex)\n \n #endif /* RTE_SCHED_RED */\n \n #ifdef RTE_SCHED_DEBUG\n \n static inline void\n-debug_check_queue_slab(struct rte_sched_port *port, uint32_t bmp_pos,\n+debug_check_queue_slab(struct rte_sched_subport *subport, uint32_t bmp_pos,\n \t\t       uint64_t bmp_slab)\n {\n \tuint64_t mask;\n@@ -1701,7 +1685,7 @@ debug_check_queue_slab(struct rte_sched_port *port, uint32_t bmp_pos,\n \tpanic = 0;\n \tfor (i = 0, mask = 1; i < 64; i++, mask <<= 1) {\n \t\tif (mask & bmp_slab) {\n-\t\t\tif (rte_sched_port_queue_is_empty(port, bmp_pos + i)) {\n+\t\t\tif (rte_sched_port_queue_is_empty(subport, bmp_pos + i)) {\n \t\t\t\tprintf(\"Queue %u (slab offset %u) is empty\\n\", bmp_pos + i, i);\n \t\t\t\tpanic = 1;\n \t\t\t}\n@@ -2023,10 +2007,10 @@ rte_sched_port_enqueue(struct rte_sched_port *port, struct rte_mbuf **pkts,\n #ifndef RTE_SCHED_SUBPORT_TC_OV\n \n static inline void\n-grinder_credits_update(struct rte_sched_port *port, uint32_t pos)\n+grinder_credits_update(struct rte_sched_port *port,\n+\tstruct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n-\tstruct rte_sched_subport *subport = grinder->subport;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tstruct rte_sched_pipe *pipe = grinder->pipe;\n \tstruct rte_sched_pipe_profile *params = grinder->pipe_params;\n \tuint64_t n_periods;\n@@ -2064,10 +2048,9 @@ grinder_credits_update(struct rte_sched_port *port, uint32_t pos)\n #else\n \n static inline uint32_t\n-grinder_tc_ov_credits_update(struct rte_sched_port *port, uint32_t pos)\n+grinder_tc_ov_credits_update(struct rte_sched_port *port,\n+\tstruct rte_sched_subport *subport)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n-\tstruct rte_sched_subport *subport = grinder->subport;\n \tuint32_t tc_ov_consumption[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];\n \tuint32_t tc_consumption = 0, tc_ov_consumption_max;\n \tuint32_t tc_ov_wm = subport->tc_ov_wm;\n@@ -2107,10 +2090,10 @@ grinder_tc_ov_credits_update(struct rte_sched_port *port, uint32_t pos)\n }\n \n static inline void\n-grinder_credits_update(struct rte_sched_port *port, uint32_t pos)\n+grinder_credits_update(struct rte_sched_port *port,\n+\tstruct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n-\tstruct rte_sched_subport *subport = grinder->subport;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tstruct rte_sched_pipe *pipe = grinder->pipe;\n \tstruct rte_sched_pipe_profile *params = grinder->pipe_params;\n \tuint64_t n_periods;\n@@ -2130,7 +2113,7 @@ grinder_credits_update(struct rte_sched_port *port, uint32_t pos)\n \n \t/* Subport TCs */\n \tif (unlikely(port->time >= subport->tc_time)) {\n-\t\tsubport->tc_ov_wm = grinder_tc_ov_credits_update(port, pos);\n+\t\tsubport->tc_ov_wm = grinder_tc_ov_credits_update(port, subport);\n \n \t\tfor (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++)\n \t\t\tsubport->tc_credits[i] = subport->tc_credits_per_period[i];\n@@ -2160,10 +2143,10 @@ grinder_credits_update(struct rte_sched_port *port, uint32_t pos)\n #ifndef RTE_SCHED_SUBPORT_TC_OV\n \n static inline int\n-grinder_credits_check(struct rte_sched_port *port, uint32_t pos)\n+grinder_credits_check(struct rte_sched_port *port,\n+\tstruct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n-\tstruct rte_sched_subport *subport = grinder->subport;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tstruct rte_sched_pipe *pipe = grinder->pipe;\n \tstruct rte_mbuf *pkt = grinder->pkt;\n \tuint32_t tc_index = grinder->tc_index;\n@@ -2195,10 +2178,10 @@ grinder_credits_check(struct rte_sched_port *port, uint32_t pos)\n #else\n \n static inline int\n-grinder_credits_check(struct rte_sched_port *port, uint32_t pos)\n+grinder_credits_check(struct rte_sched_port *port,\n+\tstruct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n-\tstruct rte_sched_subport *subport = grinder->subport;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tstruct rte_sched_pipe *pipe = grinder->pipe;\n \tstruct rte_mbuf *pkt = grinder->pkt;\n \tuint32_t tc_index = grinder->tc_index;\n@@ -2243,15 +2226,16 @@ grinder_credits_check(struct rte_sched_port *port, uint32_t pos)\n \n \n static inline int\n-grinder_schedule(struct rte_sched_port *port, uint32_t pos)\n+grinder_schedule(struct rte_sched_port *port,\n+\tstruct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tstruct rte_sched_queue *queue = grinder->queue[grinder->qpos];\n \tstruct rte_mbuf *pkt = grinder->pkt;\n \tuint32_t pkt_len = pkt->pkt_len + port->frame_overhead;\n \tuint32_t be_tc_active;\n \n-\tif (!grinder_credits_check(port, pos))\n+\tif (!grinder_credits_check(port, subport, pos))\n \t\treturn 0;\n \n \t/* Advance port time */\n@@ -2268,15 +2252,15 @@ grinder_schedule(struct rte_sched_port *port, uint32_t pos)\n \tif (queue->qr == queue->qw) {\n \t\tuint32_t qindex = grinder->qindex[grinder->qpos];\n \n-\t\trte_bitmap_clear(port->bmp, qindex);\n+\t\trte_bitmap_clear(subport->bmp, qindex);\n \t\tgrinder->qmask &= ~(1 << grinder->qpos);\n \t\tif (be_tc_active)\n \t\t\tgrinder->wrr_mask[grinder->qpos] = 0;\n-\t\trte_sched_port_set_queue_empty_timestamp(port, qindex);\n+\t\trte_sched_port_set_queue_empty_timestamp(port, subport, qindex);\n \t}\n \n \t/* Reset pipe loop detection */\n-\tport->pipe_loop = RTE_SCHED_PIPE_INVALID;\n+\tsubport->pipe_loop = RTE_SCHED_PIPE_INVALID;\n \tgrinder->productive = 1;\n \n \treturn 1;\n@@ -2285,13 +2269,13 @@ grinder_schedule(struct rte_sched_port *port, uint32_t pos)\n #ifdef SCHED_VECTOR_SSE4\n \n static inline int\n-grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe)\n+grinder_pipe_exists(struct rte_sched_subport *subport, uint32_t base_pipe)\n {\n \t__m128i index = _mm_set1_epi32(base_pipe);\n-\t__m128i pipes = _mm_load_si128((__m128i *)port->grinder_base_bmp_pos);\n+\t__m128i pipes = _mm_load_si128((__m128i *)subport->grinder_base_bmp_pos);\n \t__m128i res = _mm_cmpeq_epi32(pipes, index);\n \n-\tpipes = _mm_load_si128((__m128i *)(port->grinder_base_bmp_pos + 4));\n+\tpipes = _mm_load_si128((__m128i *)(subport->grinder_base_bmp_pos + 4));\n \tpipes = _mm_cmpeq_epi32(pipes, index);\n \tres = _mm_or_si128(res, pipes);\n \n@@ -2304,10 +2288,10 @@ grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe)\n #elif defined(SCHED_VECTOR_NEON)\n \n static inline int\n-grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe)\n+grinder_pipe_exists(struct rte_sched_subport *subport, uint32_t base_pipe)\n {\n \tuint32x4_t index, pipes;\n-\tuint32_t *pos = (uint32_t *)port->grinder_base_bmp_pos;\n+\tuint32_t *pos = (uint32_t *)subport->grinder_base_bmp_pos;\n \n \tindex = vmovq_n_u32(base_pipe);\n \tpipes = vld1q_u32(pos);\n@@ -2324,12 +2308,12 @@ grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe)\n #else\n \n static inline int\n-grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe)\n+grinder_pipe_exists(struct rte_sched_subport *subport, uint32_t base_pipe)\n {\n \tuint32_t i;\n \n \tfor (i = 0; i < RTE_SCHED_PORT_N_GRINDERS; i++) {\n-\t\tif (port->grinder_base_bmp_pos[i] == base_pipe)\n+\t\tif (subport->grinder_base_bmp_pos[i] == base_pipe)\n \t\t\treturn 1;\n \t}\n \n@@ -2339,9 +2323,10 @@ grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe)\n #endif /* RTE_SCHED_OPTIMIZATIONS */\n \n static inline void\n-grinder_pcache_populate(struct rte_sched_port *port, uint32_t pos, uint32_t bmp_pos, uint64_t bmp_slab)\n+grinder_pcache_populate(struct rte_sched_subport *subport,\n+\tuint32_t pos, uint32_t bmp_pos, uint64_t bmp_slab)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tuint16_t w[4];\n \n \tgrinder->pcache_w = 0;\n@@ -2370,9 +2355,10 @@ grinder_pcache_populate(struct rte_sched_port *port, uint32_t pos, uint32_t bmp_\n }\n \n static inline void\n-grinder_tccache_populate(struct rte_sched_port *port, uint32_t pos, uint32_t qindex, uint16_t qmask)\n+grinder_tccache_populate(struct rte_sched_subport *subport,\n+\tuint32_t pos, uint32_t qindex, uint16_t qmask)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tuint8_t b, i;\n \n \tgrinder->tccache_w = 0;\n@@ -2393,9 +2379,10 @@ grinder_tccache_populate(struct rte_sched_port *port, uint32_t pos, uint32_t qin\n }\n \n static inline int\n-grinder_next_tc(struct rte_sched_port *port, uint32_t pos)\n+grinder_next_tc(struct rte_sched_port *port,\n+\tstruct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tstruct rte_mbuf **qbase;\n \tuint32_t qindex;\n \tuint16_t qsize;\n@@ -2404,15 +2391,15 @@ grinder_next_tc(struct rte_sched_port *port, uint32_t pos)\n \t\treturn 0;\n \n \tqindex = grinder->tccache_qindex[grinder->tccache_r];\n-\tqbase = rte_sched_port_qbase(port, qindex);\n-\tqsize = rte_sched_port_qsize(port, qindex);\n+\tqbase = rte_sched_subport_pipe_qbase(subport, qindex);\n+\tqsize = rte_sched_subport_pipe_qsize(port, subport, qindex);\n \n \tgrinder->tc_index = rte_sched_port_pipe_tc(port, qindex);\n \tgrinder->qmask = grinder->tccache_qmask[grinder->tccache_r];\n \tgrinder->qsize = qsize;\n \n \tif (grinder->tc_index < RTE_SCHED_TRAFFIC_CLASS_BE) {\n-\t\tgrinder->queue[0] = port->queue + qindex;\n+\t\tgrinder->queue[0] = subport->queue + qindex;\n \t\tgrinder->qbase[0] = qbase;\n \t\tgrinder->qindex[0] = qindex;\n \t\tgrinder->tccache_r++;\n@@ -2420,10 +2407,10 @@ grinder_next_tc(struct rte_sched_port *port, uint32_t pos)\n \t\treturn 1;\n \t}\n \n-\tgrinder->queue[0] = port->queue + qindex;\n-\tgrinder->queue[1] = port->queue + qindex + 1;\n-\tgrinder->queue[2] = port->queue + qindex + 2;\n-\tgrinder->queue[3] = port->queue + qindex + 3;\n+\tgrinder->queue[0] = subport->queue + qindex;\n+\tgrinder->queue[1] = subport->queue + qindex + 1;\n+\tgrinder->queue[2] = subport->queue + qindex + 2;\n+\tgrinder->queue[3] = subport->queue + qindex + 3;\n \n \tgrinder->qbase[0] = qbase;\n \tgrinder->qbase[1] = qbase + qsize;\n@@ -2440,9 +2427,10 @@ grinder_next_tc(struct rte_sched_port *port, uint32_t pos)\n }\n \n static inline int\n-grinder_next_pipe(struct rte_sched_port *port, uint32_t pos)\n+grinder_next_pipe(struct rte_sched_port *port,\n+\tstruct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tuint32_t pipe_qindex;\n \tuint16_t pipe_qmask;\n \n@@ -2455,22 +2443,22 @@ grinder_next_pipe(struct rte_sched_port *port, uint32_t pos)\n \t\tuint32_t bmp_pos = 0;\n \n \t\t/* Get another non-empty pipe group */\n-\t\tif (unlikely(rte_bitmap_scan(port->bmp, &bmp_pos, &bmp_slab) <= 0))\n+\t\tif (unlikely(rte_bitmap_scan(subport->bmp, &bmp_pos, &bmp_slab) <= 0))\n \t\t\treturn 0;\n \n #ifdef RTE_SCHED_DEBUG\n-\t\tdebug_check_queue_slab(port, bmp_pos, bmp_slab);\n+\t\tdebug_check_queue_slab(subport, bmp_pos, bmp_slab);\n #endif\n \n \t\t/* Return if pipe group already in one of the other grinders */\n-\t\tport->grinder_base_bmp_pos[pos] = RTE_SCHED_BMP_POS_INVALID;\n-\t\tif (unlikely(grinder_pipe_exists(port, bmp_pos)))\n+\t\tsubport->grinder_base_bmp_pos[pos] = RTE_SCHED_BMP_POS_INVALID;\n+\t\tif (unlikely(grinder_pipe_exists(subport, bmp_pos)))\n \t\t\treturn 0;\n \n-\t\tport->grinder_base_bmp_pos[pos] = bmp_pos;\n+\t\tsubport->grinder_base_bmp_pos[pos] = bmp_pos;\n \n \t\t/* Install new pipe group into grinder's pipe cache */\n-\t\tgrinder_pcache_populate(port, pos, bmp_pos, bmp_slab);\n+\t\tgrinder_pcache_populate(subport, pos, bmp_pos, bmp_slab);\n \n \t\tpipe_qmask = grinder->pcache_qmask[0];\n \t\tpipe_qindex = grinder->pcache_qindex[0];\n@@ -2479,18 +2467,18 @@ grinder_next_pipe(struct rte_sched_port *port, uint32_t pos)\n \n \t/* Install new pipe in the grinder */\n \tgrinder->pindex = pipe_qindex >> 4;\n-\tgrinder->subport = port->subport + (grinder->pindex / port->n_pipes_per_subport);\n-\tgrinder->pipe = port->pipe + grinder->pindex;\n+\tgrinder->subport = subport;\n+\tgrinder->pipe = subport->pipe + grinder->pindex;\n \tgrinder->pipe_params = NULL; /* to be set after the pipe structure is prefetched */\n \tgrinder->productive = 0;\n \n-\tgrinder_tccache_populate(port, pos, pipe_qindex, pipe_qmask);\n-\tgrinder_next_tc(port, pos);\n+\tgrinder_tccache_populate(subport, pos, pipe_qindex, pipe_qmask);\n+\tgrinder_next_tc(port, subport, pos);\n \n \t/* Check for pipe exhaustion */\n-\tif (grinder->pindex == port->pipe_loop) {\n-\t\tport->pipe_exhaustion = 1;\n-\t\tport->pipe_loop = RTE_SCHED_PIPE_INVALID;\n+\tif (grinder->pindex == subport->pipe_loop) {\n+\t\tsubport->pipe_exhaustion = 1;\n+\t\tsubport->pipe_loop = RTE_SCHED_PIPE_INVALID;\n \t}\n \n \treturn 1;\n@@ -2498,9 +2486,9 @@ grinder_next_pipe(struct rte_sched_port *port, uint32_t pos)\n \n \n static inline void\n-grinder_wrr_load(struct rte_sched_port *port, uint32_t pos)\n+grinder_wrr_load(struct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tstruct rte_sched_pipe *pipe = grinder->pipe;\n \tstruct rte_sched_pipe_profile *pipe_params = grinder->pipe_params;\n \tuint32_t qmask = grinder->qmask;\n@@ -2526,9 +2514,9 @@ grinder_wrr_load(struct rte_sched_port *port, uint32_t pos)\n }\n \n static inline void\n-grinder_wrr_store(struct rte_sched_port *port, uint32_t pos)\n+grinder_wrr_store(struct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tstruct rte_sched_pipe *pipe = grinder->pipe;\n \n \tpipe->wrr_tokens[0] =\n@@ -2546,9 +2534,9 @@ grinder_wrr_store(struct rte_sched_port *port, uint32_t pos)\n }\n \n static inline void\n-grinder_wrr(struct rte_sched_port *port, uint32_t pos)\n+grinder_wrr(struct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tuint16_t wrr_tokens_min;\n \n \tgrinder->wrr_tokens[0] |= ~grinder->wrr_mask[0];\n@@ -2566,21 +2554,21 @@ grinder_wrr(struct rte_sched_port *port, 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_port *port, uint32_t pos)\n+grinder_prefetch_pipe(struct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \n \trte_prefetch0(grinder->pipe);\n \trte_prefetch0(grinder->queue[0]);\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->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tuint16_t qsize, qr[RTE_SCHED_MAX_QUEUES_PER_TC];\n \n \tqsize = grinder->qsize;\n@@ -2601,17 +2589,17 @@ grinder_prefetch_tc_queue_arrays(struct rte_sched_port *port, uint32_t pos)\n \trte_prefetch0(grinder->qbase[0] + qr[0]);\n \trte_prefetch0(grinder->qbase[1] + qr[1]);\n \n-\tgrinder_wrr_load(port, pos);\n-\tgrinder_wrr(port, pos);\n+\tgrinder_wrr_load(subport, pos);\n+\tgrinder_wrr(subport, pos);\n \n \trte_prefetch0(grinder->qbase[2] + qr[2]);\n \trte_prefetch0(grinder->qbase[3] + qr[3]);\n }\n \n static inline void\n-grinder_prefetch_mbuf(struct rte_sched_port *port, uint32_t pos)\n+grinder_prefetch_mbuf(struct rte_sched_subport *subport, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \tuint32_t qpos = grinder->qpos;\n \tstruct rte_mbuf **qbase = grinder->qbase[qpos];\n \tuint16_t qsize = grinder->qsize;\n@@ -2630,14 +2618,15 @@ grinder_prefetch_mbuf(struct rte_sched_port *port, uint32_t pos)\n static inline uint32_t\n grinder_handle(struct rte_sched_port *port, uint32_t pos)\n {\n-\tstruct rte_sched_grinder *grinder = port->grinder + pos;\n+\tstruct rte_sched_subport *subport = port->subport;\n+\tstruct rte_sched_grinder *grinder = subport->grinder + pos;\n \n \tswitch (grinder->state) {\n \tcase e_GRINDER_PREFETCH_PIPE:\n \t{\n-\t\tif (grinder_next_pipe(port, pos)) {\n-\t\t\tgrinder_prefetch_pipe(port, pos);\n-\t\t\tport->busy_grinders++;\n+\t\tif (grinder_next_pipe(port, subport, pos)) {\n+\t\t\tgrinder_prefetch_pipe(subport, pos);\n+\t\t\tsubport->busy_grinders++;\n \n \t\t\tgrinder->state = e_GRINDER_PREFETCH_TC_QUEUE_ARRAYS;\n \t\t\treturn 0;\n@@ -2650,9 +2639,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, 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@@ -2660,7 +2649,7 @@ grinder_handle(struct rte_sched_port *port, uint32_t pos)\n \n \tcase e_GRINDER_PREFETCH_MBUF:\n \t{\n-\t\tgrinder_prefetch_mbuf(port, pos);\n+\t\tgrinder_prefetch_mbuf(subport, pos);\n \n \t\tgrinder->state = e_GRINDER_READ_MBUF;\n \t\treturn 0;\n@@ -2670,47 +2659,47 @@ grinder_handle(struct rte_sched_port *port, uint32_t pos)\n \t{\n \t\tuint32_t wrr_active, result = 0;\n \n-\t\tresult = grinder_schedule(port, pos);\n+\t\tresult = grinder_schedule(port, subport, pos);\n \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\tif (wrr_active)\n-\t\t\t\tgrinder_wrr(port, pos);\n+\t\t\t\tgrinder_wrr(subport, pos);\n \n-\t\t\tgrinder_prefetch_mbuf(port, pos);\n+\t\t\tgrinder_prefetch_mbuf(subport, pos);\n \n \t\t\treturn 1;\n \t\t}\n \n \t\tif (wrr_active)\n-\t\t\tgrinder_wrr_store(port, pos);\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, pos)) {\n-\t\t\tgrinder_prefetch_tc_queue_arrays(port, pos);\n+\t\tif (grinder_next_tc(port, 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, pos)) {\n-\t\t\tgrinder_prefetch_pipe(port, pos);\n+\t\tif (grinder_next_pipe(port, 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",
    "prefixes": [
        "08/15"
    ]
}