From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0079.outbound.protection.outlook.com [104.47.41.79]) by dpdk.org (Postfix) with ESMTP id B1E1E7CC5 for ; Sun, 28 May 2017 22:02:17 +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; bh=rFGAoxVnlbMcmOhiHCnwXXNAchO1D6Fi8RDvIoNa0ZU=; b=Wuk3Nn3APkgvIdKNvCJhcn7G3gTlraziQxAIL7SaiZmrxhokM325VdNeRq5meizzah6hbh1Y+Q07uwdXQkE6K/9nJylgAX04mgVIMJYrntJaUvFdzz9/IeEOSpgVBepoCpm29dO40+ss02tHlgPdhI19fZSWAKtpMiqqY7g7pGs= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin.domain.name (111.93.218.67) by CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Sun, 28 May 2017 20:02:12 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, narender.vangati@intel.com, nikhil.rao@intel.com, gprathyusha@caviumnetworks.com, Jerin Jacob Date: Mon, 29 May 2017 01:28:47 +0530 Message-Id: <20170528195854.6064-27-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170528195854.6064-1-jerin.jacob@caviumnetworks.com> References: <20170528195854.6064-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0003.INDPRD01.PROD.OUTLOOK.COM (10.174.214.141) To CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR0701MB1725: X-MS-Office365-Filtering-Correlation-Id: b5ef3fd2-3c60-45a3-8ee8-08d4a60470b7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 3:fz0tbn9i6/AYA+4G7/61PTyuXe8xuvIdV/QvSE2lRpQ2pZ2gO+i45KdRtJvzZEjQlYgabZTuCCoAGvfl3JCQiQ463crxF6Gz0ACQhvLAxcBNySJ2u4hxVULe2lkVw79oj/1Fws3AJMw3rI0Z3W07DVMLm7PQsTCTpyiS6GSh/EY2L4b7KSW938qqBK1Br9oxc3DPL3TWZuNcTqg3NVF42zLi4tTD26pxztcURxxzqLpCg20WHWBzVKPbkrhscDPVsbEbcaZ78d8s6m/VlE4b+aCAgH4k/+rNzztnT18A/Ki697aFuTYKmLm7YYKiUwWE59r4uZ4dVl696mXBf1S6og==; 25:JSVAYz+chT/kXerIrH1yDcEYM6DJuo0DdQTo6bK62bf/dF4S0lMvn4cE5XfzqXDvHkcVaO4aQve+MYeWyWz2EMlsXtm55Ha7FNXz95h414DoUGqaFko69faGurStolNDnx7/GW42DgLB5BV2MpYR7D2kqaVY9swuUnxTMCuGQ7CkV4M9eQVAb6wXkWq7WlEy46YcM1M1Tx0hfzIVcKUSKGC2SybE4FMozMtyE74BU6dCDGymByBL9B9+W+TYlPRCHA9ZeulRs6lh5PZq/maUkHwN7VKMvZXGq2i5lgtXbri3xk1ScnRBtlTJ0IXgRQdWLsqz2ZpNCP/457IVDNUThq+bzR6eyFOpMkCoybg2TzUNlDuT8p0b4RO4BBIv8V+A5r/u496XkYygW6tSHqMEaRr9zrxlJnLY6tbUMyIwMUrLprp8N0cP5EiF6cxzXkJ/tPJvBc4Ranpbz/7/1YhM41PioQBTNGB//LU/He1i1NQ= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 31:zaM4u4WiH1mhYQHaHM6uRsb4VVj7wVhGQIBr9g6K4bHpWLFw26CjDPio6BIFM3li4Qfva5RJKIxTKV7dNnQyu3HVJT5mk489yVRHEvRS1s8cdgt6FyjHIAkhc11MgIzc+bDl7E5njFFMGivhGbKO0sRD1+afynR6orc9RS4KYJpu967DqFtqNkSC1//GoPjIKePTphNvFNQfwL1Rn0w7NrQNCP4f8RW0QO6tZoz5f94=; 20:RwvcrJrS3OHs2JHy3C/D8hjXQXGobF6zoQPmpGBMndoW4ca/Xg8GFRAXGjlKLTUnkPcNMJLYudcJYmqaTZp3AAatjBcm73KwTkjarNIJfne6gHpTuvn6QVKepPTVOugSJ474dpWg9+QJ4QR3OC5qu6BbAZpCQ8TyieIWCMLtgejvs8NDi2zvr+qwydTFdrqnA802ynxPMDTTkaEG7RoTGiUBIzgGaqwFntx+00jc1teCaM2WAezw+y+LIEqAfa421U3Hey79rvZci2VCRiC+MzeQwWOTGFkFU6kCgNY6h6IMQCo0AxQKm2wc44lSX3NQEgILyNfeO+knygyJe3kBFj8BtRmKZInrQb1okrXwjnGSTEj3Uql+r8jyJqHJ3k35lyyXqwtuCqIWymWXsAPBKSOY3JHVY3nsMMzqYBk4erHv6xf+lIJx8iuKdzwG8ulpj+pwuMxzdfK6XxQaXg+CUTvRLkaICTLaAFTJpWU3TGOAQHipdlOJP0YnbdwcpCfMlQfg6FZGdVvk2fMyMUbg7fW4bVnXU/PcrhGFRr8H1EGzCHIM3BBm3wZy3IcaK5Xj78N5uccdUfOf7oHD/Wmtrs3/wzgqr+q3SFtnHxcIMfM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700073)(100105000095)(100000701073)(100105300095)(100000702073)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(100000703073)(100105400095)(6041248)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704073)(100105200095)(100000705073)(100105500095); SRVR:CY1PR0701MB1725; BCL:0; PCL:0; RULEID:(100000800073)(100110000095)(100000801073)(100110300095)(100000802073)(100110100095)(100000803073)(100110400095)(100000804073)(100110200095)(100000805073)(100110500095); SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1725; 4:bx5Rzy81d+5+ezZwrnBVwFU5KFAnOLu0Ouoyyfwg?= =?us-ascii?Q?K8UTjUtSVMDBbA4ld1KL77RluKo6AmRY5C3e7T/hUvsBlzvatyvH6WciL4Ug?= =?us-ascii?Q?mVRzwB6kXw1Y9h3XQjpuxuFPM4BUSrX1mfU4Q728YXf4bdvUyXfB2o4hkyb+?= =?us-ascii?Q?Sd5TY3PKHJBzIKnNc8ekqQ7oNGrDI2uckXG9G82/ai8KVDFFk8tNHBjH1c4a?= =?us-ascii?Q?TIWqUlb0qVb57M//736nFqBoU6qBLJAMyZk97PlcGTR091n6JQKzaF++wEsA?= =?us-ascii?Q?6tTsy9kAkZgcqSQP/GloZU1fwVj2SCeakDK3hsWKNmDK6RjNKitjThdbjxbe?= =?us-ascii?Q?mgeBHnIGqpDzHhfXIkgwucx4596lH69ovK4tRnS0mmrtj4sKdjxF/wPfGM2y?= =?us-ascii?Q?c0WL6Ei8X5nrhqdBLV1+zXfd5PUmdsnpB5owMKuar80Tkcv3f4GNdMjLA0E7?= =?us-ascii?Q?2654Jtic3slmyN14gNEXIps7S7vatlvn8COTN0IwxNAGCDwjfLcOFOPZHvL1?= =?us-ascii?Q?Mx+zxuIUdzbMQ2uuyg1IZF5w01zymApkFjZXJxdhb96yqpCkZFQ1N8crlepa?= =?us-ascii?Q?A3t2YzLwRketvGzZ6XiUbzuqNy4KCHm1Q3ghlea9ZoqyjE0KmAGSAEfH7YGi?= =?us-ascii?Q?sQFUHDDE51qKtCjywjM+BG3ombkRbzUBdB7eh8b3Xn8HF+R4/ng+QykBqeX4?= =?us-ascii?Q?8yfiCOzkMUHwsKI1Ot0ZIXuVvF7MIjCzqim6vdO/gYBtOPjQd6xKJyOmzqts?= =?us-ascii?Q?+8F8BuhJHLzjuTD3tUe6BnOXp2oVitRyW2FZlWz+4vZArAdXeGhyRlHCU3nJ?= =?us-ascii?Q?sgKHYkvjANJudln5dglHe9N3yFxLC76Jc+Y6nBeG+2moS4ryHnS8o7hv7Ia0?= =?us-ascii?Q?CZu3wCVCKsjT29zZ8VxNEVKx/5UhUi05wbDTfTUmGU8/FoYxzDgCylq/4d0d?= =?us-ascii?Q?WTMnGWGih4AcO8B2c0nVQ+qWlFunMLg28VvMC64CmDRWFyHjxNlRMKlnvd0A?= =?us-ascii?Q?fk7G1HjBPN/HAiIZ+v2bNygvSotTRRXUpqeY9VKB6cFjJYtc/8Xoqk4Fendc?= =?us-ascii?Q?5kmTZt5qwZcVhVxXo79130r/lDrNOr0I53z/A+fvFou3GQzYzCh27ZcuqaXc?= =?us-ascii?Q?NwxVYwEZXbQ=3D?= X-Forefront-PRVS: 03218BFD9F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39850400002)(39410400002)(39840400002)(39400400002)(81166006)(6486002)(966005)(66066001)(4326008)(50986999)(76176999)(50226002)(189998001)(6306002)(72206003)(53376002)(36756003)(6506006)(38730400002)(5003940100001)(5009440100003)(110136004)(107886003)(42186005)(53416004)(7736002)(8676002)(48376002)(50466002)(1076002)(3846002)(6116002)(6512007)(2361001)(305945005)(2906002)(6666003)(478600001)(25786009)(5660300001)(2351001)(6916009)(42882006)(2950100002)(33646002)(8656002)(47776003)(53936002)(562404015)(563064011); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1725; H:jerin.domain.name; FPR:; SPF:None; MLV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ObPAdumYBTuS51aIQenm9eixcAuTzcaltC74kGUH1XthrrUMGu5nTxS1mF33ua51yiSbk5K+CxHgXlw3kj6tyXZP+YXK5Ka2Wj06l3Wo45BRR1/S9VuOHoUY2lNGA== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 5:eEqcC7KJ5Ap0UDb3TN8RuFKv8CNokmEyrj3uR+qKNKE5IuWXQWz4YBZgSZKOx8N+P/qJabGYIIF1mSL05dgjDk4e0iyto0T15ac3GTjXfAMTp1Tdd7zNjvNiAwOhY6OGf4kmdfrppfqsgYJ1/dRKcXH0QWvAfJg2DoGkEus04I0pTKm1c9ka4R8tUQaMZUFWP6vMofQEUzydrHYPztZe55tZn6M/mC1JcJ3zTOQRVdFb8fi7gijMUYBC0l4oDgsz0sqNTHjieKK7/a8LpmXfh3JxzyGgofws4hIobiDZoa301QqCqUR+itfgenlpfZhCldxZSBKSRenqAmQnteHJVlzCY77wUaR5FE0iDhJAOSL+IjM0z0w01tNu4/EQ40SMLHUENo7CW0CH1TxAaEWq+UORap+515iNQVWya+DSKfh0pF0CgiS04ERLk5iQE4cMW9GuHVa9caSVdP84oMZn8J8vxKxwOIh7sm8AIyWYlkIJMdxO8WpBmXRFxRy+H6FH; 24:1KWXwzUgaHCvW5FHqsLrirg7r2NuPpaE5TNOb7lDhEPK2EpOf1WnHozG4aKyI5igaJ0NEh44clubpEdRF3jypYemd6m+896huIZoDlguDOU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 7:ZtXDtrWBo15P/aYQ4bUxq/CSQLY6d8XxhcvUOBWOnpls8q/GyGMPlOHbTrHEUMWPOm1n6MWcfBGxK+sVnY9kNCcCTvUoBaiLOldXOOoSGlQhzLOybUDMQzX1Z+EyKZgkjgH2IQ8GkAgMli3QOv4KEByvYMwUGJJTN/kFa70EsIzj53D8wnVwl5t49KjskpN2M6Shptn45c9JRA4F2KtjdtZ4/2eP2LNRzm3kzXHOEIicvdNF/q9Td2kk6mXHwG444qDKsvzjvIRTIkQdnAhiXzKEA333V1O6bu4elp0DoWzj50Rkq50Hwt48aBHFS/5AhWJtKMfhFIO5X0jtN5ZoHA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2017 20:02:12.9650 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1725 Subject: [dpdk-dev] [PATCH 26/33] app/testeventdev: add perf "all types 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: Sun, 28 May 2017 20:02:18 -0000 This is a performance test case that aims at testing the following: 1. Measure the number of events can be processed in a second. 2. Measure the latency to forward an event. The atq queue test functions as same as "perf_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 and enables flow pinning as the event does not move to the next queue. Example command to run perf "all types queue" test: sudo build/app/dpdk-test-eventdev --vdev=event_octeontx --\ --test=perf_atq --plcores=2 --wlcore=3 --stlist=p --nb_pkts=1000000000 Signed-off-by: Jerin Jacob --- app/test-eventdev/Makefile | 1 + app/test-eventdev/test_perf_atq.c | 137 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 app/test-eventdev/test_perf_atq.c diff --git a/app/test-eventdev/Makefile b/app/test-eventdev/Makefile index 7fed73eaa..4006896c4 100644 --- a/app/test-eventdev/Makefile +++ b/app/test-eventdev/Makefile @@ -49,5 +49,6 @@ SRCS-y += test_order_atq.c SRCS-y += test_perf_common.c SRCS-y += test_perf_queue.c +SRCS-y += test_perf_atq.c include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c new file mode 100644 index 000000000..963fa1954 --- /dev/null +++ b/app/test-eventdev/test_perf_atq.c @@ -0,0 +1,137 @@ +/* + * BSD LICENSE + * + * Copyright (C) Cavium 2017. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Cavium nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "test_perf_common.h" + +/* See http://dpdk.org/doc/guides/tools/testeventdev.html for test details */ + +static inline int +atq_nb_event_queues(struct evt_options *opt) +{ + /* nb_queues = number of producers */ + return evt_nr_active_lcores(opt->plcores); +} + +static int +perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) +{ + int ret; + uint8_t queue; + + const struct rte_event_dev_config config = { + .nb_event_queues = atq_nb_event_queues(opt), + .nb_event_ports = perf_nb_event_ports(opt), + .nb_events_limit = 4096, + .nb_event_queue_flows = opt->nb_flows, + .nb_event_port_dequeue_depth = 128, + .nb_event_port_enqueue_depth = 128, + }; + + 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, + .event_queue_cfg = RTE_EVENT_QUEUE_CFG_ALL_TYPES, + .nb_atomic_flows = opt->nb_flows, + .nb_atomic_order_sequences = opt->nb_flows, + }; + /* queue configurations */ + for (queue = 0; queue < atq_nb_event_queues(opt); queue++) { + ret = rte_event_queue_setup(opt->dev_id, queue, &q_conf); + if (ret) { + evt_err("failed to setup queue=%d", queue); + return ret; + } + } + + ret = perf_event_dev_port_setup(test, opt, 1 /* stride */, + atq_nb_event_queues(opt)); + if (ret) + 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 +perf_atq_opt_dump(struct evt_options *opt) +{ + perf_opt_dump(opt, atq_nb_event_queues(opt)); +} + +static int +perf_atq_opt_check(struct evt_options *opt) +{ + return perf_opt_check(opt, atq_nb_event_queues(opt)); +} + +static bool +perf_atq_capablity_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 < atq_nb_event_queues(opt) || + dev_info.max_event_ports < perf_nb_event_ports(opt)) { + evt_err("not enough eventdev queues=%d/%d or ports=%d/%d", + atq_nb_event_queues(opt), dev_info.max_event_queues, + perf_nb_event_ports(opt), dev_info.max_event_ports); + } + if (!evt_has_all_types_queue(opt->dev_id)) + return false; + + return true; +} + +static const struct evt_test_ops perf_atq = { + .cap_check = perf_atq_capablity_check, + .opt_check = perf_atq_opt_check, + .opt_dump = perf_atq_opt_dump, + .test_setup = perf_test_setup, + .mempool_setup = perf_mempool_setup, + .eventdev_setup = perf_atq_eventdev_setup, + .eventdev_destroy = perf_eventdev_destroy, + .mempool_destroy = perf_mempool_destroy, + .test_result = perf_test_result, + .test_destroy = perf_test_destroy, +}; + +EVT_TEST_REGISTER(perf_atq); -- 2.13.0