From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0060.outbound.protection.outlook.com [104.47.37.60]) by dpdk.org (Postfix) with ESMTP id 3BE711B2F4 for ; Tue, 16 Jan 2018 18:48:08 +0100 (CET) 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; bh=/QYdfaILituC6zRSKNfcXpe3/xsl73OLksA1+9Uaq5M=; b=Jeum92da8qWnA1cL3k/y6WDU6BFGQK534Wf9xU7cOUmdDUBXNg5DcyZ11mdQCbK2aIBd/1G1MQl7XlQSfegSPHG/yb03K0SADItST1Nh1papJuAIZh17lsqh9YachWNhKQCOdAeN8IOoSDZQ3rAvpkURAYagnxGi8W+uUT4sbew= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 17:48:02 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, liang.j.ma@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Tue, 16 Jan 2018 23:16:01 +0530 Message-Id: <20180116174607.10821-9-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180116174607.10821-1-pbhagavatula@caviumnetworks.com> References: <20171130072406.15605-1-pbhagavatula@caviumnetworks.com> <20180116174607.10821-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: HK2PR02CA0158.apcprd02.prod.outlook.com (10.171.30.18) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 644a87b5-c161-494c-dffd-08d55d094cc2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY4PR07MB3464; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 3:EmzlnaqYupEqhnYOselF5zmhGPvPYF0NflcCwgF7s+ARtk4FQCi2H7oMYJLmIowkb2MOe+hdvm758F+sRFQAs8MSVrVRN6uabOfe2bwYHD3/wOifWl/0oakH9HVD7WZQIEhPbqRyIe4p5bZX3yvMaJmkf6Z51xekJS8NyFgtV5pRMNLXpiDs8d2dDG60tLi5sIOy1AdpDxRhPlvG8hs0Zrh+gI1ibCrXzEsdE1ypKE0BP8i7E394Gan1gus4ZyGx; 25:AR3q3rPFFkbSu920kX+F5hifdc7e2ykaiiw44fdCdc+nUqlhZq778xXpU+K3zzv6wxF/GrRUt8Sfbw3xSVPPa6AvRkY6dXq1kKel2hSgVimzTRAHO6yQTgCHaC8B+zEPljrCMklMm4G1GXeNEnD7ZNG38R7PthzuuIvhQZcLzq6VSJ+eyGEcMxEqw/lqGYdbFtA7w9B/QXarOCr+8Bc+ZnKSWJ+VsftXEol3q1tMJCbY+/ekDnYWC77gWlr52x2bTlOJ1J8Aet0X3bZSuDcfaVHj1mw1DNeiNHPnQ4RwW8RBRl8MgPpxKAKztqimE8xb6dQctTuqm315snr7ZsIqgQ==; 31:o4eWYNfiE9sJe0blIAWR1yavWaYWajEn6hjM6wRVkRdUfA/5TXx8KpMKVSF7bppSwW6R/UX2wBd+8+vIw/xaxlk2ODGtukltpS+G3iEErVxwfQhi5gCCdkKfzyzV/FxgckW8gjtUK3z/vTu56NORhz+8vXNttdqSj+BINNzxcMi+kKQTbd2aCeU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X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3231023)(944501161)(93006095)(3002001)(10201501046)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:CY4PR07MB3464; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3464; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(6069001)(346002)(366004)(39860400002)(376002)(39380400002)(396003)(189003)(199004)(81166006)(97736004)(8676002)(6116002)(5009440100003)(52116002)(305945005)(8936002)(107886003)(1076002)(53376002)(51416003)(81156014)(25786009)(8656006)(4326008)(19273905006)(50466002)(6486002)(5660300001)(3846002)(7736002)(50226002)(16526018)(68736007)(106356001)(26005)(76176011)(6306002)(53936002)(6512007)(59450400001)(47776003)(48376002)(16586007)(386003)(6506007)(66066001)(72206003)(2950100002)(36756003)(966005)(2906002)(105586002)(478600001)(316002)(42882006)(42262002)(562404015)(563064011)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3464; 23:QV+oVm1NmV3Bz8VzAFnYULxatSfOa1y+GJ5TEMd4V?= =?us-ascii?Q?fBORcCux2Z6h14W8YNs4jv8v0jtn94qvqmQJNvFSkm+eqeHc8Wfzjys48Fjk?= =?us-ascii?Q?2SRWEVoby4eyzQbvHSNJ/++gHYcxMfXZnqwjoWia0F7Tab6p6CQii1G9xwbo?= =?us-ascii?Q?mSuA5B7Y+uI0lJjlbbz0XqGYnCJNe2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gfE=; 24:44/mqqjhuGv9/VKsOoK9d3WNWMutfpgz4JsR6FchnZhyNAMObV/LtT7MBgib1DavPfpC7r7cUhiR2k9Ya38ZX/OKxz11dJKE39OqVmFijEc=; 7:Bw9pJYWuJgGltoJeCcAF/v3KOYJ5kKTP6BcKRyoPV+WFlCRfsReiEcnOpQWg3B2i+NronEKaGIHfJIH8U/lVJtDqpirJZj18sEOCikO49HgGPupR8X+t6/Y37a8G6reMu/j/LUrAeHeEikAxIFdnklgrJONIZvtC5StQ+NUVtCMsV8UE+JNTLax3bZcIORlRKfDKOY+2IBUMjtqJ64mjrSPQalSWmkfujAtUf8F4uH+E2K3viqceIZVY+M5oTaCH SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 17:48:02.4846 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 644a87b5-c161-494c-dffd-08d55d094cc2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3464 Subject: [dpdk-dev] [PATCH v7 09/15] app/eventdev: add pipeline queue test 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: , X-List-Received-Date: Tue, 16 Jan 2018 17:48:08 -0000 This is a pipeline queue test case that aims at testing the following: 1. Measure the end-to-end performance of an event dev with a ethernet dev. 2. Maintain packet ordering from Rx to Tx. The pipeline queue test configures the eventdev with Q queues and P ports, where Q is (nb_ethdev * nb_stages) + nb_ethdev and P is nb_workers. The user can choose the number of workers and number of stages through the --wlcores and the --stlist application command line arguments respectively. The probed ethernet devices act as producer(s) for this application. The ethdevs are configured as event Rx adapters that enables them to injects events to eventdev based the first stage schedule type list requested by the user through --stlist the command line argument. Based on the number of stages to process(selected through --stlist), the application forwards the event to next upstream queue and when it reaches 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. On packet Tx, application increments the number events processed and print periodically in one second to get the number of events processed in one second. Note: The --prod_type_ethdev is mandatory for running the application. Example command to run pipeline queue test: sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \ --test=pipeline_queue --wlcore=1 --prod_type_ethdev --stlist=ao Signed-off-by: Pavan Nikhilesh Acked-by: Harry van Haaren --- app/test-eventdev/Makefile | 1 + app/test-eventdev/test_pipeline_queue.c | 237 ++++++++++++++++++++++++++++++++ 2 files changed, 238 insertions(+) create mode 100644 app/test-eventdev/test_pipeline_queue.c diff --git a/app/test-eventdev/Makefile b/app/test-eventdev/Makefile index 1707318f2..94b489f41 100644 --- a/app/test-eventdev/Makefile +++ b/app/test-eventdev/Makefile @@ -26,5 +26,6 @@ SRCS-y += test_perf_queue.c SRCS-y += test_perf_atq.c SRCS-y += test_pipeline_common.c +SRCS-y += test_pipeline_queue.c include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c new file mode 100644 index 000000000..773c3ecaa --- /dev/null +++ b/app/test-eventdev/test_pipeline_queue.c @@ -0,0 +1,237 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright 2017 Cavium, Inc. + */ + +#include "test_pipeline_common.h" + +/* See http://dpdk.org/doc/guides/tools/testeventdev.html for test details */ + +static __rte_always_inline int +pipeline_queue_nb_event_queues(struct evt_options *opt) +{ + uint16_t eth_count = rte_eth_dev_count(); + + return (eth_count * opt->nb_stages) + eth_count; +} + +static int +worker_wrapper(void *arg) +{ + RTE_SET_USED(arg); + rte_panic("invalid worker\n"); +} + +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); +} + +static int +pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) +{ + int ret; + int nb_ports; + 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 queue_arr[RTE_EVENT_MAX_QUEUES_PER_DEV]; + uint8_t nb_worker_queues = 0; + + nb_ports = evt_nr_active_lcores(opt->wlcores); + nb_queues = rte_eth_dev_count() * (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(); + + 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, + }; + ret = rte_event_dev_configure(opt->dev_id, &config); + if (ret) { + evt_err("failed to configure eventdev %d", opt->dev_id); + return ret; + } + + 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, + }; + /* queue configurations */ + 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 = + 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++; + } + } + + ret = rte_event_queue_setup(opt->dev_id, queue, &q_conf); + if (ret) { + evt_err("failed to setup queue=%d", queue); + return ret; + } + } + + /* 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, + }; + + /* + * If tx is multi thread safe then allow workers to do Tx else use Tx + * service to Tx packets. + */ + if (t->mt_unsafe) { + 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); + + if (ret) + return ret; + /* + * The pipelines are setup in the following manner: + * + * eth_dev_count = 2, nb_stages = 2. + * + * Multi thread safe : + * queues = 6 + * stride = 3 + * + * event queue pipelines: + * eth0 -> q0 -> q1 -> (q2->tx) + * eth1 -> q3 -> q4 -> (q5->tx) + * + * q2, q5 configured as ATOMIC + * + * Multi thread unsafe : + * queues = 5 + * stride = 2 + * + * 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); + if (ret) + return ret; + + if (!evt_has_distributed_sched(opt->dev_id)) { + uint32_t service_id; + rte_event_dev_service_id_get(opt->dev_id, &service_id); + ret = evt_service_setup(service_id); + if (ret) { + evt_err("No service lcore found to run event dev."); + return ret; + } + } + + ret = rte_event_dev_start(opt->dev_id); + if (ret) { + evt_err("failed to start eventdev %d", opt->dev_id); + return ret; + } + + return 0; +} + +static void +pipeline_queue_opt_dump(struct evt_options *opt) +{ + pipeline_opt_dump(opt, pipeline_queue_nb_event_queues(opt)); +} + +static int +pipeline_queue_opt_check(struct evt_options *opt) +{ + return pipeline_opt_check(opt, pipeline_queue_nb_event_queues(opt)); +} + +static bool +pipeline_queue_capability_check(struct evt_options *opt) +{ + struct rte_event_dev_info dev_info; + + rte_event_dev_info_get(opt->dev_id, &dev_info); + if (dev_info.max_event_queues < pipeline_queue_nb_event_queues(opt) || + dev_info.max_event_ports < + evt_nr_active_lcores(opt->wlcores)) { + evt_err("not enough eventdev queues=%d/%d or ports=%d/%d", + pipeline_queue_nb_event_queues(opt), + dev_info.max_event_queues, + evt_nr_active_lcores(opt->wlcores), + dev_info.max_event_ports); + } + + return true; +} + +static const struct evt_test_ops pipeline_queue = { + .cap_check = pipeline_queue_capability_check, + .opt_check = pipeline_queue_opt_check, + .opt_dump = pipeline_queue_opt_dump, + .test_setup = pipeline_test_setup, + .mempool_setup = pipeline_mempool_setup, + .ethdev_setup = pipeline_ethdev_setup, + .eventdev_setup = pipeline_queue_eventdev_setup, + .launch_lcores = pipeline_queue_launch_lcores, + .eventdev_destroy = pipeline_eventdev_destroy, + .mempool_destroy = pipeline_mempool_destroy, + .ethdev_destroy = pipeline_ethdev_destroy, + .test_result = pipeline_test_result, + .test_destroy = pipeline_test_destroy, +}; + +EVT_TEST_REGISTER(pipeline_queue); -- 2.14.1