From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0062.outbound.protection.outlook.com [104.47.38.62]) by dpdk.org (Postfix) with ESMTP id 247C41B22A for ; Wed, 10 Jan 2018 15:52:52 +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=n6fY8Byp7ZyaCd+fN/NsQQyFcfdrS29kO+74qzXNsbY=; b=QCHK4rfRldsvtTPJ6kG6iv21TXFtgjsX7iWTFzra24onv3SMt8/pddau7tTJJhMPRGDyru7KY4y/vnggQozMNWvnleSNF+H5vfOCRJPjJHjAY21PdkjId/aWWIJ314sjBBZl41EBWxF2fVNR4DImobg5/K2L0ofw52QC3kwVg+4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Wed, 10 Jan 2018 14:52:46 +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: Wed, 10 Jan 2018 20:21:42 +0530 Message-Id: <20180110145144.28403-10-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180110145144.28403-1-pbhagavatula@caviumnetworks.com> References: <20171130072406.15605-1-pbhagavatula@caviumnetworks.com> <20180110145144.28403-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BN6PR16CA0009.namprd16.prod.outlook.com (10.172.212.147) To DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f2611503-f2dd-4b18-1755-08d55839d212 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM5PR07MB3466; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 3:PaGKkuRs0wI6IRMK6LlJ3vRgY/qPKtMwoU+uLoJoZS/qNNHIuGLog3q+dhZ8l8Gz+sKwFKOZOAEvXQSGzBC3j1UTEx+xMppNb1+mOwx4eFgC52CGh6uT20Y2iyzDZyx7XVEVj8IUP27fQ9L5Fpa8X27SANXpGYd83l7D72mOYBmMZ72yCLxVl9+WyC2koxrZh5VU8tLGy6sHj8dYO2GHY+R0xC3FK+xiZFEqms6Iceaw/I4+DAC1ZTFHB+FZuTLD; 25:UCT/mtUY4jmIyw7ce6N7d3T76uS/0sNLyFhaLLi4fDPXD1kI/fxM08KmAyf7TPkS+mFgyM/Idvbhsu0aICNFkM/eGvB1N04yzMY0nZ0yQQ7VXGp0gO+mnBvBs+5YmoCfX+82c2juFnWqNuYyDv5hQNsRMMvRxVxSBV/Zb4cIuMowFfelU6L3ne/lTQz/6SFO6yZgZABsdjk07NlgskunN04xGfzsFAgZWQXAMnc7HaF481uCvIs/rX85SZeiQM7aCo1i6rC+OSWGJgtyeu4d+jYK5gEGDKvKvBMKtUfXQPlSmesWuhX0q5JW2JPXKqH4synWpaST+WdkVAu0oRviuw==; 31:qR9zMHhV5xb7iYjeDoClqFs7RjFs5FNnXahz/lTyhoa1lbmHrenu3KSkwjSWLdDmItw2+ZTrcvf5BlbqoNEILDHxpjDmSCkO+VeHkRdlILVQoy8/8uki8cJigM5u671VC9XNkSc7wYJxJHNFaRjytpyCx4Sa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ispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(3231023)(944501075)(6041268)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR07MB3466; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR07MB3466; X-Forefront-PRVS: 0548586081 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(366004)(376002)(396003)(39380400002)(199004)(189003)(76176011)(25786009)(53376002)(107886003)(4326008)(6666003)(2950100002)(106356001)(42882006)(8656006)(8676002)(59450400001)(105586002)(53936002)(6486002)(52116002)(53416004)(6512007)(50466002)(47776003)(5009440100003)(19273905006)(305945005)(68736007)(6306002)(51416003)(386003)(6506007)(966005)(69596002)(36756003)(72206003)(2906002)(16586007)(50226002)(316002)(478600001)(7736002)(48376002)(3846002)(1076002)(6116002)(5660300001)(66066001)(16526018)(81166006)(97736004)(81156014)(8936002)(562404015)(42262002)(563064011); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3466; H:Pavan-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; DM5PR07MB3466; 23:ZWLBimpuVb4E1AQQePCQ3VVMzFSAPI3rWWYZbNBsK?= =?us-ascii?Q?vFNBtm8+mkG6nu99xK/Cp92fFxF//Ue+JomnZDvps9tiGeM9EZ0Vaa+gsfaP?= =?us-ascii?Q?SqQfpC8XeZlf7Nj5is/Zlk+l1UGvBTn/u4l2Jn6fU7Pt/Yc8Bg0E8YsXKBqJ?= =?us-ascii?Q?oFe26W8GWWZt33hpQV1ZQPuDYZSmJKxSu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mrmOk908LmiUJZD0kNvZK6tSZwDpVbsNibHS7oiM3D+pDUPj46?= =?us-ascii?Q?10tvAyei+Zrnv9s0ut6CClL1rM60VDqqV2Tbjl/bCguN8mjC94IURGK6NTzI?= =?us-ascii?Q?NzjxEgmFxr7/has4v7RaweIV99YsOy33FeFJeVqn18aiwmlJkQpYyMP0r3hW?= =?us-ascii?Q?+xteLZVXE6DjcuCLzZGq18aXq1thf3U7IWw7bLDcIOxJUla/4q5pODEie3av?= =?us-ascii?Q?cVOqWSsCoBWyB6mSrhgsTXr7V19atuRzlpUAu8ZzrL99jurVdoZUbJxHHSIf?= =?us-ascii?Q?UK55fH8Wj+YWGFySRbc0Xa6R54=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 6:uSGY+MHJsggUU46cAF1YMWuYMSrcbxdktnnP88+qpDfckSAX5BDlIXE7ct6VZEMx4SUZt8yUhQzrsYqpQyBblx/dN4tRYBO6QWaDmWj8dNCRIfHFtWnWD0tQ1AEcrphHYvb0qtOhOJOOxdq980D6m8/qKIVcpVuEDavS+fK/fjy1GbIEHyTHBUwsu93UiNicxFofHScKvDlvtm8qG5IAmrextuoX1s+ZTDjK31dIzIiZwZUp1KovIRcf6sFLbf4tkavxcczucyQD9Zes0PzcnSFxdzeZG0hrnLIWtBV5oZCVqjjg6oCSasBtmE7YXN7MrGSXfvmnEoh74bZ00uv2EaWdRWaMhJDmEyww0aDkZug=; 5:k+hXhVgSRmhKjVaZWRi3i98di7KY+uQgUuZBMSSojHbC60v4faeJW25b+UI3p4BoCZH9d3iPVwNp1HpwSfFtpUfBFwCh/YwI0QkFpWkFjyXzIx13Den8YuWYMwR+Skb5698akd6zkea7b9RBmfgU3YCZeMxorb6gC7sstF4bCX8=; 24:GlL4x+HEkuKiKNsrjv5KWJxfOXtbPh08G47dHjfww2cq/CRQUlUq0MG8NEsNPuvBaqJIzs+jV+ndnRQsQNTalbi4pzwfKx335MQS6Ft+qY4=; 7:FhWKBTVqqLauLVLg26+o1WtcPRlzUvz462f+HlUp6SfsmhPzwp6zP3RCKcM7LQBAu8FJLKc0BXtAYmJpQkG7wLZcq3wh+A6HjQpu3lGEiDYycwo3iXrH5Tr8+Ese7B9dEeScLWPEkHQN2Zlka41Nj0+MVusPdIhQp3K1Sdz3kQHOiocZ5Nj4KBt8DNBRwZWOco8xwfTMTtw7QuNDBhd0jKA8QsgVAti0if46TxCcGgQy6MKwRGmZsClArlVCzHEp SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 14:52:46.8105 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f2611503-f2dd-4b18-1755-08d55839d212 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3466 Subject: [dpdk-dev] [PATCH v3 10/12] app/eventdev: add pipeline atq 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: Wed, 10 Jan 2018 14:52:52 -0000 This is a pipeline test case that aims at testing the following with ``all types queue`` eventdev scheme. 1. Measure the end-to-end performance of an event dev with a ethernet dev. 2. Maintain packet ordering from Rx to Tx. The atq queue test functions as same as ``pipeline_queue`` test. The difference is, It uses, ``all type queue scheme`` instead of separate queues for each stage and thus reduces the number of queues required to realize the use case. Note: The --prod_type_ethdev is mandatory for running the application. Example command to run pipeline atq test: sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \ --test=pipeline_atq --wlcore=1 --prod_type_ethdev --stlist=ao Signed-off-by: Pavan Nikhilesh --- v3 Changes: - redo queue creation by changing the queue count to nb_ethdev - add SPDX licence tags app/test-eventdev/Makefile | 1 + app/test-eventdev/test_pipeline_atq.c | 158 ++++++++++++++++++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 app/test-eventdev/test_pipeline_atq.c diff --git a/app/test-eventdev/Makefile b/app/test-eventdev/Makefile index 30bebfb2f..6e3e36fb8 100644 --- a/app/test-eventdev/Makefile +++ b/app/test-eventdev/Makefile @@ -53,5 +53,6 @@ SRCS-y += test_perf_atq.c SRCS-y += test_pipeline_common.c SRCS-y += test_pipeline_queue.c +SRCS-y += test_pipeline_atq.c include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-eventdev/test_pipeline_atq.c b/app/test-eventdev/test_pipeline_atq.c new file mode 100644 index 000000000..642ef0375 --- /dev/null +++ b/app/test-eventdev/test_pipeline_atq.c @@ -0,0 +1,158 @@ +/* + * 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_atq_nb_event_queues(struct evt_options *opt) +{ + RTE_SET_USED(opt); + + return rte_eth_dev_count(); +} + +static int +worker_wrapper(void *arg) +{ + RTE_SET_USED(arg); + rte_panic("invalid worker\n"); +} + +static int +pipeline_atq_launch_lcores(struct evt_test *test, struct evt_options *opt) +{ + return pipeline_launch_lcores(test, opt, worker_wrapper); +} + +static int +pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) +{ + int ret; + int nb_ports; + int nb_queues; + uint8_t queue; + struct rte_event_dev_info info; + + nb_ports = evt_nr_active_lcores(opt->wlcores); + 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++) { + q_conf.event_queue_cfg = RTE_EVENT_QUEUE_CFG_ALL_TYPES; + + 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, + }; + + ret = pipeline_event_port_setup(test, opt, nb_queues, p_conf); + if (ret) + return ret; + + ret = pipeline_event_rx_adapter_setup(opt, 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_atq_opt_dump(struct evt_options *opt) +{ + pipeline_opt_dump(opt, pipeline_atq_nb_event_queues(opt)); +} + +static int +pipeline_atq_opt_check(struct evt_options *opt) +{ + return pipeline_opt_check(opt, pipeline_atq_nb_event_queues(opt)); +} + +static bool +pipeline_atq_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_atq_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_atq_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_atq = { + .cap_check = pipeline_atq_capability_check, + .opt_check = pipeline_atq_opt_check, + .opt_dump = pipeline_atq_opt_dump, + .test_setup = pipeline_test_setup, + .mempool_setup = pipeline_mempool_setup, + .ethdev_setup = pipeline_ethdev_setup, + .eventdev_setup = pipeline_atq_eventdev_setup, + .launch_lcores = pipeline_atq_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_atq); -- 2.15.1