From patchwork Wed Sep 19 22:22:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh X-Patchwork-Id: 44984 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DD4231B11F; Thu, 20 Sep 2018 00:23:11 +0200 (CEST) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0071.outbound.protection.outlook.com [104.47.33.71]) by dpdk.org (Postfix) with ESMTP id EF6417D04 for ; Thu, 20 Sep 2018 00:23:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oGr+9TlymjbI+87ArX082fG2DmRxNFwKWi8SEphOvfo=; b=gMwqAcPOlMilljkClIrkoOXzhOo+QzxDIsNM0kPz2HvZ2uA9uODOSMKVmjQ1s+RDL4HKxkYhXBbZtvAlcXHd7WIr6zfBIRevS7A7CPakKPL4TNJp9cpGx+IDSfY3au47vEtJSE+wVPgcapxrnXIOTzMceQ2WOxxun4Zgbe2CGSQ= Received: from localhost.localdomain (115.113.156.3) by BYAPR07MB4965.namprd07.prod.outlook.com (2603:10b6:a03:5b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Wed, 19 Sep 2018 22:23:05 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, nikhil.rao@intel.com, anoob.joseph@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Thu, 20 Sep 2018 03:52:32 +0530 Message-Id: <20180919222235.6239-1-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180904141223.24216-1-pbhagavatula@caviumnetworks.com> References: <20180904141223.24216-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: MA1PR0101CA0003.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::13) To BYAPR07MB4965.namprd07.prod.outlook.com (2603:10b6:a03:5b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f1f1d153-8d81-4457-b73d-08d61e7e79da X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4965; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4965; 3:st5qSxe9e7zgzIdAbEg7FOtlYyJNuGEhjk8aH4see95aKgMQD4BG02mVkWS+QHOezmSS4soB+imy3xO/pKx5py4LBwiD2MrXZnFPI3dPk2/aRp69L5t8U6R1bNylfOeAsS3GK0+GaodP95INzA83ImQpv0VvNd2ckFUIV3QXuR5J8ZWZZJ63EAgp5koZgPMpGu15TIN3ynsoKiIG2v1+MrstZZZI1jfzYxHygFHwtmNQshqrraTFbJW5auLbFNG0; 25:175KRDforyvXRwDpLMmPty2/u+PhjeW0i58EUt+rvo+yAzP79gh51MuRaWg2efhB7xyvgj17L5cE+miF7zeNICyUeJHH0LzxrEVOu27ZzOW/wOB0/V+Ig+sOJidv/9q9fGdac7uHjLwCmngyzgq3mYPIAVMaTA6bB60V4XJ4V0wLa0qXUbDUK3jTM1HM3gDOORSQUXIzPmLx5AQ0QkpB/MH80faE+6qhoefpmVrw6Y8Iz6HJ+f8UpxahOzc5B5gGm2VO7iqrH/kOy24FU6c8hvCvi3LKxRcuJSR4lDIcfKAQmjtKtOQmiUYki+EKCLTRj22QZuquBL8KIx/M9mPS+g==; 31:wqSmdWmsiLkCvo5xtIODbwbrXHNwwv0Y2bCRNtRK/DI2owB+3UhiRLs7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qmtttncfOrXorHgjiXO7OorRLF1XX8w2a0uRkpagrJWZNTj5YMqZHGaW2QlQfm6Y4bsz4oSm3S2+nFGRXg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231355)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991041); SRVR:BYAPR07MB4965; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4965; X-Forefront-PRVS: 0800C0C167 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(66066001)(6636002)(575784001)(6512007)(81166006)(81156014)(6666003)(53936002)(48376002)(4326008)(1857600001)(316002)(50226002)(486006)(36756003)(8936002)(446003)(11346002)(16526019)(26005)(476003)(956004)(8676002)(2616005)(2906002)(14444005)(42882007)(6346003)(5660300001)(68736007)(16586007)(97736004)(47776003)(7736002)(107886003)(6486002)(72206003)(478600001)(52116002)(105586002)(50466002)(51416003)(1076002)(3846002)(6506007)(6116002)(69590400006)(386003)(25786009)(305945005)(106356001)(76176011)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4965; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB4965; 23:O7My18EiOKBupotaW4q0Z2Lv0AeGLxXQaX3t3Z6k6?= Z0RrwOXT50+H5K/rZ8qmbVwwkBI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/zbeZwLcsnSD7W9V2ZOa/EizpHUrXUwjjTFIyBj/hL92/6qmuv8CpnNJ+18w==; 5:sXwkgzbSCPooM9V39NSRjGkcu12oP9P9545o/QlOGYn8d0rCocFotnPrdk5JnVcBp7O6QRzJ8TjgjHWO/k6myKvm2DBiX5mH4aFPdpaZJp7BCL78Kpkmf8Ot2xVTewXT8+ofYeQscMzWqPrtfDQk9f6/k89fucHnoSRksG+Rdnc=; 7:qDUGb9SguFZwiMwOJNQr6qG9eiNk68bmeHVe0aIQ0BBoVJ6rLF4p3J/4g8HLVCDH82OtghC+IPy503AIP6Nu1cC872QBHFvsFI+6sBlDPgwNhX4GHaYLuwvJU63EmzpwAfjjHicApvTznBBaMhJTiz7moSbsYRY1EW1IEg1kqCFjQzYpQpz3efPsTp8wlIWQAu62JuOBCHCPj5djmInUGnagY8DlH9h87taRsozftevcEgs4wszeeIAgV1m3E3Bj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2018 22:23:05.2499 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f1f1d153-8d81-4457-b73d-08d61e7e79da X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4965 Subject: [dpdk-dev] [PATCH v3 1/4] app/test-eventdev: fix minor typos X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fix minor typos. Fixes: 314bcf58ca8f ("app/eventdev: add pipeline queue worker functions") Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- v3 Changes: - Force all the ports to use the non-internal cap mode when we detect that one of the port doesn't have internal port capability. app/test-eventdev/test_pipeline_atq.c | 16 ++++++++-------- app/test-eventdev/test_pipeline_common.h | 8 ++++---- app/test-eventdev/test_pipeline_queue.c | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) -- 2.19.0 diff --git a/app/test-eventdev/test_pipeline_atq.c b/app/test-eventdev/test_pipeline_atq.c index 26dc79f90..f0b2f9015 100644 --- a/app/test-eventdev/test_pipeline_atq.c +++ b/app/test-eventdev/test_pipeline_atq.c @@ -18,7 +18,7 @@ pipeline_atq_nb_event_queues(struct evt_options *opt) static int pipeline_atq_worker_single_stage_tx(void *arg) { - PIPELINE_WROKER_SINGLE_STAGE_INIT; + PIPELINE_WORKER_SINGLE_STAGE_INIT; while (t->done == false) { uint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0); @@ -43,7 +43,7 @@ pipeline_atq_worker_single_stage_tx(void *arg) static int pipeline_atq_worker_single_stage_fwd(void *arg) { - PIPELINE_WROKER_SINGLE_STAGE_INIT; + PIPELINE_WORKER_SINGLE_STAGE_INIT; const uint8_t tx_queue = t->tx_service.queue_id; while (t->done == false) { @@ -66,7 +66,7 @@ pipeline_atq_worker_single_stage_fwd(void *arg) static int pipeline_atq_worker_single_stage_burst_tx(void *arg) { - PIPELINE_WROKER_SINGLE_STAGE_BURST_INIT; + PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT; while (t->done == false) { uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev, @@ -98,7 +98,7 @@ pipeline_atq_worker_single_stage_burst_tx(void *arg) static int pipeline_atq_worker_single_stage_burst_fwd(void *arg) { - PIPELINE_WROKER_SINGLE_STAGE_BURST_INIT; + PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT; const uint8_t tx_queue = t->tx_service.queue_id; while (t->done == false) { @@ -126,7 +126,7 @@ pipeline_atq_worker_single_stage_burst_fwd(void *arg) static int pipeline_atq_worker_multi_stage_tx(void *arg) { - PIPELINE_WROKER_MULTI_STAGE_INIT; + PIPELINE_WORKER_MULTI_STAGE_INIT; const uint8_t nb_stages = t->opt->nb_stages; @@ -161,7 +161,7 @@ pipeline_atq_worker_multi_stage_tx(void *arg) static int pipeline_atq_worker_multi_stage_fwd(void *arg) { - PIPELINE_WROKER_MULTI_STAGE_INIT; + PIPELINE_WORKER_MULTI_STAGE_INIT; const uint8_t nb_stages = t->opt->nb_stages; const uint8_t tx_queue = t->tx_service.queue_id; @@ -192,7 +192,7 @@ pipeline_atq_worker_multi_stage_fwd(void *arg) static int pipeline_atq_worker_multi_stage_burst_tx(void *arg) { - PIPELINE_WROKER_MULTI_STAGE_BURST_INIT; + PIPELINE_WORKER_MULTI_STAGE_BURST_INIT; const uint8_t nb_stages = t->opt->nb_stages; while (t->done == false) { @@ -234,7 +234,7 @@ pipeline_atq_worker_multi_stage_burst_tx(void *arg) static int pipeline_atq_worker_multi_stage_burst_fwd(void *arg) { - PIPELINE_WROKER_MULTI_STAGE_BURST_INIT; + PIPELINE_WORKER_MULTI_STAGE_BURST_INIT; const uint8_t nb_stages = t->opt->nb_stages; const uint8_t tx_queue = t->tx_service.queue_id; diff --git a/app/test-eventdev/test_pipeline_common.h b/app/test-eventdev/test_pipeline_common.h index 5fb91607d..9cd6b905b 100644 --- a/app/test-eventdev/test_pipeline_common.h +++ b/app/test-eventdev/test_pipeline_common.h @@ -65,14 +65,14 @@ struct test_pipeline { #define BURST_SIZE 16 -#define PIPELINE_WROKER_SINGLE_STAGE_INIT \ +#define PIPELINE_WORKER_SINGLE_STAGE_INIT \ struct worker_data *w = arg; \ struct test_pipeline *t = w->t; \ const uint8_t dev = w->dev_id; \ const uint8_t port = w->port_id; \ struct rte_event ev -#define PIPELINE_WROKER_SINGLE_STAGE_BURST_INIT \ +#define PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT \ int i; \ struct worker_data *w = arg; \ struct test_pipeline *t = w->t; \ @@ -80,7 +80,7 @@ struct test_pipeline { const uint8_t port = w->port_id; \ struct rte_event ev[BURST_SIZE + 1] -#define PIPELINE_WROKER_MULTI_STAGE_INIT \ +#define PIPELINE_WORKER_MULTI_STAGE_INIT \ struct worker_data *w = arg; \ struct test_pipeline *t = w->t; \ uint8_t cq_id; \ @@ -90,7 +90,7 @@ struct test_pipeline { uint8_t *const sched_type_list = &t->sched_type_list[0]; \ struct rte_event ev -#define PIPELINE_WROKER_MULTI_STAGE_BURST_INIT \ +#define PIPELINE_WORKER_MULTI_STAGE_BURST_INIT \ int i; \ struct worker_data *w = arg; \ struct test_pipeline *t = w->t; \ diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c index ca5f4578e..2e0d93d99 100644 --- a/app/test-eventdev/test_pipeline_queue.c +++ b/app/test-eventdev/test_pipeline_queue.c @@ -18,7 +18,7 @@ pipeline_queue_nb_event_queues(struct evt_options *opt) static int pipeline_queue_worker_single_stage_tx(void *arg) { - PIPELINE_WROKER_SINGLE_STAGE_INIT; + PIPELINE_WORKER_SINGLE_STAGE_INIT; while (t->done == false) { uint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0); @@ -44,7 +44,7 @@ pipeline_queue_worker_single_stage_tx(void *arg) static int pipeline_queue_worker_single_stage_fwd(void *arg) { - PIPELINE_WROKER_SINGLE_STAGE_INIT; + PIPELINE_WORKER_SINGLE_STAGE_INIT; const uint8_t tx_queue = t->tx_service.queue_id; while (t->done == false) { @@ -67,7 +67,7 @@ pipeline_queue_worker_single_stage_fwd(void *arg) static int pipeline_queue_worker_single_stage_burst_tx(void *arg) { - PIPELINE_WROKER_SINGLE_STAGE_BURST_INIT; + PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT; while (t->done == false) { uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev, @@ -101,7 +101,7 @@ pipeline_queue_worker_single_stage_burst_tx(void *arg) static int pipeline_queue_worker_single_stage_burst_fwd(void *arg) { - PIPELINE_WROKER_SINGLE_STAGE_BURST_INIT; + PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT; const uint8_t tx_queue = t->tx_service.queue_id; while (t->done == false) { @@ -130,7 +130,7 @@ pipeline_queue_worker_single_stage_burst_fwd(void *arg) static int pipeline_queue_worker_multi_stage_tx(void *arg) { - PIPELINE_WROKER_MULTI_STAGE_INIT; + PIPELINE_WORKER_MULTI_STAGE_INIT; const uint8_t nb_stages = t->opt->nb_stages + 1; while (t->done == false) { @@ -165,7 +165,7 @@ pipeline_queue_worker_multi_stage_tx(void *arg) static int pipeline_queue_worker_multi_stage_fwd(void *arg) { - PIPELINE_WROKER_MULTI_STAGE_INIT; + PIPELINE_WORKER_MULTI_STAGE_INIT; const uint8_t nb_stages = t->opt->nb_stages + 1; const uint8_t tx_queue = t->tx_service.queue_id; @@ -196,7 +196,7 @@ pipeline_queue_worker_multi_stage_fwd(void *arg) static int pipeline_queue_worker_multi_stage_burst_tx(void *arg) { - PIPELINE_WROKER_MULTI_STAGE_BURST_INIT; + PIPELINE_WORKER_MULTI_STAGE_BURST_INIT; const uint8_t nb_stages = t->opt->nb_stages + 1; while (t->done == false) { @@ -240,7 +240,7 @@ pipeline_queue_worker_multi_stage_burst_tx(void *arg) static int pipeline_queue_worker_multi_stage_burst_fwd(void *arg) { - PIPELINE_WROKER_MULTI_STAGE_BURST_INIT; + PIPELINE_WORKER_MULTI_STAGE_BURST_INIT; const uint8_t nb_stages = t->opt->nb_stages + 1; const uint8_t tx_queue = t->tx_service.queue_id; From patchwork Wed Sep 19 22:22:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh X-Patchwork-Id: 44985 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D0A211B140; Thu, 20 Sep 2018 00:23:14 +0200 (CEST) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0059.outbound.protection.outlook.com [104.47.33.59]) by dpdk.org (Postfix) with ESMTP id 0A5BE1B122 for ; Thu, 20 Sep 2018 00:23:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t9JR7VdPtKIv35qTLpxWLdnKer+JDerWd2lCduUQ/sM=; b=gljT7PcqMFFdHOMGPyL3626CtEJnpYX0SDgLLunJMu3IvcgJm14wpKuugrQf4goj6bP6it9hnoXRLrMOxI/s+VWwK6NwYCAbOPg4XWKYTjvL/FIKdzLHxzawhXCYivgcZNi5VmQmipSHHeTnJqZzOdw6AbOOS39eQfJoBveKBBE= Received: from localhost.localdomain (115.113.156.3) by BYAPR07MB4965.namprd07.prod.outlook.com (2603:10b6:a03:5b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Wed, 19 Sep 2018 22:23:08 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, nikhil.rao@intel.com, anoob.joseph@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Thu, 20 Sep 2018 03:52:33 +0530 Message-Id: <20180919222235.6239-2-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180919222235.6239-1-pbhagavatula@caviumnetworks.com> References: <20180904141223.24216-1-pbhagavatula@caviumnetworks.com> <20180919222235.6239-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: MA1PR0101CA0003.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::13) To BYAPR07MB4965.namprd07.prod.outlook.com (2603:10b6:a03:5b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e0ab6f39-657e-4899-7f40-08d61e7e7b47 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4965; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4965; 3:EPHsFkfqVYvc6W/LUXe18zO2zTfWBW3R6fI5v/D5l/Q/LPb2LG2j2sdJ5s0ljtFEBy29zTs4MGAw5iPNe27pxvcNJNf1R4Tbyki2aSAN+d5dQUJuno3B+lhdpYEtLq5dg/wunnDPYhtll/CF0xjbMYamcq29AHabqM9egq2fkMrUjJnnUajmi1t+V16aooFeepZt4yIjRtC845rYY+NQswmWFcufLT5qRb0xVgPe61mftOXnCR1rY+y13B1mifkD; 25:fUa1FjVDLYAhWhiBf4medKWhZA1NJNCApC6tYXJYVIiy1DEYNJKwSG5sE0MQXvSqJQXU7y8mjQ9d95TkdRrNUUCPEP909FxnhycYjqwVwnxgC1Zc7aOwLpvDZZ6HarKULZHsE5t9ISIQ0mWrQ11CxG4pfEbM9gNwBSlB/4Qdm322iga7miH2eoNtLJdpV412ptZrjLoU5qmswAoTU0kHyYqOdWOgZlHj9iTZHYyWEAK1v+E2+VjY0UwgRcu7f0PI/NR9hApL2CB2iDYxBd00GpJ9n0LFNIob+tn4B7KS5jDQBdvygHUCmvEPi2sEOhbnFkmanRpRNrojGFsoX78g9w==; 31:A8sdqtUGgt7ZsiTEfcYs6rEMZc1MAo9Ys067AJgDSobOPQo7HsSTsgUObBqeHIwVPilgnPZAINB05tq/LDelFTSx/k5YhvMLzcEd0xFRGYFNk14leuiSwdEYuXuEx1daIfJKsLEOF5cf62UeXGzB5Ta9K2p9SVoQGTbj8DD/m7Nek66NLo+Obyw4wPl3nQBR0Sbl8PGQZaEYz6vu31kekWFogEUpLSoVJ8lQA5CmKWo= X-MS-TrafficTypeDiagnostic: BYAPR07MB4965: X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4965; 20:Dc75g5RihmO3AFQxg92EVFmgZXHOGXiMj1Y1FEKLtvUoMzXChAkDP/nCpqXa4aAWh4BRx9KxqLqpy1uR18Da9h/DJMLyu/SzmBWIXC5vAQA+N+dhzjXmXf83eWyM7T6fow383FvJVN0PkhD2UY6Nrvu8dvUBPeFG11Et3SrtTwlLGLmSnPU7hbLJiIACsJGOr22OHwM78B+6NoaKUTRshifBMFNtKwMcns+099bHq5R5qMcObZhOcF95NQys6ilaskvHlMcbIaM5ElCOxk61OfXMR+6aFKzCkWUoajO8wurvZvTrwF5oN/RgGCNtVgmtfLuffWU5oMJsARwJmnr3TkFef2PJOjui2mJpNzRotnvulMJb/kG1Co28n0Gd31LJ26rD0XJ9E1xXDKN6MYsIr7+yK+vFy3xPEGB8gC7U2b6ZDNtq1evsdr5xNNg++IhL8YZO5MOoQ4iLzDipcgT6l/T/QaZrXSENvszRTKYaS2Bc3gjGJxY/B8+9A/gBn4E5a8c8z0p7Xh/dKwwtFbR1dzCWw6N0cuv3kCJ1koSt6uG++2L6aosYUS7LmmI8HyxDdnOtyjXSwauc0ODWeYHySr8FdkyYNmo41fEEaITfniI=; 4:kZABtlGoRHwL946Mmml0s81XMYVyMuyhgNG/oxsF1D403LfEkYQWsDb/GaZDb6VCmIXuoPkNAaBzMjkLog1w2RB4qGhdZdBP8IQilmEJQ2ZAAxe5v7v+lsgghJhCyA5kOAmfqiPzPTE8GskB0XhpKxf0QF0GbnkHx+ntYpGUOMKsJthAg89OYU9Axa6DtCwRv8kknhx4ylFXP7EpAQKiCjpdHtawzNrT532Q3+Qvkf+ZrbkmzmVmuFXB2SwwZKooziU1KLN8jlHnUUNw35OnjQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231355)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991041); SRVR:BYAPR07MB4965; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4965; X-Forefront-PRVS: 0800C0C167 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(51234002)(66066001)(6636002)(6512007)(81166006)(81156014)(6666003)(53936002)(48376002)(4326008)(1857600001)(316002)(50226002)(486006)(36756003)(8936002)(446003)(11346002)(16526019)(26005)(476003)(956004)(8676002)(2616005)(2906002)(42882007)(6346003)(5660300001)(68736007)(16586007)(97736004)(47776003)(7736002)(107886003)(6486002)(72206003)(478600001)(52116002)(105586002)(50466002)(51416003)(1076002)(3846002)(6506007)(6116002)(69590400006)(386003)(25786009)(305945005)(106356001)(76176011)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4965; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB4965; 23:JrJLR+DZgM/Bo9V6c0bcWtCcleeumRtm59Tq1urFB?= LF2bfWagNdsNQJI/PUg7wHBmkoR/fmd2qN+8TioYa3FR18SG64jNKTLPbMFSPKrTgRhgLhdEXjUnMydOu5VTVphPJzpq2VQn9/BCkj3TFe/VrxQ9BgR4NyO+n0wlvZQus0cQ0XpTUmNHyo7slVvu+DDodmq5T11GTh0Bv4Qz6HgX8tMttyynBjfyswBeDB0XobB0P0HY7vVmZA0xHogkMotFinCS9hCC4/YJ/1mAUOoaflqKhJ99Qr9NzCmpIZ/oihMnTKA07x4c+afyfNomXheuBWOm2l/pwdWNfCeSU+N1PMibftihwqpIsaSX8N20Lo0hbM14I+cQ4n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BaqbWz8S2w+SF9Gtv60FoYaKkb6I/7QDDl53c4GsT3WUsW6ZgMjQj8eX8GaGPFYNKETYizOd/gNrkviHUg264c/9+OdOeDbEYiQpZNQPPHg1xxuoxKZ8h0cC71araeqEp/uGZqcRAGXHBbEsZ2+/oD/I3QU30Vx50dSOj27eyqEOl SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2018 22:23:08.5624 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0ab6f39-657e-4899-7f40-08d61e7e7b47 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4965 Subject: [dpdk-dev] [PATCH v3 2/4] app/test-eventdev: remove redundant newlines X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- app/test-eventdev/test_pipeline_common.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index 12a58fbbf..cdf9010b4 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -65,12 +65,12 @@ pipeline_test_result(struct evt_test *test, struct evt_options *opt) uint64_t total = 0; struct test_pipeline *t = evt_test_priv(test); - printf("Packet distribution across worker cores :\n"); + evt_info("Packet distribution across worker cores :"); for (i = 0; i < t->nb_workers; i++) total += t->worker[i].processed_pkts; for (i = 0; i < t->nb_workers; i++) - printf("Worker %d packets: "CLGRN"%"PRIx64" "CLNRM"percentage:" - CLGRN" %3.2f\n"CLNRM, i, + evt_info("Worker %d packets: "CLGRN"%"PRIx64""CLNRM" percentage:" + CLGRN" %3.2f"CLNRM, i, t->worker[i].processed_pkts, (((double)t->worker[i].processed_pkts)/total) * 100); @@ -233,7 +233,7 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) RTE_SET_USED(opt); if (!rte_eth_dev_count_avail()) { - evt_err("No ethernet ports found.\n"); + evt_err("No ethernet ports found."); return -ENODEV; } @@ -252,7 +252,7 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) if (local_port_conf.rx_adv_conf.rss_conf.rss_hf != port_conf.rx_adv_conf.rss_conf.rss_hf) { evt_info("Port %u modified RSS hash function based on hardware support," - "requested:%#"PRIx64" configured:%#"PRIx64"\n", + "requested:%#"PRIx64" configured:%#"PRIx64"", i, port_conf.rx_adv_conf.rss_conf.rss_hf, local_port_conf.rx_adv_conf.rss_conf.rss_hf); @@ -261,19 +261,19 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) if (rte_eth_dev_configure(i, nb_queues, nb_queues, &local_port_conf) < 0) { - evt_err("Failed to configure eth port [%d]\n", i); + evt_err("Failed to configure eth port [%d]", i); return -EINVAL; } if (rte_eth_rx_queue_setup(i, 0, NB_RX_DESC, rte_socket_id(), &rx_conf, t->pool) < 0) { - evt_err("Failed to setup eth port [%d] rx_queue: %d.\n", + evt_err("Failed to setup eth port [%d] rx_queue: %d.", i, 0); return -EINVAL; } if (rte_eth_tx_queue_setup(i, 0, NB_TX_DESC, rte_socket_id(), NULL) < 0) { - evt_err("Failed to setup eth port [%d] tx_queue: %d.\n", + evt_err("Failed to setup eth port [%d] tx_queue: %d.", i, 0); return -EINVAL; } @@ -379,7 +379,7 @@ pipeline_event_rx_adapter_setup(struct evt_options *opt, uint8_t stride, ret = evt_service_setup(service_id); if (ret) { evt_err("Failed to setup service core" - " for Rx adapter\n"); + " for Rx adapter"); return ret; } } @@ -396,8 +396,7 @@ pipeline_event_rx_adapter_setup(struct evt_options *opt, uint8_t stride, evt_err("Rx adapter[%d] start failed", prod); return ret; } - printf("%s: Port[%d] using Rx adapter[%d] started\n", __func__, - prod, prod); + evt_info("Port[%d] using Rx adapter[%d] started", prod, prod); } return ret; From patchwork Wed Sep 19 22:22:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh X-Patchwork-Id: 44986 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C9F6F1B144; Thu, 20 Sep 2018 00:23:20 +0200 (CEST) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0058.outbound.protection.outlook.com [104.47.33.58]) by dpdk.org (Postfix) with ESMTP id 6910B1B13B for ; Thu, 20 Sep 2018 00:23:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mAk+3q6Z/6WeTIg6Nys4icAbhP/3AQpQB+LTMq6R+Ck=; b=hbLKicsPm9jiR41fU5iF42CZ3QGD30fRvqbEGWa0yBCm897S6jyay0ZZ9kFDn3XKSGqEUlBGs4swSHV5s0lf9+OZ5HOeOve0Zz2wqTRQl9veF6AGcWFcYbHv/osQRZ30qYZqU8hgtSxB5JmqjIUHxIglvTcwGszlbRE3qI22zaM= Received: from localhost.localdomain (115.113.156.3) by BYAPR07MB4965.namprd07.prod.outlook.com (2603:10b6:a03:5b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Wed, 19 Sep 2018 22:23:10 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, nikhil.rao@intel.com, anoob.joseph@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Thu, 20 Sep 2018 03:52:34 +0530 Message-Id: <20180919222235.6239-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180919222235.6239-1-pbhagavatula@caviumnetworks.com> References: <20180904141223.24216-1-pbhagavatula@caviumnetworks.com> <20180919222235.6239-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: MA1PR0101CA0003.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::13) To BYAPR07MB4965.namprd07.prod.outlook.com (2603:10b6:a03:5b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f8f354a8-3dc1-456d-d221-08d61e7e7c9e X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4965; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4965; 3:2K+wF4qc0Jg/oVGnL5mOFBk8Om29P2ZH2HlakoMdI9nU2irmcHPz5sNTB6ypzkIJEteKcqbpbQVJvPTveo5wD8X3hBcH1ortVrovMAd6camMWJa6iFZXfQrsg0jOav6AqlDaLE8v5QYpgWx1iUYhoCafh4SayDTV8KXrMT3zoifjR9H9TKnZByQcZ2G+43RGXKDZVrp0GgdDZcIu45zQNVY8x0uOL0/1twc5+QSnyrrAnd0srgN6MmKs2Fxsz81M; 25:VELPmH4sm9gcKPwPSDHZLv/Kqu2PyiaCk9gc2KNbNZoQwc1uMyvCj14NmeuAKYqDziWxgghxx24ELCRsh3+eGBUN6U9vdlRMgIjoIqxl1uorZ5ZxdOX4xEgySVsIgUOf8e0z90UFwpRpg1qSjCBjulXbj8P4xvOKs6zKFFNY7aqp66mRL9/jZo1FTC3rOWIW3u1y4QyHzZfmG2FUc9ALDo51jCaf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jcb4SweBnjTqT3miAOxO/o7V4Yp+3/OO0XzYZjvi8SQ2Wub2VvEXW8bWAblJJbvWUPakkTcIeFWP4ZAdvTi3laQ+fbbf4SiGjKhPXCMLsLKKteM0yArZCqS9r53ffMI6+VWk1ICAT6tya3uWJmNKLAiVdpop8fUHt9Yj/Gv14huQt6vlYsmBo55fP62Arn80Wc8GC3rDj2tRW9YxrTYzF3OTFCKl99hcD5tE4e+5ka7VV/ck+Ugh/3w8yCYK5GyA/02f9ZeKrH34p8UkVpuvFoRxZr7Bt91BDBX5sAtZe1Q5S43 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(21532816269658); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231355)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991041); SRVR:BYAPR07MB4965; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4965; X-Forefront-PRVS: 0800C0C167 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(66066001)(6636002)(575784001)(53946003)(6512007)(81166006)(81156014)(6666003)(53936002)(48376002)(4326008)(1857600001)(316002)(50226002)(486006)(36756003)(8936002)(446003)(11346002)(16526019)(26005)(476003)(956004)(8676002)(2616005)(2906002)(14444005)(42882007)(6346003)(5660300001)(68736007)(16586007)(97736004)(47776003)(7736002)(107886003)(6486002)(72206003)(478600001)(52116002)(105586002)(50466002)(51416003)(1076002)(3846002)(6506007)(6116002)(69590400006)(386003)(25786009)(305945005)(106356001)(76176011)(42262002)(579004); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4965; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB4965; 23:i4bXtuI5dNob7+yiVSyzy9xsIPucYvrmIU9W3avXc?= 5DtYqt82Skpk1M5DEt8yKD3vx8T9y9KRTwTnwHz9tN2ZlErJu1u8frNLGANgY5ynCkhz2NH7ATuY+AW+nqNXZI+/z6+W7lYHug8BP0OOcsTQETFn+h6pgw1Au3BEbtrOVdx49CdE8JGxVKKwEE/lOiDT+Vbagcf1eIrPkJRBWbo30wLCZz4CpTgZuIhBU3v1WCBoF1XPHbSXKJhQfn9W4qNhv6bbqB85aB9YWkeZn9JaVipvNiK0P6mWC/hmUebzZGnG7zKg1ZjevUKFCfVZauTPCpldQPuvD9mRy/CpshXavGeB22jNfaq4J5GXtXhFaI23It4QGP5JcaM/zCgDHWGPyiIwDZrcgELXZesIZfuRnHq3J+iRwguSoQm3+6doGGEQjPJ9UyLJ8x/Jo1zB+aIADRmOgErRp05WHIpJQLheapuMDVgVSRAg5wKn52APbhf1ShhRuqBWNV2k8JPJeP70lPIeDilHBikg1SIG1E2bPcCdoeRQE9Sl3/xsjRmG3tPImfmTtENomg443BVE8a7TrSI3U1UCdo9cqLxxJSd3NVbfDikFC7qyXNDeOdKJBbm9FXloY/HR2Tab8kGjPWummZVBfKHlQWA6JcRbvd/7fSQ9yUsXRevRvGvg0kzR+bOu9/3RHTcKvz453jLQ8KHmoEgaHi4YTwVGFKkPu4r2qB3YPLQMvuTiU2vMLDNFD+TbXPnAeaGjcDI6HXQpxQQJPlOu8Vliq1Jx1pROQsBatIUFJY/dfLoNBw2U/HS9HUUPNZK4b9JNV8IOnfOenoDDJ4twxQIznoy78wVqM5VgpMRqKnrHM4tXUPtanLFXoy0vcA6rzjstB0kcUkRaYlkBefuJlHC126vS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y8nHtsaxguJvTDZgiKoXmmQkPWWeB5uYk4qjVbbQDYXGxITBtN0pwDA0hqGVBKJGl/sVnR49EV0KQfjBvGyzkKy+eiYru/dv9K+zCiIbOry348Ld4wM6kGPJ6zVfJ0DAV/f4nNnM6CKUUhPIdxgWBMLYd0uG4us6r0vsKTDNatR0UiByVLqP9F5EfnFWg7yjvi6yGeza/EmFeKWaMLWf9B+jhVtER05ustPBUsdp2gS80Vm6jUlG+d5IUBGSuwVH9MqiFjLVbHMQHijfcdwMtQ+Xyzzp+cav/UDZL5tRp/SbM4hjrmfjJsSY0ZEg==; 5:LS9UwoMcvnQJmInr8McL3sFDoHjgzGD30Df/fx1bpcYEBt8FT6asEuohlpckCU+9jNlSGiVI7D/RFoRV45gZZc7dPX9moA2IkuS8GVrTEGPUV/BpqqL2bhlor/6f+Sg6FAoqiA0qVSu59SFWL8bOdfKrF2/jzrO+18gGCQY3NHg=; 7:oXlIRxZrjGJqh0CqjznwdWnbCFgqdIw99/gbT+mNx5+lZ/XBt7SbGU83B990MpwtkBAZ/vUDbRNoDHxAjfw951CXyOLWxXP5o7XBSuvlOgG+2vfKhMiFj8URDzJD1Tb15Lb836CNOlhuhD7jOhvztW8FbCM/OXWeY01DVvfCq1Nf1ZLRM/oA1+1UGwrT5WK+faDRyDY7N/lbx2SM4vg3ZxBrt472D0c6ofjdxN1qC8BFsrkCJ3uCyAENBB6WV9t1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2018 22:23:10.8124 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f8f354a8-3dc1-456d-d221-08d61e7e7c9e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4965 Subject: [dpdk-dev] [PATCH v3 3/4] app/test-eventdev: add Tx adapter support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Convert existing Tx service based pipeline to Tx adapter based APIs and simplify worker functions. Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- app/test-eventdev/test_pipeline_atq.c | 269 ++++++++++++----------- app/test-eventdev/test_pipeline_common.c | 202 +++++------------ app/test-eventdev/test_pipeline_common.h | 62 +++--- app/test-eventdev/test_pipeline_queue.c | 241 ++++++++++---------- 4 files changed, 363 insertions(+), 411 deletions(-) diff --git a/app/test-eventdev/test_pipeline_atq.c b/app/test-eventdev/test_pipeline_atq.c index f0b2f9015..01af298f3 100644 --- a/app/test-eventdev/test_pipeline_atq.c +++ b/app/test-eventdev/test_pipeline_atq.c @@ -15,7 +15,7 @@ pipeline_atq_nb_event_queues(struct evt_options *opt) return rte_eth_dev_count_avail(); } -static int +static __rte_noinline int pipeline_atq_worker_single_stage_tx(void *arg) { PIPELINE_WORKER_SINGLE_STAGE_INIT; @@ -28,23 +28,18 @@ pipeline_atq_worker_single_stage_tx(void *arg) continue; } - if (ev.sched_type == RTE_SCHED_TYPE_ATOMIC) { - pipeline_tx_pkt(ev.mbuf); - w->processed_pkts++; - continue; - } - pipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC); - pipeline_event_enqueue(dev, port, &ev); + pipeline_event_tx(dev, port, &ev); + w->processed_pkts++; } return 0; } -static int +static __rte_noinline int pipeline_atq_worker_single_stage_fwd(void *arg) { PIPELINE_WORKER_SINGLE_STAGE_INIT; - const uint8_t tx_queue = t->tx_service.queue_id; + const uint8_t *tx_queue = t->tx_evqueue_id; while (t->done == false) { uint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0); @@ -54,16 +49,16 @@ pipeline_atq_worker_single_stage_fwd(void *arg) continue; } - w->processed_pkts++; - ev.queue_id = tx_queue; + ev.queue_id = tx_queue[ev.mbuf->port]; pipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC); pipeline_event_enqueue(dev, port, &ev); + w->processed_pkts++; } return 0; } -static int +static __rte_noinline int pipeline_atq_worker_single_stage_burst_tx(void *arg) { PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT; @@ -79,27 +74,21 @@ pipeline_atq_worker_single_stage_burst_tx(void *arg) for (i = 0; i < nb_rx; i++) { rte_prefetch0(ev[i + 1].mbuf); - if (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) { - - pipeline_tx_pkt(ev[i].mbuf); - ev[i].op = RTE_EVENT_OP_RELEASE; - w->processed_pkts++; - } else - pipeline_fwd_event(&ev[i], - RTE_SCHED_TYPE_ATOMIC); + rte_event_eth_tx_adapter_txq_set(ev[i].mbuf, 0); } - pipeline_event_enqueue_burst(dev, port, ev, nb_rx); + pipeline_event_tx_burst(dev, port, ev, nb_rx); + w->processed_pkts += nb_rx; } return 0; } -static int +static __rte_noinline int pipeline_atq_worker_single_stage_burst_fwd(void *arg) { PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT; - const uint8_t tx_queue = t->tx_service.queue_id; + const uint8_t *tx_queue = t->tx_evqueue_id; while (t->done == false) { uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev, @@ -112,23 +101,22 @@ pipeline_atq_worker_single_stage_burst_fwd(void *arg) for (i = 0; i < nb_rx; i++) { rte_prefetch0(ev[i + 1].mbuf); - ev[i].queue_id = tx_queue; + rte_event_eth_tx_adapter_txq_set(ev[i].mbuf, 0); + ev[i].queue_id = tx_queue[ev[i].mbuf->port]; pipeline_fwd_event(&ev[i], RTE_SCHED_TYPE_ATOMIC); - w->processed_pkts++; } pipeline_event_enqueue_burst(dev, port, ev, nb_rx); + w->processed_pkts += nb_rx; } return 0; } -static int +static __rte_noinline int pipeline_atq_worker_multi_stage_tx(void *arg) { PIPELINE_WORKER_MULTI_STAGE_INIT; - const uint8_t nb_stages = t->opt->nb_stages; - while (t->done == false) { uint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0); @@ -141,29 +129,24 @@ pipeline_atq_worker_multi_stage_tx(void *arg) cq_id = ev.sub_event_type % nb_stages; if (cq_id == last_queue) { - if (ev.sched_type == RTE_SCHED_TYPE_ATOMIC) { - - pipeline_tx_pkt(ev.mbuf); - w->processed_pkts++; - continue; - } - pipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC); - } else { - ev.sub_event_type++; - pipeline_fwd_event(&ev, sched_type_list[cq_id]); + pipeline_event_tx(dev, port, &ev); + w->processed_pkts++; + continue; } + ev.sub_event_type++; + pipeline_fwd_event(&ev, sched_type_list[cq_id]); pipeline_event_enqueue(dev, port, &ev); } + return 0; } -static int +static __rte_noinline int pipeline_atq_worker_multi_stage_fwd(void *arg) { PIPELINE_WORKER_MULTI_STAGE_INIT; - const uint8_t nb_stages = t->opt->nb_stages; - const uint8_t tx_queue = t->tx_service.queue_id; + const uint8_t *tx_queue = t->tx_evqueue_id; while (t->done == false) { uint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0); @@ -176,9 +159,9 @@ pipeline_atq_worker_multi_stage_fwd(void *arg) cq_id = ev.sub_event_type % nb_stages; if (cq_id == last_queue) { - w->processed_pkts++; - ev.queue_id = tx_queue; + ev.queue_id = tx_queue[ev.mbuf->port]; pipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC); + w->processed_pkts++; } else { ev.sub_event_type++; pipeline_fwd_event(&ev, sched_type_list[cq_id]); @@ -186,14 +169,14 @@ pipeline_atq_worker_multi_stage_fwd(void *arg) pipeline_event_enqueue(dev, port, &ev); } + return 0; } -static int +static __rte_noinline int pipeline_atq_worker_multi_stage_burst_tx(void *arg) { PIPELINE_WORKER_MULTI_STAGE_BURST_INIT; - const uint8_t nb_stages = t->opt->nb_stages; while (t->done == false) { uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev, @@ -209,34 +192,27 @@ pipeline_atq_worker_multi_stage_burst_tx(void *arg) cq_id = ev[i].sub_event_type % nb_stages; if (cq_id == last_queue) { - if (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) { - - pipeline_tx_pkt(ev[i].mbuf); - ev[i].op = RTE_EVENT_OP_RELEASE; - w->processed_pkts++; - continue; - } - - pipeline_fwd_event(&ev[i], - RTE_SCHED_TYPE_ATOMIC); - } else { - ev[i].sub_event_type++; - pipeline_fwd_event(&ev[i], - sched_type_list[cq_id]); + pipeline_event_tx(dev, port, &ev[i]); + ev[i].op = RTE_EVENT_OP_RELEASE; + w->processed_pkts++; + continue; } + + ev[i].sub_event_type++; + pipeline_fwd_event(&ev[i], sched_type_list[cq_id]); } pipeline_event_enqueue_burst(dev, port, ev, nb_rx); } + return 0; } -static int +static __rte_noinline int pipeline_atq_worker_multi_stage_burst_fwd(void *arg) { PIPELINE_WORKER_MULTI_STAGE_BURST_INIT; - const uint8_t nb_stages = t->opt->nb_stages; - const uint8_t tx_queue = t->tx_service.queue_id; + const uint8_t *tx_queue = t->tx_evqueue_id; while (t->done == false) { uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev, @@ -253,7 +229,7 @@ pipeline_atq_worker_multi_stage_burst_fwd(void *arg) if (cq_id == last_queue) { w->processed_pkts++; - ev[i].queue_id = tx_queue; + ev[i].queue_id = tx_queue[ev[i].mbuf->port]; pipeline_fwd_event(&ev[i], RTE_SCHED_TYPE_ATOMIC); } else { @@ -265,6 +241,7 @@ pipeline_atq_worker_multi_stage_burst_fwd(void *arg) pipeline_event_enqueue_burst(dev, port, ev, nb_rx); } + return 0; } @@ -274,39 +251,36 @@ worker_wrapper(void *arg) struct worker_data *w = arg; struct evt_options *opt = w->t->opt; const bool burst = evt_has_burst_mode(w->dev_id); - const bool mt_safe = !w->t->mt_unsafe; + const bool internal_port = w->t->internal_port; const uint8_t nb_stages = opt->nb_stages; RTE_SET_USED(opt); if (nb_stages == 1) { - if (!burst && mt_safe) + if (!burst && internal_port) return pipeline_atq_worker_single_stage_tx(arg); - else if (!burst && !mt_safe) + else if (!burst && !internal_port) return pipeline_atq_worker_single_stage_fwd(arg); - else if (burst && mt_safe) + else if (burst && internal_port) return pipeline_atq_worker_single_stage_burst_tx(arg); - else if (burst && !mt_safe) + else if (burst && !internal_port) return pipeline_atq_worker_single_stage_burst_fwd(arg); } else { - if (!burst && mt_safe) + if (!burst && internal_port) return pipeline_atq_worker_multi_stage_tx(arg); - else if (!burst && !mt_safe) + else if (!burst && !internal_port) return pipeline_atq_worker_multi_stage_fwd(arg); - if (burst && mt_safe) + if (burst && internal_port) return pipeline_atq_worker_multi_stage_burst_tx(arg); - else if (burst && !mt_safe) + else if (burst && !internal_port) return pipeline_atq_worker_multi_stage_burst_fwd(arg); } + rte_panic("invalid worker\n"); } static int pipeline_atq_launch_lcores(struct evt_test *test, struct evt_options *opt) { - struct test_pipeline *t = evt_test_priv(test); - - if (t->mt_unsafe) - rte_service_component_runstate_set(t->tx_service.service_id, 1); return pipeline_launch_lcores(test, opt, worker_wrapper); } @@ -317,34 +291,36 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) int nb_ports; int nb_queues; uint8_t queue; - struct rte_event_dev_info info; - struct test_pipeline *t = evt_test_priv(test); - uint8_t tx_evqueue_id = 0; + uint8_t tx_evqueue_id[RTE_MAX_ETHPORTS] = {0}; uint8_t queue_arr[RTE_EVENT_MAX_QUEUES_PER_DEV]; uint8_t nb_worker_queues = 0; + uint8_t tx_evport_id = 0; + uint16_t prod = 0; + struct rte_event_dev_info info; + struct test_pipeline *t = evt_test_priv(test); nb_ports = evt_nr_active_lcores(opt->wlcores); nb_queues = rte_eth_dev_count_avail(); - /* One extra port and queueu for Tx service */ - if (t->mt_unsafe) { - tx_evqueue_id = nb_queues; - nb_ports++; - nb_queues++; + /* One queue for Tx adapter per port */ + if (!t->internal_port) { + RTE_ETH_FOREACH_DEV(prod) { + tx_evqueue_id[prod] = nb_queues; + nb_queues++; + } } - rte_event_dev_info_get(opt->dev_id, &info); const struct rte_event_dev_config config = { - .nb_event_queues = nb_queues, - .nb_event_ports = nb_ports, - .nb_events_limit = info.max_num_events, - .nb_event_queue_flows = opt->nb_flows, - .nb_event_port_dequeue_depth = - info.max_event_port_dequeue_depth, - .nb_event_port_enqueue_depth = - info.max_event_port_enqueue_depth, + .nb_event_queues = nb_queues, + .nb_event_ports = nb_ports, + .nb_events_limit = info.max_num_events, + .nb_event_queue_flows = opt->nb_flows, + .nb_event_port_dequeue_depth = + info.max_event_port_dequeue_depth, + .nb_event_port_enqueue_depth = + info.max_event_port_enqueue_depth, }; ret = rte_event_dev_configure(opt->dev_id, &config); if (ret) { @@ -353,21 +329,23 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) } struct rte_event_queue_conf q_conf = { - .priority = RTE_EVENT_DEV_PRIORITY_NORMAL, - .nb_atomic_flows = opt->nb_flows, - .nb_atomic_order_sequences = opt->nb_flows, + .priority = RTE_EVENT_DEV_PRIORITY_NORMAL, + .nb_atomic_flows = opt->nb_flows, + .nb_atomic_order_sequences = opt->nb_flows, }; /* queue configurations */ for (queue = 0; queue < nb_queues; queue++) { q_conf.event_queue_cfg = RTE_EVENT_QUEUE_CFG_ALL_TYPES; - if (t->mt_unsafe) { - if (queue == tx_evqueue_id) { - q_conf.event_queue_cfg = - RTE_EVENT_QUEUE_CFG_SINGLE_LINK; - } else { - queue_arr[nb_worker_queues] = queue; - nb_worker_queues++; + if (!t->internal_port) { + RTE_ETH_FOREACH_DEV(prod) { + if (queue == tx_evqueue_id[prod]) { + q_conf.event_queue_cfg = + RTE_EVENT_QUEUE_CFG_SINGLE_LINK; + } else { + queue_arr[nb_worker_queues] = queue; + nb_worker_queues++; + } } } @@ -383,20 +361,15 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) /* port configuration */ const struct rte_event_port_conf p_conf = { - .dequeue_depth = opt->wkr_deq_dep, - .enqueue_depth = info.max_event_port_dequeue_depth, - .new_event_threshold = info.max_num_events, + .dequeue_depth = opt->wkr_deq_dep, + .enqueue_depth = info.max_event_port_dequeue_depth, + .new_event_threshold = info.max_num_events, }; - if (t->mt_unsafe) { + if (!t->internal_port) ret = pipeline_event_port_setup(test, opt, queue_arr, nb_worker_queues, p_conf); - if (ret) - return ret; - - ret = pipeline_event_tx_service_setup(test, opt, tx_evqueue_id, - nb_ports - 1, p_conf); - } else + else ret = pipeline_event_port_setup(test, opt, NULL, nb_queues, p_conf); @@ -408,30 +381,32 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) * * eth_dev_count = 2, nb_stages = 2, atq mode * - * Multi thread safe : + * eth0, eth1 have Internal port capability : * queues = 2 * stride = 1 * * event queue pipelines: - * eth0 -> q0 ->tx - * eth1 -> q1 ->tx + * eth0 -> q0 ->Tx + * eth1 -> q1 ->Tx * * q0, q1 are configured as ATQ so, all the different stages can * be enqueued on the same queue. * - * Multi thread unsafe : - * queues = 3 + * eth0, eth1 use Tx adapters service core : + * queues = 4 * stride = 1 * * event queue pipelines: - * eth0 -> q0 - * } (q3->tx) Tx service - * eth1 -> q1 + * eth0 -> q0 -> q2 -> Tx + * eth1 -> q1 -> q3 -> Tx * - * q0,q1 are configured as stated above. - * q3 configured as SINGLE_LINK|ATOMIC. + * q0, q1 are configured as stated above. + * q2, q3 configured as SINGLE_LINK. */ ret = pipeline_event_rx_adapter_setup(opt, 1, p_conf); + if (ret) + return ret; + ret = pipeline_event_tx_adapter_setup(opt, p_conf); if (ret) return ret; @@ -445,12 +420,58 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) } } + /* Connect the tx_evqueue_id to the Tx adapter port */ + if (!t->internal_port) { + RTE_ETH_FOREACH_DEV(prod) { + ret = rte_event_eth_tx_adapter_event_port_get(prod, + &tx_evport_id); + if (ret) { + evt_err("Unable to get Tx adapter[%d]", prod); + return ret; + } + + if (rte_event_port_link(opt->dev_id, tx_evport_id, + &tx_evqueue_id[prod], + NULL, 1) != 1) { + evt_err("Unable to link Tx adptr[%d] evprt[%d]", + prod, tx_evport_id); + return ret; + } + } + } + + RTE_ETH_FOREACH_DEV(prod) { + ret = rte_eth_dev_start(prod); + if (ret) { + evt_err("Ethernet dev [%d] failed to start." + " Using synthetic producer", prod); + return ret; + } + } + ret = rte_event_dev_start(opt->dev_id); if (ret) { evt_err("failed to start eventdev %d", opt->dev_id); return ret; } + RTE_ETH_FOREACH_DEV(prod) { + ret = rte_event_eth_rx_adapter_start(prod); + if (ret) { + evt_err("Rx adapter[%d] start failed", prod); + return ret; + } + + ret = rte_event_eth_tx_adapter_start(prod); + if (ret) { + evt_err("Tx adapter[%d] start failed", prod); + return ret; + } + } + + memcpy(t->tx_evqueue_id, tx_evqueue_id, sizeof(uint8_t) * + RTE_MAX_ETHPORTS); + return 0; } diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index cdf9010b4..398b0010e 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -5,58 +5,6 @@ #include "test_pipeline_common.h" -static int32_t -pipeline_event_tx_burst_service_func(void *args) -{ - - int i; - struct tx_service_data *tx = args; - const uint8_t dev = tx->dev_id; - const uint8_t port = tx->port_id; - struct rte_event ev[BURST_SIZE + 1]; - - uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev, BURST_SIZE, 0); - - if (!nb_rx) { - for (i = 0; i < tx->nb_ethports; i++) - rte_eth_tx_buffer_flush(i, 0, tx->tx_buf[i]); - return 0; - } - - for (i = 0; i < nb_rx; i++) { - struct rte_mbuf *m = ev[i].mbuf; - rte_eth_tx_buffer(m->port, 0, tx->tx_buf[m->port], m); - } - tx->processed_pkts += nb_rx; - - return 0; -} - -static int32_t -pipeline_event_tx_service_func(void *args) -{ - - int i; - struct tx_service_data *tx = args; - const uint8_t dev = tx->dev_id; - const uint8_t port = tx->port_id; - struct rte_event ev; - - uint16_t nb_rx = rte_event_dequeue_burst(dev, port, &ev, 1, 0); - - if (!nb_rx) { - for (i = 0; i < tx->nb_ethports; i++) - rte_eth_tx_buffer_flush(i, 0, tx->tx_buf[i]); - return 0; - } - - struct rte_mbuf *m = ev.mbuf; - rte_eth_tx_buffer(m->port, 0, tx->tx_buf[m->port], m); - tx->processed_pkts++; - - return 0; -} - int pipeline_test_result(struct evt_test *test, struct evt_options *opt) { @@ -97,11 +45,8 @@ processed_pkts(struct test_pipeline *t) uint64_t total = 0; rte_smp_rmb(); - if (t->mt_unsafe) - total = t->tx_service.processed_pkts; - else - for (i = 0; i < t->nb_workers; i++) - total += t->worker[i].processed_pkts; + for (i = 0; i < t->nb_workers; i++) + total += t->worker[i].processed_pkts; return total; } @@ -215,7 +160,6 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) { uint16_t i; uint8_t nb_queues = 1; - uint8_t mt_state = 0; struct test_pipeline *t = evt_test_priv(test); struct rte_eth_rxconf rx_conf; struct rte_eth_conf port_conf = { @@ -237,13 +181,17 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) return -ENODEV; } + t->internal_port = 1; RTE_ETH_FOREACH_DEV(i) { struct rte_eth_dev_info dev_info; struct rte_eth_conf local_port_conf = port_conf; + uint32_t caps = 0; + + rte_event_eth_tx_adapter_caps_get(opt->dev_id, i, &caps); + if (!(caps & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) + t->internal_port = 0; rte_eth_dev_info_get(i, &dev_info); - mt_state = !(dev_info.tx_offload_capa & - DEV_TX_OFFLOAD_MT_LOCKFREE); rx_conf = dev_info.default_rxconf; rx_conf.offloads = port_conf.rxmode.offloads; @@ -278,11 +226,6 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) return -EINVAL; } - t->mt_unsafe |= mt_state; - t->tx_service.tx_buf[i] = - rte_malloc(NULL, RTE_ETH_TX_BUFFER_SIZE(BURST_SIZE), 0); - if (t->tx_service.tx_buf[i] == NULL) - rte_panic("Unable to allocate Tx buffer memory."); rte_eth_promiscuous_enable(i); } @@ -294,7 +237,6 @@ pipeline_event_port_setup(struct evt_test *test, struct evt_options *opt, uint8_t *queue_arr, uint8_t nb_queues, const struct rte_event_port_conf p_conf) { - int i; int ret; uint8_t port; struct test_pipeline *t = evt_test_priv(test); @@ -315,23 +257,15 @@ pipeline_event_port_setup(struct evt_test *test, struct evt_options *opt, return ret; } - if (queue_arr == NULL) { - if (rte_event_port_link(opt->dev_id, port, NULL, NULL, - 0) != nb_queues) - goto link_fail; - } else { - for (i = 0; i < nb_queues; i++) { - if (rte_event_port_link(opt->dev_id, port, - &queue_arr[i], NULL, 1) != 1) - goto link_fail; - } - } + if (rte_event_port_link(opt->dev_id, port, queue_arr, NULL, + nb_queues) != nb_queues) + goto link_fail; } return 0; link_fail: - evt_err("failed to link all queues to port %d", port); + evt_err("failed to link queues to port %d", port); return -EINVAL; } @@ -384,79 +318,64 @@ pipeline_event_rx_adapter_setup(struct evt_options *opt, uint8_t stride, } } - ret = rte_eth_dev_start(prod); - if (ret) { - evt_err("Ethernet dev [%d] failed to start." - " Using synthetic producer", prod); - return ret; - } - - ret = rte_event_eth_rx_adapter_start(prod); - if (ret) { - evt_err("Rx adapter[%d] start failed", prod); - return ret; - } - evt_info("Port[%d] using Rx adapter[%d] started", prod, prod); + evt_info("Port[%d] using Rx adapter[%d] configured", prod, + prod); } return ret; } int -pipeline_event_tx_service_setup(struct evt_test *test, struct evt_options *opt, - uint8_t tx_queue_id, uint8_t tx_port_id, - const struct rte_event_port_conf p_conf) +pipeline_event_tx_adapter_setup(struct evt_options *opt, + struct rte_event_port_conf port_conf) { - int ret; - struct rte_service_spec serv; - struct test_pipeline *t = evt_test_priv(test); - struct tx_service_data *tx = &t->tx_service; + int ret = 0; + uint16_t consm = 0; - ret = rte_event_port_setup(opt->dev_id, tx_port_id, &p_conf); - if (ret) { - evt_err("failed to setup port %d", tx_port_id); - return ret; - } + RTE_ETH_FOREACH_DEV(consm) { + uint32_t cap; - if (rte_event_port_link(opt->dev_id, tx_port_id, &tx_queue_id, - NULL, 1) != 1) { - evt_err("failed to link queues to port %d", tx_port_id); - return -EINVAL; - } + ret = rte_event_eth_tx_adapter_caps_get(opt->dev_id, + consm, &cap); + if (ret) { + evt_err("failed to get event tx adapter[%d] caps", + consm); + return ret; + } - tx->dev_id = opt->dev_id; - tx->queue_id = tx_queue_id; - tx->port_id = tx_port_id; - tx->nb_ethports = rte_eth_dev_count_avail(); - tx->t = t; - - /* Register Tx service */ - memset(&serv, 0, sizeof(struct rte_service_spec)); - snprintf(serv.name, sizeof(serv.name), "Tx_service"); - - if (evt_has_burst_mode(opt->dev_id)) - serv.callback = pipeline_event_tx_burst_service_func; - else - serv.callback = pipeline_event_tx_service_func; - - serv.callback_userdata = (void *)tx; - ret = rte_service_component_register(&serv, &tx->service_id); - if (ret) { - evt_err("failed to register Tx service"); - return ret; - } + ret = rte_event_eth_tx_adapter_create(consm, opt->dev_id, + &port_conf); + if (ret) { + evt_err("failed to create tx adapter[%d]", consm); + return ret; + } - ret = evt_service_setup(tx->service_id); - if (ret) { - evt_err("Failed to setup service core for Tx service\n"); - return ret; - } + ret = rte_event_eth_tx_adapter_queue_add(consm, consm, -1); + if (ret) { + evt_err("failed to add tx queues to adapter[%d]", + consm); + return ret; + } - rte_service_runstate_set(tx->service_id, 1); + if (!(cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) { + uint32_t service_id; - return 0; -} + rte_event_eth_tx_adapter_service_id_get(consm, + &service_id); + ret = evt_service_setup(service_id); + if (ret) { + evt_err("Failed to setup service core" + " for Tx adapter\n"); + return ret; + } + } + + evt_info("Port[%d] using Tx adapter[%d] Configured", consm, + consm); + } + return ret; +} void pipeline_ethdev_destroy(struct evt_test *test, struct evt_options *opt) @@ -464,16 +383,10 @@ pipeline_ethdev_destroy(struct evt_test *test, struct evt_options *opt) uint16_t i; RTE_SET_USED(test); RTE_SET_USED(opt); - struct test_pipeline *t = evt_test_priv(test); - - if (t->mt_unsafe) { - rte_service_component_runstate_set(t->tx_service.service_id, 0); - rte_service_runstate_set(t->tx_service.service_id, 0); - rte_service_component_unregister(t->tx_service.service_id); - } RTE_ETH_FOREACH_DEV(i) { rte_event_eth_rx_adapter_stop(i); + rte_event_eth_tx_adapter_stop(i); rte_eth_dev_stop(i); } } @@ -483,7 +396,6 @@ pipeline_eventdev_destroy(struct evt_test *test, struct evt_options *opt) { RTE_SET_USED(test); - rte_event_dev_stop(opt->dev_id); rte_event_dev_close(opt->dev_id); } diff --git a/app/test-eventdev/test_pipeline_common.h b/app/test-eventdev/test_pipeline_common.h index 9cd6b905b..0440b9e29 100644 --- a/app/test-eventdev/test_pipeline_common.h +++ b/app/test-eventdev/test_pipeline_common.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -35,30 +36,19 @@ struct worker_data { struct test_pipeline *t; } __rte_cache_aligned; -struct tx_service_data { - uint8_t dev_id; - uint8_t queue_id; - uint8_t port_id; - uint32_t service_id; - uint64_t processed_pkts; - uint16_t nb_ethports; - struct rte_eth_dev_tx_buffer *tx_buf[RTE_MAX_ETHPORTS]; - struct test_pipeline *t; -} __rte_cache_aligned; - struct test_pipeline { /* Don't change the offset of "done". Signal handler use this memory * to terminate all lcores work. */ int done; uint8_t nb_workers; - uint8_t mt_unsafe; + uint8_t internal_port; + uint8_t tx_evqueue_id[RTE_MAX_ETHPORTS]; enum evt_test_result result; uint32_t nb_flows; uint64_t outstand_pkts; struct rte_mempool *pool; struct worker_data worker[EVT_MAX_PORTS]; - struct tx_service_data tx_service; struct evt_options *opt; uint8_t sched_type_list[EVT_MAX_STAGES] __rte_cache_aligned; } __rte_cache_aligned; @@ -70,7 +60,7 @@ struct test_pipeline { struct test_pipeline *t = w->t; \ const uint8_t dev = w->dev_id; \ const uint8_t port = w->port_id; \ - struct rte_event ev + struct rte_event ev __rte_cache_aligned #define PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT \ int i; \ @@ -78,7 +68,7 @@ struct test_pipeline { struct test_pipeline *t = w->t; \ const uint8_t dev = w->dev_id; \ const uint8_t port = w->port_id; \ - struct rte_event ev[BURST_SIZE + 1] + struct rte_event ev[BURST_SIZE + 1] __rte_cache_aligned #define PIPELINE_WORKER_MULTI_STAGE_INIT \ struct worker_data *w = arg; \ @@ -88,10 +78,11 @@ struct test_pipeline { const uint8_t port = w->port_id; \ const uint8_t last_queue = t->opt->nb_stages - 1; \ uint8_t *const sched_type_list = &t->sched_type_list[0]; \ - struct rte_event ev + const uint8_t nb_stages = t->opt->nb_stages + 1; \ + struct rte_event ev __rte_cache_aligned #define PIPELINE_WORKER_MULTI_STAGE_BURST_INIT \ - int i; \ + int i; \ struct worker_data *w = arg; \ struct test_pipeline *t = w->t; \ uint8_t cq_id; \ @@ -99,7 +90,8 @@ struct test_pipeline { const uint8_t port = w->port_id; \ const uint8_t last_queue = t->opt->nb_stages - 1; \ uint8_t *const sched_type_list = &t->sched_type_list[0]; \ - struct rte_event ev[BURST_SIZE + 1] + const uint8_t nb_stages = t->opt->nb_stages + 1; \ + struct rte_event ev[BURST_SIZE + 1] __rte_cache_aligned static __rte_always_inline void pipeline_fwd_event(struct rte_event *ev, uint8_t sched) @@ -109,6 +101,28 @@ pipeline_fwd_event(struct rte_event *ev, uint8_t sched) ev->sched_type = sched; } +static __rte_always_inline void +pipeline_event_tx(const uint8_t dev, const uint8_t port, + struct rte_event * const ev) +{ + rte_event_eth_tx_adapter_txq_set(ev->mbuf, 0); + while (!rte_event_eth_tx_adapter_enqueue(dev, port, ev, 1)) + rte_pause(); +} + +static __rte_always_inline void +pipeline_event_tx_burst(const uint8_t dev, const uint8_t port, + struct rte_event *ev, const uint16_t nb_rx) +{ + uint16_t enq; + + enq = rte_event_eth_tx_adapter_enqueue(dev, port, ev, nb_rx); + while (enq < nb_rx) { + enq += rte_event_eth_tx_adapter_enqueue(dev, port, + ev + enq, nb_rx - enq); + } +} + static __rte_always_inline void pipeline_event_enqueue(const uint8_t dev, const uint8_t port, struct rte_event *ev) @@ -130,13 +144,6 @@ pipeline_event_enqueue_burst(const uint8_t dev, const uint8_t port, } } -static __rte_always_inline void -pipeline_tx_pkt(struct rte_mbuf *mbuf) -{ - while (rte_eth_tx_burst(mbuf->port, 0, &mbuf, 1) != 1) - rte_pause(); -} - static inline int pipeline_nb_event_ports(struct evt_options *opt) { @@ -149,9 +156,8 @@ int pipeline_test_setup(struct evt_test *test, struct evt_options *opt); int pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt); int pipeline_event_rx_adapter_setup(struct evt_options *opt, uint8_t stride, struct rte_event_port_conf prod_conf); -int pipeline_event_tx_service_setup(struct evt_test *test, - struct evt_options *opt, uint8_t tx_queue_id, - uint8_t tx_port_id, const struct rte_event_port_conf p_conf); +int pipeline_event_tx_adapter_setup(struct evt_options *opt, + struct rte_event_port_conf prod_conf); int pipeline_mempool_setup(struct evt_test *test, struct evt_options *opt); int pipeline_event_port_setup(struct evt_test *test, struct evt_options *opt, uint8_t *queue_arr, uint8_t nb_queues, diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c index 2e0d93d99..1156c2555 100644 --- a/app/test-eventdev/test_pipeline_queue.c +++ b/app/test-eventdev/test_pipeline_queue.c @@ -15,7 +15,7 @@ pipeline_queue_nb_event_queues(struct evt_options *opt) return (eth_count * opt->nb_stages) + eth_count; } -static int +static __rte_noinline int pipeline_queue_worker_single_stage_tx(void *arg) { PIPELINE_WORKER_SINGLE_STAGE_INIT; @@ -29,7 +29,7 @@ pipeline_queue_worker_single_stage_tx(void *arg) } if (ev.sched_type == RTE_SCHED_TYPE_ATOMIC) { - pipeline_tx_pkt(ev.mbuf); + pipeline_event_tx(dev, port, &ev); w->processed_pkts++; } else { ev.queue_id++; @@ -41,11 +41,11 @@ pipeline_queue_worker_single_stage_tx(void *arg) return 0; } -static int +static __rte_noinline int pipeline_queue_worker_single_stage_fwd(void *arg) { PIPELINE_WORKER_SINGLE_STAGE_INIT; - const uint8_t tx_queue = t->tx_service.queue_id; + const uint8_t *tx_queue = t->tx_evqueue_id; while (t->done == false) { uint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0); @@ -55,7 +55,8 @@ pipeline_queue_worker_single_stage_fwd(void *arg) continue; } - ev.queue_id = tx_queue; + ev.queue_id = tx_queue[ev.mbuf->port]; + rte_event_eth_tx_adapter_txq_set(ev.mbuf, 0); pipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC); pipeline_event_enqueue(dev, port, &ev); w->processed_pkts++; @@ -64,7 +65,7 @@ pipeline_queue_worker_single_stage_fwd(void *arg) return 0; } -static int +static __rte_noinline int pipeline_queue_worker_single_stage_burst_tx(void *arg) { PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT; @@ -81,8 +82,7 @@ pipeline_queue_worker_single_stage_burst_tx(void *arg) for (i = 0; i < nb_rx; i++) { rte_prefetch0(ev[i + 1].mbuf); if (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) { - - pipeline_tx_pkt(ev[i].mbuf); + pipeline_event_tx(dev, port, &ev[i]); ev[i].op = RTE_EVENT_OP_RELEASE; w->processed_pkts++; } else { @@ -98,11 +98,11 @@ pipeline_queue_worker_single_stage_burst_tx(void *arg) return 0; } -static int +static __rte_noinline int pipeline_queue_worker_single_stage_burst_fwd(void *arg) { PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT; - const uint8_t tx_queue = t->tx_service.queue_id; + const uint8_t *tx_queue = t->tx_evqueue_id; while (t->done == false) { uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev, @@ -115,23 +115,24 @@ pipeline_queue_worker_single_stage_burst_fwd(void *arg) for (i = 0; i < nb_rx; i++) { rte_prefetch0(ev[i + 1].mbuf); - ev[i].queue_id = tx_queue; + ev[i].queue_id = tx_queue[ev[i].mbuf->port]; + rte_event_eth_tx_adapter_txq_set(ev[i].mbuf, 0); pipeline_fwd_event(&ev[i], RTE_SCHED_TYPE_ATOMIC); - w->processed_pkts++; } pipeline_event_enqueue_burst(dev, port, ev, nb_rx); + w->processed_pkts += nb_rx; } return 0; } -static int +static __rte_noinline int pipeline_queue_worker_multi_stage_tx(void *arg) { PIPELINE_WORKER_MULTI_STAGE_INIT; - const uint8_t nb_stages = t->opt->nb_stages + 1; + const uint8_t *tx_queue = t->tx_evqueue_id; while (t->done == false) { uint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0); @@ -143,31 +144,27 @@ pipeline_queue_worker_multi_stage_tx(void *arg) cq_id = ev.queue_id % nb_stages; - if (cq_id >= last_queue) { - if (ev.sched_type == RTE_SCHED_TYPE_ATOMIC) { - - pipeline_tx_pkt(ev.mbuf); - w->processed_pkts++; - continue; - } - ev.queue_id += (cq_id == last_queue) ? 1 : 0; - pipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC); - } else { - ev.queue_id++; - pipeline_fwd_event(&ev, sched_type_list[cq_id]); + if (ev.queue_id == tx_queue[ev.mbuf->port]) { + pipeline_event_tx(dev, port, &ev); + w->processed_pkts++; + continue; } + ev.queue_id++; + pipeline_fwd_event(&ev, cq_id != last_queue ? + sched_type_list[cq_id] : + RTE_SCHED_TYPE_ATOMIC); pipeline_event_enqueue(dev, port, &ev); } + return 0; } -static int +static __rte_noinline int pipeline_queue_worker_multi_stage_fwd(void *arg) { PIPELINE_WORKER_MULTI_STAGE_INIT; - const uint8_t nb_stages = t->opt->nb_stages + 1; - const uint8_t tx_queue = t->tx_service.queue_id; + const uint8_t *tx_queue = t->tx_evqueue_id; while (t->done == false) { uint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0); @@ -180,7 +177,8 @@ pipeline_queue_worker_multi_stage_fwd(void *arg) cq_id = ev.queue_id % nb_stages; if (cq_id == last_queue) { - ev.queue_id = tx_queue; + ev.queue_id = tx_queue[ev.mbuf->port]; + rte_event_eth_tx_adapter_txq_set(ev.mbuf, 0); pipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC); w->processed_pkts++; } else { @@ -190,14 +188,15 @@ pipeline_queue_worker_multi_stage_fwd(void *arg) pipeline_event_enqueue(dev, port, &ev); } + return 0; } -static int +static __rte_noinline int pipeline_queue_worker_multi_stage_burst_tx(void *arg) { PIPELINE_WORKER_MULTI_STAGE_BURST_INIT; - const uint8_t nb_stages = t->opt->nb_stages + 1; + const uint8_t *tx_queue = t->tx_evqueue_id; while (t->done == false) { uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev, @@ -212,37 +211,30 @@ pipeline_queue_worker_multi_stage_burst_tx(void *arg) rte_prefetch0(ev[i + 1].mbuf); cq_id = ev[i].queue_id % nb_stages; - if (cq_id >= last_queue) { - if (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) { - - pipeline_tx_pkt(ev[i].mbuf); - ev[i].op = RTE_EVENT_OP_RELEASE; - w->processed_pkts++; - continue; - } - - ev[i].queue_id += (cq_id == last_queue) ? 1 : 0; - pipeline_fwd_event(&ev[i], - RTE_SCHED_TYPE_ATOMIC); - } else { - ev[i].queue_id++; - pipeline_fwd_event(&ev[i], - sched_type_list[cq_id]); + if (ev[i].queue_id == tx_queue[ev[i].mbuf->port]) { + pipeline_event_tx(dev, port, &ev[i]); + ev[i].op = RTE_EVENT_OP_RELEASE; + w->processed_pkts++; + continue; } + ev[i].queue_id++; + pipeline_fwd_event(&ev[i], cq_id != last_queue ? + sched_type_list[cq_id] : + RTE_SCHED_TYPE_ATOMIC); } pipeline_event_enqueue_burst(dev, port, ev, nb_rx); } + return 0; } -static int +static __rte_noinline int pipeline_queue_worker_multi_stage_burst_fwd(void *arg) { PIPELINE_WORKER_MULTI_STAGE_BURST_INIT; - const uint8_t nb_stages = t->opt->nb_stages + 1; - const uint8_t tx_queue = t->tx_service.queue_id; + const uint8_t *tx_queue = t->tx_evqueue_id; while (t->done == false) { uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev, @@ -258,7 +250,8 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg) cq_id = ev[i].queue_id % nb_stages; if (cq_id == last_queue) { - ev[i].queue_id = tx_queue; + ev[i].queue_id = tx_queue[ev[i].mbuf->port]; + rte_event_eth_tx_adapter_txq_set(ev[i].mbuf, 0); pipeline_fwd_event(&ev[i], RTE_SCHED_TYPE_ATOMIC); w->processed_pkts++; @@ -271,6 +264,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg) pipeline_event_enqueue_burst(dev, port, ev, nb_rx); } + return 0; } @@ -280,28 +274,28 @@ worker_wrapper(void *arg) struct worker_data *w = arg; struct evt_options *opt = w->t->opt; const bool burst = evt_has_burst_mode(w->dev_id); - const bool mt_safe = !w->t->mt_unsafe; + const bool internal_port = w->t->internal_port; const uint8_t nb_stages = opt->nb_stages; RTE_SET_USED(opt); if (nb_stages == 1) { - if (!burst && mt_safe) + if (!burst && internal_port) return pipeline_queue_worker_single_stage_tx(arg); - else if (!burst && !mt_safe) + else if (!burst && !internal_port) return pipeline_queue_worker_single_stage_fwd(arg); - else if (burst && mt_safe) + else if (burst && internal_port) return pipeline_queue_worker_single_stage_burst_tx(arg); - else if (burst && !mt_safe) + else if (burst && !internal_port) return pipeline_queue_worker_single_stage_burst_fwd( arg); } else { - if (!burst && mt_safe) + if (!burst && internal_port) return pipeline_queue_worker_multi_stage_tx(arg); - else if (!burst && !mt_safe) + else if (!burst && !internal_port) return pipeline_queue_worker_multi_stage_fwd(arg); - else if (burst && mt_safe) + else if (burst && internal_port) return pipeline_queue_worker_multi_stage_burst_tx(arg); - else if (burst && !mt_safe) + else if (burst && !internal_port) return pipeline_queue_worker_multi_stage_burst_fwd(arg); } @@ -311,10 +305,6 @@ worker_wrapper(void *arg) static int pipeline_queue_launch_lcores(struct evt_test *test, struct evt_options *opt) { - struct test_pipeline *t = evt_test_priv(test); - - if (t->mt_unsafe) - rte_service_component_runstate_set(t->tx_service.service_id, 1); return pipeline_launch_lcores(test, opt, worker_wrapper); } @@ -326,25 +316,21 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) int nb_queues; int nb_stages = opt->nb_stages; uint8_t queue; - struct rte_event_dev_info info; - struct test_pipeline *t = evt_test_priv(test); - uint8_t tx_evqueue_id = 0; + uint8_t tx_evport_id = 0; + uint8_t tx_evqueue_id[RTE_MAX_ETHPORTS] = {0}; uint8_t queue_arr[RTE_EVENT_MAX_QUEUES_PER_DEV]; uint8_t nb_worker_queues = 0; + uint16_t prod = 0; + struct rte_event_dev_info info; + struct test_pipeline *t = evt_test_priv(test); nb_ports = evt_nr_active_lcores(opt->wlcores); nb_queues = rte_eth_dev_count_avail() * (nb_stages); - /* Extra port for Tx service. */ - if (t->mt_unsafe) { - tx_evqueue_id = nb_queues; - nb_ports++; - nb_queues++; - } else - nb_queues += rte_eth_dev_count_avail(); + /* One queue for Tx adapter per port */ + nb_queues += rte_eth_dev_count_avail(); rte_event_dev_info_get(opt->dev_id, &info); - const struct rte_event_dev_config config = { .nb_event_queues = nb_queues, .nb_event_ports = nb_ports, @@ -370,24 +356,19 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) for (queue = 0; queue < nb_queues; queue++) { uint8_t slot; - if (!t->mt_unsafe) { - slot = queue % (nb_stages + 1); - q_conf.schedule_type = slot == nb_stages ? - RTE_SCHED_TYPE_ATOMIC : - opt->sched_type_list[slot]; - } else { - slot = queue % nb_stages; - - if (queue == tx_evqueue_id) { - q_conf.schedule_type = RTE_SCHED_TYPE_ATOMIC; + q_conf.event_queue_cfg = 0; + slot = queue % (nb_stages + 1); + if (slot == nb_stages) { + q_conf.schedule_type = RTE_SCHED_TYPE_ATOMIC; + if (!t->internal_port) { q_conf.event_queue_cfg = RTE_EVENT_QUEUE_CFG_SINGLE_LINK; - } else { - q_conf.schedule_type = - opt->sched_type_list[slot]; - queue_arr[nb_worker_queues] = queue; - nb_worker_queues++; } + tx_evqueue_id[prod++] = queue; + } else { + q_conf.schedule_type = opt->sched_type_list[slot]; + queue_arr[nb_worker_queues] = queue; + nb_worker_queues++; } ret = rte_event_queue_setup(opt->dev_id, queue, &q_conf); @@ -407,19 +388,11 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) .new_event_threshold = info.max_num_events, }; - /* - * If tx is multi thread safe then allow workers to do Tx else use Tx - * service to Tx packets. - */ - if (t->mt_unsafe) { + if (!t->internal_port) { ret = pipeline_event_port_setup(test, opt, queue_arr, nb_worker_queues, p_conf); if (ret) return ret; - - ret = pipeline_event_tx_service_setup(test, opt, tx_evqueue_id, - nb_ports - 1, p_conf); - } else ret = pipeline_event_port_setup(test, opt, NULL, nb_queues, p_conf); @@ -431,7 +404,6 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) * * eth_dev_count = 2, nb_stages = 2. * - * Multi thread safe : * queues = 6 * stride = 3 * @@ -439,21 +411,14 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) * eth0 -> q0 -> q1 -> (q2->tx) * eth1 -> q3 -> q4 -> (q5->tx) * - * q2, q5 configured as ATOMIC - * - * Multi thread unsafe : - * queues = 5 - * stride = 2 + * q2, q5 configured as ATOMIC | SINGLE_LINK * - * event queue pipelines: - * eth0 -> q0 -> q1 - * } (q4->tx) Tx service - * eth1 -> q2 -> q3 - * - * q4 configured as SINGLE_LINK|ATOMIC */ - ret = pipeline_event_rx_adapter_setup(opt, - t->mt_unsafe ? nb_stages : nb_stages + 1, p_conf); + ret = pipeline_event_rx_adapter_setup(opt, nb_stages + 1, p_conf); + if (ret) + return ret; + + ret = pipeline_event_tx_adapter_setup(opt, p_conf); if (ret) return ret; @@ -467,12 +432,60 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) } } + /* Connect the tx_evqueue_id to the Tx adapter port */ + if (!t->internal_port) { + RTE_ETH_FOREACH_DEV(prod) { + ret = rte_event_eth_tx_adapter_event_port_get(prod, + &tx_evport_id); + if (ret) { + evt_err("Unable to get Tx adptr[%d] evprt[%d]", + prod, tx_evport_id); + return ret; + } + + if (rte_event_port_link(opt->dev_id, tx_evport_id, + &tx_evqueue_id[prod], + NULL, 1) != 1) { + evt_err("Unable to link Tx adptr[%d] evprt[%d]", + prod, tx_evport_id); + return ret; + } + } + } + + RTE_ETH_FOREACH_DEV(prod) { + ret = rte_eth_dev_start(prod); + if (ret) { + evt_err("Ethernet dev [%d] failed to start." + " Using synthetic producer", prod); + return ret; + } + + } + ret = rte_event_dev_start(opt->dev_id); if (ret) { evt_err("failed to start eventdev %d", opt->dev_id); return ret; } + RTE_ETH_FOREACH_DEV(prod) { + ret = rte_event_eth_rx_adapter_start(prod); + if (ret) { + evt_err("Rx adapter[%d] start failed", prod); + return ret; + } + + ret = rte_event_eth_tx_adapter_start(prod); + if (ret) { + evt_err("Tx adapter[%d] start failed", prod); + return ret; + } + } + + memcpy(t->tx_evqueue_id, tx_evqueue_id, sizeof(uint8_t) * + RTE_MAX_ETHPORTS); + return 0; } From patchwork Wed Sep 19 22:22:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh X-Patchwork-Id: 44987 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1788A1B150; Thu, 20 Sep 2018 00:23:25 +0200 (CEST) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0086.outbound.protection.outlook.com [104.47.33.86]) by dpdk.org (Postfix) with ESMTP id 450C21B133 for ; Thu, 20 Sep 2018 00:23:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KAtT4YYkvXhtk0cizI+1Zr/6ESxwx/aeo2QE29N8CME=; b=jBgSRXx3s/RjS9/JemtNWiTqjZ83IkKAKezC4u9SQZaSFFqVnFoyJ6XBuJf1bXR1tSEs27C4APzOPZe2qnxUFH/siwDnKY1WY64F5x3DJ/IXLJErBOm05WBH5KEZ0zC+CJqV403Kui3O46xjSG0u2oFq/xF4IpQNSC0VOyqA+Mo= Received: from localhost.localdomain (115.113.156.3) by BYAPR07MB4965.namprd07.prod.outlook.com (2603:10b6:a03:5b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Wed, 19 Sep 2018 22:23:13 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, nikhil.rao@intel.com, anoob.joseph@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh , john.mcnamara@intel.com Date: Thu, 20 Sep 2018 03:52:35 +0530 Message-Id: <20180919222235.6239-4-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180919222235.6239-1-pbhagavatula@caviumnetworks.com> References: <20180904141223.24216-1-pbhagavatula@caviumnetworks.com> <20180919222235.6239-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: MA1PR0101CA0003.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::13) To BYAPR07MB4965.namprd07.prod.outlook.com (2603:10b6:a03:5b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2e8381e5-5ccf-433d-6ee1-08d61e7e7e61 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4965; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4965; 3:neuRQ9QhVd9Ad8Dbw4rSKtqtMuyq/ieOWOQVnPHgSC3NVJ3JWTGxSR0rTRTLqZvmQPT7GCvws+8xcan9XALcM1wcVQ6KMXz7iJdLB5QSNpRB9TAlrlaeq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nvWcz66NwrGzjwcWD6Jx5PcvEPQoM3oLd41Aj6YmhjB7Be1qZ7iqDc/Z3VdPfJ2GGnZRAu2sp3X0M277fnxYpyoA2xu+rMZ/Sbr8aXWYXAMmb7ZH4+UclwLDIYP++pQXzCpkKzX3/Aahoj9euhI6HNs4GeaTZlvmOEE/gLUIPFFeRCXbxLf9S7bca0GPtU5rw92HfeeN/Sh7n0m2LplszlZ2iPPMNyWOTxru+oEsHOlrURvi0Sbax3o4r9da4ewKzAFz4wHA8qALl9XM0l10rqlN6xE6EBQXj7xg4wrzQriAWU72Uhu/T4SNil0zgZvi52xqntqyLq2qdJX4APzohZxGEU/C16c=; 4:6c4I2IIgQ/9K9jzNkdPxG0KPTSAvsGtX1rvnaNlSKiD7jQxsDHfuLw5j6ElFSbQ7YcB54mcXz0wy5k5tlPx78GSoOpbJ+zFr0TI4NFZynEFpYkY5AJAu61aEiFSo9aUjOBA0mr3HEqkpYL/8zDFT7UDkwKnkCvShPGydqv/GA7mdv3x2GRAerB93I58suVTlb2qIkGXqoToLQIoLHg7lzbUHOpb+oBx+ZDe4f3YiZ3Bvwp//6WVEg7CJcMg/FFwKUt3GwygBhaWvT+kt2gAioZCrv5IozzKgCIrnS0Y6j22hNprb9y3IkVCs3rX3aCw0 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231355)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991041); SRVR:BYAPR07MB4965; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4965; X-Forefront-PRVS: 0800C0C167 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(66066001)(6636002)(575784001)(16200700003)(53946003)(6512007)(81166006)(81156014)(6666003)(53936002)(48376002)(4326008)(1857600001)(316002)(50226002)(486006)(36756003)(8936002)(446003)(11346002)(16526019)(26005)(476003)(956004)(8676002)(2616005)(2906002)(14444005)(42882007)(15650500001)(6346003)(5660300001)(68736007)(16586007)(97736004)(47776003)(7736002)(6486002)(72206003)(478600001)(52116002)(105586002)(50466002)(51416003)(1076002)(3846002)(6506007)(6116002)(69590400006)(386003)(25786009)(305945005)(106356001)(76176011)(42262002)(569006); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4965; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB4965; 23:0QSrIXQuzod0qAi/fxZBvnQ6hvl7qrBZewvd+0HqI?= gbSfO2qSSoU1QcTva1zEXMXiUvh+YkNg8hsuygDSbKg2ulhJKf1catfMd8z2jk9utzVbIGGEskTwq6ymRuVtpPAbcCf16EEmHl7pPZFxIRaf4oKi94YcNDex+/QCZ/gUv5l2nzxjKKxahiqLSj8HCJFZSFjvIh9RL3gGC8xyA/Lhk00Tx/sv6QtYhMJJYhrEXf0MhiOlNQyf2HkLpgP0mz6mHtVLkvxNdAYscRRL7JggBPq8ibrbV9syTvtS8Ud6jmEE7wZOT786gn+EYRg9MWT/XTkzjhvPpBhLKZmNE+RJJjZpGNiKiFaX1yQSwN9t7vOvook5v4KQux2GJlTExpQCPqnRNeHaoiwIWkUNxYDqujwOcXeNxF/1tSZO6sKpkao6mwhccKq5uNCLRg3daSqVUsoTbgEmOQsXQJTbm8ryPvoCkkl/GINz6FmKCllHK+D20fokT2RLj6zKA9Li8rzU1yFiLjH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huOzj3OJEqc52Rg19M9Dnux/LOr/GdpTe9w2/0xq7HdJb03y+4eGkRtx359gUPZvowSl0PPf9fGglAZ6GRggM/FH3MYBzpm9iGlkxLKk6sl3kXJv9+LLaok7vSElq8vOlD7 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2018 22:23:13.1874 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2e8381e5-5ccf-433d-6ee1-08d61e7e7e61 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4965 Subject: [dpdk-dev] [PATCH v3 4/4] doc: update eventdev application guide X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Update eventdev application guide to reflect Tx adapter related changes. Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- cc: .../eventdev_pipeline_atq_test_generic.svg | 848 +++++++++++------- ...ntdev_pipeline_atq_test_internal_port.svg} | 26 +- .../eventdev_pipeline_queue_test_generic.svg | 570 +++++++----- ...dev_pipeline_queue_test_internal_port.svg} | 22 +- doc/guides/tools/testeventdev.rst | 42 +- 5 files changed, 930 insertions(+), 578 deletions(-) rename doc/guides/tools/img/{eventdev_pipeline_atq_test_lockfree.svg => eventdev_pipeline_atq_test_internal_port.svg} (99%) rename doc/guides/tools/img/{eventdev_pipeline_queue_test_lockfree.svg => eventdev_pipeline_queue_test_internal_port.svg} (99%) -- 2.19.0 diff --git a/doc/guides/tools/img/eventdev_pipeline_atq_test_generic.svg b/doc/guides/tools/img/eventdev_pipeline_atq_test_generic.svg index e33367989..707b9b56b 100644 --- a/doc/guides/tools/img/eventdev_pipeline_atq_test_generic.svg +++ b/doc/guides/tools/img/eventdev_pipeline_atq_test_generic.svg @@ -20,7 +20,7 @@ height="288.34286" id="svg3868" version="1.1" - inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" + inkscape:version="0.92.2 2405546, 2018-03-11" sodipodi:docname="eventdev_pipeline_atq_test_generic.svg" sodipodi:version="0.32" inkscape:output_extension="org.inkscape.output.svg.inkscape" @@ -42,22 +42,6 @@ d="M 5.77,0 -2.88,5 V -5 Z" id="path39725" /> - - - + gradientTransform="matrix(0.84881476,0,0,0.98593266,86.966576,5.0323108)" /> - - - - + + + + + + + + style="fill:#f78202;fill-opacity:1;fill-rule:evenodd;stroke:#f78202;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.4)" /> + style="fill:#f78202;fill-opacity:1;fill-rule:evenodd;stroke:#f78202;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.4)" /> + style="fill:#f78202;fill-opacity:1;fill-rule:evenodd;stroke:#f78202;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.4)" /> + + + refY="0" + refX="0" + id="marker35935-1-6-5-1-0" + style="overflow:visible" + inkscape:isstock="true" + inkscape:collect="always"> + style="fill:#ac14db;fill-opacity:1;fill-rule:evenodd;stroke:#ac14ff;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.4)" + inkscape:connector-curvature="0" /> - + style="fill:#ac14db;fill-opacity:1;fill-rule:evenodd;stroke:#ac14ff;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.4)" + inkscape:connector-curvature="0" /> + + + style="fill:#ac14db;fill-opacity:1;fill-rule:evenodd;stroke:#ac14ff;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.4)" + inkscape:connector-curvature="0" /> + + + + style="fill:#ac14db;fill-opacity:1;fill-rule:evenodd;stroke:#ac14ff;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.4)" + inkscape:connector-curvature="0" /> - - + + + + + + + + + port n+2 + style="font-size:10px;line-height:1.25">port n+1 port n+3 + style="font-size:10px;line-height:1.25">port n+2 total queues = number of ethernet dev + 1 + style="font-size:10px;line-height:1.25">total queues = 2 * number of ethernet dev + Event ethRx adptr 0 + Event ethRx adptr 1 + Event ethRx adptr q + + + + + (Tx Generic) + transform="translate(69.258261,-194.86398)"> Txq 0 + transform="translate(-12.211349,-3.253112)"> Txq 0 + transform="translate(-10.498979,-2.682322)"> Txq 0 - Event ethRx adptr 0 - Event ethRx adptr 1 - Event ethRx adptr q - - - Tx Serviceport n + 1 - - - - - + + x="502.77109" + y="189.40137" + id="tspan5223-0-9-02" + style="font-size:10px;line-height:1.25">port n+m+1 + Single link + style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;stroke:url(#linearGradient3995-8-9);stroke-width:1.2090857;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect87-6-5-3-79-1" + width="72.081367" + height="32.405426" + x="499.944" + y="226.74811" + rx="16.175425" + ry="16.202713" /> Single port n+m+2 + + Link Q + x="512.51819" + y="301.5791" + id="tspan5223-0-9-0-4-2" + style="font-size:10px;line-height:1.25">port n+o + (Tx Generic) + x="515.76257" + y="175.4832" + style="font-size:7.31033659px;line-height:1.25;stroke-width:0.88288933" + id="tspan883-1-9-7-6-3">Single link + Single link + Tx adapter + q3 + q4 + q5 diff --git a/doc/guides/tools/img/eventdev_pipeline_atq_test_lockfree.svg b/doc/guides/tools/img/eventdev_pipeline_atq_test_internal_port.svg similarity index 99% rename from doc/guides/tools/img/eventdev_pipeline_atq_test_lockfree.svg rename to doc/guides/tools/img/eventdev_pipeline_atq_test_internal_port.svg index d7f10de3e..f4393327b 100644 --- a/doc/guides/tools/img/eventdev_pipeline_atq_test_lockfree.svg +++ b/doc/guides/tools/img/eventdev_pipeline_atq_test_internal_port.svg @@ -20,8 +20,8 @@ height="288.34286" id="svg3868" version="1.1" - inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" - sodipodi:docname="eventdev_pipeline_atq_test_lockfree.svg" + inkscape:version="0.92.2 2405546, 2018-03-11" + sodipodi:docname="eventdev_pipeline_atq_test_internal_port.svg" sodipodi:version="0.32" inkscape:output_extension="org.inkscape.output.svg.inkscape" enable-background="new"> @@ -2612,17 +2612,17 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.7519532" - inkscape:cx="479.73438" - inkscape:cy="163.58755" + inkscape:zoom="2.0977641" + inkscape:cx="432.03729" + inkscape:cy="135.16016" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" - inkscape:window-width="1920" - inkscape:window-height="1046" - inkscape:window-x="0" - inkscape:window-y="34" - inkscape:window-maximized="1" + inkscape:window-width="1912" + inkscape:window-height="1033" + inkscape:window-x="4" + inkscape:window-y="22" + inkscape:window-maximized="0" fit-margin-top="0.1" fit-margin-left="0.1" fit-margin-right="0.1" @@ -3331,14 +3331,14 @@ (Tx Lock free) + id="tspan1265-4">(Internal port) diff --git a/doc/guides/tools/img/eventdev_pipeline_queue_test_generic.svg b/doc/guides/tools/img/eventdev_pipeline_queue_test_generic.svg index 732d48867..9fe743f3b 100644 --- a/doc/guides/tools/img/eventdev_pipeline_queue_test_generic.svg +++ b/doc/guides/tools/img/eventdev_pipeline_queue_test_generic.svg @@ -20,13 +20,21 @@ height="288.34286" id="svg3868" version="1.1" - inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" + inkscape:version="0.92.2 2405546, 2018-03-11" sodipodi:docname="eventdev_pipeline_queue_test_generic.svg" sodipodi:version="0.32" inkscape:output_extension="org.inkscape.output.svg.inkscape" enable-background="new"> + + + @@ -1312,7 +1320,7 @@ x2="651.55652" y2="243.36557" gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.76448972,0,0,0.86504892,-92.637138,19.716473)" /> + gradientTransform="matrix(0.76448972,0,0,0.78486608,-92.637138,48.19976)" /> - - - - - - - - - - - + + + + + + + + + + + + + + + + + producer 0 port n+2 + style="font-size:10px;line-height:1.25">port n+1 port n+3 + style="font-size:10px;line-height:1.25">port n+2 total queues = (number of stages * number of ethernet dev) + 1 + style="font-size:9.02731705px;line-height:1.25;stroke-width:0.90273178">total queues = (number of stages * number of ethernet dev) + number of ethernet dev worker 0 worker 1 worker n @@ -3309,7 +3391,7 @@ + transform="translate(87.401608,-194.91553)"> + transform="translate(5.9319927,-3.304662)"> + transform="translate(7.6443673,-2.7338705)"> Txq 0 - - - Tx Serviceport n + 1 - - - - - - SingleLink Q + (Tx Generic) + + port n+m+1 + Single link + + port n+m+2 + + port n+o + + + (Tx Generic) + x="536.09253" + y="175.43703" + style="font-size:7.31033659px;line-height:1.25;stroke-width:0.88288933" + id="tspan883-1-9-7-6-3">Single link + Single link + Tx adapter diff --git a/doc/guides/tools/img/eventdev_pipeline_queue_test_lockfree.svg b/doc/guides/tools/img/eventdev_pipeline_queue_test_internal_port.svg similarity index 99% rename from doc/guides/tools/img/eventdev_pipeline_queue_test_lockfree.svg rename to doc/guides/tools/img/eventdev_pipeline_queue_test_internal_port.svg index c0a365c7b..3036ad663 100644 --- a/doc/guides/tools/img/eventdev_pipeline_queue_test_lockfree.svg +++ b/doc/guides/tools/img/eventdev_pipeline_queue_test_internal_port.svg @@ -20,8 +20,8 @@ height="288.34286" id="svg3868" version="1.1" - inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" - sodipodi:docname="eventdev_pipeline_queue_test_lockfree.svg" + inkscape:version="0.92.2 2405546, 2018-03-11" + sodipodi:docname="eventdev_pipeline_queue_test_internal_port.svg" sodipodi:version="0.32" inkscape:output_extension="org.inkscape.output.svg.inkscape" enable-background="new"> @@ -2853,17 +2853,17 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="2.0000001" - inkscape:cx="394.32532" - inkscape:cy="122.70585" + inkscape:zoom="1.6933595" + inkscape:cx="466.69113" + inkscape:cy="93.384431" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" - inkscape:window-width="1920" - inkscape:window-height="1046" - inkscape:window-x="1920" - inkscape:window-y="34" - inkscape:window-maximized="1" + inkscape:window-width="1912" + inkscape:window-height="1033" + inkscape:window-x="4" + inkscape:window-y="22" + inkscape:window-maximized="0" fit-margin-top="0.1" fit-margin-left="0.1" fit-margin-right="0.1" @@ -3809,7 +3809,7 @@ x="670.83521" y="349.11719" style="font-size:7.17278051px;line-height:1.25;stroke-width:0.82762849" - id="tspan1265-4">(Tx Lock free) + id="tspan1265-4">(Internal port) = 1 | Producers will be configured based on | | | | | the number of detected ethernet devices.| @@ -533,17 +534,19 @@ This is a pipeline test case that aims at testing the following: | | | | argument | +---+--------------+----------------+-----------------------------------------+ | 4 | nb_ports | nb_workers + | Workers use port 0 to port n. | - | | | nb_producers | Producers use port n+1 to port n+m, | - | | | | depending on the Rx adapter capability. | + | | | (nb_produces * | Producers use port n+1 to port n+m, | + | | | 2) | depending on the Rx adapter capability. | + | | | | Consumers use port n+m+1 to port n+o | + | | | | depending on the Tx adapter capability. | +---+--------------+----------------+-----------------------------------------+ .. _figure_eventdev_pipeline_queue_test_generic: .. figure:: img/eventdev_pipeline_queue_test_generic.* -.. _figure_eventdev_pipeline_queue_test_lockfree: +.. _figure_eventdev_pipeline_queue_test_internal_port: -.. figure:: img/eventdev_pipeline_queue_test_lockfree.* +.. figure:: img/eventdev_pipeline_queue_test_internal_port.* pipeline queue test operation. @@ -568,10 +571,11 @@ the last stage in the pipeline if the event type is ``atomic`` it is enqueued onto ethdev Tx queue else to maintain ordering the event type is set to ``atomic`` and enqueued onto the last stage queue. -If the ethernet has ``DEV_TX_OFFLOAD_MT_LOCKFREE`` capability then the worker -cores transmit the packets directly. Else the worker cores enqueue the packet -onto the ``SINGLE_LINK_QUEUE`` that is managed by a Tx service. The Tx service -dequeues the packet and transmits it. +If the ethdev and eventdev pair have ``RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT`` +capability then the worker cores enqueue the packets to the eventdev directly +using ``rte_event_eth_tx_adapter_enqueue`` else the worker cores enqueue the +packet onto the ``SINGLE_LINK_QUEUE`` that is managed by the Tx adapter. +The Tx adapter dequeues the packet and transmits it. On packet Tx, application increments the number events processed and print periodically in one second to get the number of events processed in one @@ -628,8 +632,9 @@ This is a pipeline test case that aims at testing the following with +===+==============+================+=========================================+ | 1 | nb_queues | nb_producers + | Queues will be configured based on the | | | | x | user requested sched type list(--stlist)| - | | | | where x = 1 in generic pipeline and 0 | - | | | | in lockfree pipeline | + | | | | where x = nb_producers in generic | + | | | | pipeline and 0 if all the ethdev | + | | | | being used have Internal port capability| +---+--------------+----------------+-----------------------------------------+ | 2 | nb_producers | >= 1 | Producers will be configured based on | | | | | the number of detected ethernet devices.| @@ -640,17 +645,22 @@ This is a pipeline test case that aims at testing the following with | | | | argument | +---+--------------+----------------+-----------------------------------------+ | 4 | nb_ports | nb_workers + | Workers use port 0 to port n. | - | | | nb_producers | Producers use port n+1 to port n+m, | - | | | | depending on the Rx adapter capability. | + | | | nb_producers + | Producers use port n+1 to port n+m, | + | | | x | depending on the Rx adapter capability. | + | | | | x = nb_producers in generic pipeline and| + | | | | 0 if all the ethdev being used have | + | | | | Internal port capability. | + | | | | Consumers may use port n+m+1 to port n+o| + | | | | depending on the Tx adapter capability. | +---+--------------+----------------+-----------------------------------------+ .. _figure_eventdev_pipeline_atq_test_generic: .. figure:: img/eventdev_pipeline_atq_test_generic.* -.. _figure_eventdev_pipeline_atq_test_lockfree: +.. _figure_eventdev_pipeline_atq_test_internal_port: -.. figure:: img/eventdev_pipeline_atq_test_lockfree.* +.. figure:: img/eventdev_pipeline_atq_test_internal_port.* pipeline atq test operation.