From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0059.outbound.protection.outlook.com [104.47.41.59]) by dpdk.org (Postfix) with ESMTP id 991C51B2A1 for ; Tue, 16 Jan 2018 16:18:27 +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=dRVqzh3ZktmknSx8a00mcsfhk4+W/diVKW9aPZteW3I=; b=VLc7MrlxWdlWwphl6xTk88L/PDesBRIiunlFnuysZe63dycNMkTUh3JskEXRTAbPSNpoqp0j+9viAcuvKy7WXewt7gR3OWroPTNYt8IaCh/4WkRyby2yF53MTPpcf9S2AHn1zcuw0zObFnLGzVG1jhlSPkO/7/0dumBTYYBaNqc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by MWHPR07MB3469.namprd07.prod.outlook.com (10.164.192.20) 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 15:18:23 +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 20:47:19 +0530 Message-Id: <20180116151728.566-4-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180116151728.566-1-pbhagavatula@caviumnetworks.com> References: <20171130072406.15605-1-pbhagavatula@caviumnetworks.com> <20180116151728.566-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MWHPR21CA0059.namprd21.prod.outlook.com (10.172.93.149) To MWHPR07MB3469.namprd07.prod.outlook.com (10.164.192.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c592a0ce-0e32-4a8e-a1c7-08d55cf463be X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:MWHPR07MB3469; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3469; 3:jCoSxLfiFohEoZypVGDYsJj0G73MW9QNVCHJM/OfeiIO1IfHqOWSfMkdDjfm7J3qzYpeFBGjkYlFixCb87tvD/9QFBLMec9E4vBgLJDxB2qpDsOWp8MdzsqhZ2klS9QZtCLYFhvgkvnKDpA+yD6hk7NNCIbIYV67qPSMbm1bPN4FawXIosdj/BFNGZDP9WnhLFEqtMncpnW7zt7iuulklpPzomO1Ia6LmyeLCfyg29Z3rs6oiBUSqozRcX87jgPq; 25:R0zdYxSgjDtijVEsyTA6f3Bdfp9TJLp+lXVIDsv9w/q+5fEn4VLfA8MIj7wOA0yFCEKJXMzPy89ZhS8qcr+87lY9usppMTf4NfkF69RjJP/cJmPl4wtzugEZylLHJR2Pzg/ZnNgTmbHDNLciD7Y79Ny5SzkOMhs54x9sv1YpKCxdUYKM0PbikC7cVNkTYxSi/6S0fx1QnbT6s/4J9M4/gXvLk3Jh985rSEgcpEk8S7b2+/ehHQKJRdONOvkcRUrxQAVHakrUF5xc9kjUNw0gCjAjUlYPvocCArCYxcJ0lU7oBLTz8EbhISDEVZUtjbxZyh7RX9gZGXjsp0gYnb6RnA==; 31:nFJqcGTshLcex1wOBDCc7KMquwbWOS/1JZ0ZL+8FOUc1JWo4KNT2fyDBksONBccW+CEKeP/R9mA3sBsfFjUqQpbfPrrDfYrInHKhGOU6sDQhu6Neb9F+XpeG5q4+tP/4vwYVURIv3OWjo0qncp5d1Wak4Xgfq/Ga23++b75bDYbDRrsBX6XZGg2+f7jQIhIClEw1p3ljjR8TW81k9iS7tn3snIUWppOp4jXFwqKkkHo= X-MS-TrafficTypeDiagnostic: MWHPR07MB3469: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3469; 20:vVVbyCA/A3O12/otKW/rRXdvPk0wbx3Bx4MRwmkAa5MAFg9PvImSYj3uxJf3CmnYecA2u6utRL3BwqHHIPFuxU1TbbGDZfYPVQtBw8NESzHhWMkdihS4eif04K7AXfNiDUFRgewwX9TeyA4I4Qnkuhj204RlWvftzi95mtJ0AF6Rz7U+E0gk/8knzlXUfqm4aCNSaQSgIWOYISeJOGKNjuq5C8o+QzW70ENU9QCKyCHkDzEqspidvGrEZIk2tyaPP/UrFOAFqtAMZ+LhwRoHUPCA8VZ6GLRdnOwFbqP0kODvZuQtz5uuDrbKp1o6fiZp80VzaZv7wzsFeR+n++RQF99yq18uE7pJSJm4RPbM1KzhiksiWkhyU02dUUIshe+PlmkFz1K5+Hqym/O8pJB6+bgbkKjAJJKHB9rvTxn63eoSc+TYTg5RfmTl82tQddk1hhcBT2lTEkkVzf/Y57vzBtzjbHh+0qVh3yuISddboeQXLDAqTGfkjSD90GNMsSVkmt/ycipwfQWc9pRCuvP9VwrFzl0j/LRmuVizedQpZKTZHJvrVjksGigeN18lczC16hkxB+EjMBK40YkgdR7stoqH9wEaqpLDdZiJPF9hYSc=; 4:FOie+AmUpxqNlxnuEgxVEpS8Khojqv+cZVpK1M2M+3zNU+g7B3LZXWnGxo8qX87YiWTcdVTAxiyzVZS12xMGqLIp/1DiCmmNnYrle1vghNj2T2O/YDnQOfJ5GKUDPA+j0U58249GuK0a3kLnVogW85dxi1eXnULJY2knQzUg+9yhRnpfLjNz40SWoI7z8BiUxKN8cHqzGTf1qnBUU3lw+s6Mo1uclWcMiK0HKyRkcIFSX3VAhtRRy75XGOpK2vm2mZhXp421EOtpT/5x1uq6hQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(3231023)(944501161)(93006095)(10201501046)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:MWHPR07MB3469; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:MWHPR07MB3469; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(396003)(346002)(376002)(39380400002)(39860400002)(199004)(189003)(2950100002)(4326008)(42882006)(5009440100003)(6666003)(107886003)(25786009)(68736007)(16526018)(72206003)(478600001)(316002)(5660300001)(16586007)(26005)(50226002)(53936002)(7736002)(305945005)(36756003)(53416004)(6116002)(81166006)(8656006)(69596002)(8676002)(6512007)(81156014)(8936002)(97736004)(386003)(6506007)(50466002)(66066001)(76176011)(59450400001)(52116002)(51416003)(2906002)(47776003)(48376002)(106356001)(3846002)(1076002)(105586002)(6486002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3469; 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; MWHPR07MB3469; 23:6cZLYQcoUK3KvYV2IE/Y5CVT58yYWij7DQtbXYKtL?= =?us-ascii?Q?fV9LyHCkIremi0MzfflKcGdoUrAbk+DZRz+3291EaKGJZVzwa1K0yFoPPTbA?= =?us-ascii?Q?SaZve77gM2h87xEf8CepvsW8HqQDBurhHoJRLzJCksM2s8cUIGu7mvR3RQqq?= =?us-ascii?Q?YEfPm3lq27mAzyZ0dZp23oxJh/HLeY4HgdxqZikJ1HuC/RLotbWyQQqG8lWf?= =?us-ascii?Q?LQEqXpNc1FywqfwJX/NLSjv5edsn9b0Il42gsCTh7mvJ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fg8uUusPFMofVKCxQ4wA0111rpSnCZ409baALOPYQ8I SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 15:18:23.4411 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c592a0ce-0e32-4a8e-a1c7-08d55cf463be X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3469 Subject: [dpdk-dev] [PATCH v5 04/14] app/eventdev: add pipeline opt dump and check functions 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 15:18:28 -0000 Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/test_pipeline_common.c | 84 ++++++++++++++++++++++++++++++++ app/test-eventdev/test_pipeline_common.h | 3 ++ 2 files changed, 87 insertions(+) diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index ff60fc36c..45e0652b8 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -5,6 +5,90 @@ #include "test_pipeline_common.h" +int +pipeline_test_result(struct evt_test *test, struct evt_options *opt) +{ + RTE_SET_USED(opt); + int i; + uint64_t total = 0; + struct test_pipeline *t = evt_test_priv(test); + + printf("Packet distribution across worker cores :\n"); + 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, + t->worker[i].processed_pkts, + (((double)t->worker[i].processed_pkts)/total) + * 100); + return t->result; +} + +void +pipeline_opt_dump(struct evt_options *opt, uint8_t nb_queues) +{ + evt_dump("nb_worker_lcores", "%d", evt_nr_active_lcores(opt->wlcores)); + evt_dump_worker_lcores(opt); + evt_dump_nb_stages(opt); + evt_dump("nb_evdev_ports", "%d", pipeline_nb_event_ports(opt)); + evt_dump("nb_evdev_queues", "%d", nb_queues); + evt_dump_queue_priority(opt); + evt_dump_sched_type_list(opt); + evt_dump_producer_type(opt); +} + +int +pipeline_opt_check(struct evt_options *opt, uint64_t nb_queues) +{ + unsigned int lcores; + /* + * N worker + 1 master + */ + lcores = 2; + + if (!rte_eth_dev_count()) { + evt_err("test needs minimum 1 ethernet dev"); + return -1; + } + + if (rte_lcore_count() < lcores) { + evt_err("test need minimum %d lcores", lcores); + return -1; + } + + /* Validate worker lcores */ + if (evt_lcores_has_overlap(opt->wlcores, rte_get_master_lcore())) { + evt_err("worker lcores overlaps with master lcore"); + return -1; + } + if (evt_has_disabled_lcore(opt->wlcores)) { + evt_err("one or more workers lcores are not enabled"); + return -1; + } + if (!evt_has_active_lcore(opt->wlcores)) { + evt_err("minimum one worker is required"); + return -1; + } + + if (nb_queues > EVT_MAX_QUEUES) { + evt_err("number of queues exceeds %d", EVT_MAX_QUEUES); + return -1; + } + if (pipeline_nb_event_ports(opt) > EVT_MAX_PORTS) { + evt_err("number of ports exceeds %d", EVT_MAX_PORTS); + return -1; + } + + if (evt_has_invalid_stage(opt)) + return -1; + + if (evt_has_invalid_sched_type(opt)) + return -1; + + return 0; +} + int pipeline_mempool_setup(struct evt_test *test, struct evt_options *opt) { diff --git a/app/test-eventdev/test_pipeline_common.h b/app/test-eventdev/test_pipeline_common.h index 569db1de5..6e43eea2b 100644 --- a/app/test-eventdev/test_pipeline_common.h +++ b/app/test-eventdev/test_pipeline_common.h @@ -51,8 +51,11 @@ struct test_pipeline { uint8_t sched_type_list[EVT_MAX_STAGES] __rte_cache_aligned; } __rte_cache_aligned; +int pipeline_test_result(struct evt_test *test, struct evt_options *opt); +int pipeline_opt_check(struct evt_options *opt, uint64_t nb_queues); int pipeline_test_setup(struct evt_test *test, struct evt_options *opt); int pipeline_mempool_setup(struct evt_test *test, struct evt_options *opt); +void pipeline_opt_dump(struct evt_options *opt, uint8_t nb_queues); void pipeline_test_destroy(struct evt_test *test, struct evt_options *opt); void pipeline_mempool_destroy(struct evt_test *test, struct evt_options *opt); -- 2.14.1