From patchwork Tue Mar 27 12:00:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 132473 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp4987250ljb; Tue, 27 Mar 2018 05:02:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELsr+dCXWWOf6b+DM4gWINXj2IUTLpW8U2GnbCykj/s65eAZ41OcG1Ev9jcYTuB6wbu78N6C X-Received: by 10.223.185.21 with SMTP id k21mr35395891wrf.116.1522152179434; Tue, 27 Mar 2018 05:02:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522152179; cv=none; d=google.com; s=arc-20160816; b=ViiUjPN4I2d/4Xp4TsRnjGuwOtEQyN2tKZeYVJIfhMwmWdmG0KCqbfJKKVeFWK8Byf MjZW5SiaTqPJ37wNI1hfD0CiwGy+XUMs2sDvVsIejGE7p5FdiLf/SCc0QjjdxmWutuWj nOeWIVTDKN40yrqHBHYAM8g3wI0KPGfu87bw5PyE72QucMVJ/RWYDEJm/753lVrLW5Y8 1Mi1TgWG3zDA6VkLvguotJEvLgHJp22s0ZYVOIcAP+bO9ZAM70NbEEJF+eBWaHxoyt+n pFBaUrokUgSTU3P6lz3qb49QpFZZucDQjvwthn4o2Ermayh1V5nQPKUl9FndT2olJiek Q5og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=zwDmmjb0OI6Dc7CPcP665yBgRctzfStc08cRBu/qu74=; b=bxRfx88GGjkNnqzfoRLXLU5GIt3RT3rKsMz8T/lBWFDOFGIO9DkcYQ0qkOO3DXWzes qUx4rJ/dhEEXBScoeymIg2QDDCgSLbLRWJMa/oedkzsoz+8TnsZI4htTUbjyVdmZK/MG pApUxP24oP9YXkCUlAAeB52ABFMyl6anMl3O5WAmSf49kSiVvxBc2vR7djMG9FnbH/Tr 0o5XII9K7RB8XMP7JLejgLaFBzUDVJmj+lAQ60sEK7ssF4Ogox/rQ6MH8qb9fNp+UxF9 m0i1HGPbMqVx0q1mh8PK8gFhnqLZOKsG5K8c10FltJTqYNoRZIOda7n81JoT03jBTXsF ZQLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=dKz1jL6i; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id n126si6949439wma.1.2018.03.27.05.02.59; Tue, 27 Mar 2018 05:02:59 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=dKz1jL6i; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6F1E13256; Tue, 27 Mar 2018 14:02:47 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0079.outbound.protection.outlook.com [104.47.0.79]) by dpdk.org (Postfix) with ESMTP id E7C772BB1 for ; Tue, 27 Mar 2018 14:02:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zwDmmjb0OI6Dc7CPcP665yBgRctzfStc08cRBu/qu74=; b=dKz1jL6iKK/zelvvp+NCvlQP6t250zOakqv0Fk9gGdIR1obadDKvvWLNiUMWKeySTe83pr6PDZwjnzG3qCUiGtzJ6u4oBirQi1xE98w+ljr9HuU/iwqwKlSiVDXT1/T+QFLu94YFkZX4OINLpsiTBI5Gmi5h/rN3EqEYTJ4ms7I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0753.eurprd04.prod.outlook.com (2a01:111:e400:8411::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.10; Tue, 27 Mar 2018 12:02:41 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, akhil.goyal@nxp.com Date: Tue, 27 Mar 2018 17:30:34 +0530 Message-Id: <1522152039-32493-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522152039-32493-1-git-send-email-hemant.agrawal@nxp.com> References: <1522152039-32493-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MA1PR0101CA0016.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::26) To AM2PR04MB0753.eurprd04.prod.outlook.com (2a01:111:e400:8411::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9f1b3706-5434-4b19-859a-08d593daa568 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0753; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0753; 3:KTKfTjXdQ5+/3DFHCyNAJHjnEZqj8QzjhzmU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aGsYUP7vIR0hmnrsnnGKuaUaFY/OPBNcIPEISWd7zUPQ2pzxCWrLCM+21B9kb1X1tBgIb4WBt9CoW9qxu03nrCDptX/YpnEJ9ya0zrOpLNs1KtlNLNtg3PCzUPYikv+bNLvGy1YBi4xABufBXnf5XZk6eGQ/q95rYTa7LhGqGx1vutCyFd7Dx/8cVc3LpMgCnR40pfpLeoh/OOJr8FEwU5s/Qb2B3Ga8/COrW6p/JYUDtJ2BLquW4JEN/q0FpggeVSXTBPXAbr2vnfZJVtnGF4/3OfGcpL/Nda69DiLuYLOOdLoRAAExaOoR6H/F53; 4:bIYk5jb1R6yFnXD6gYmGwRHXs20pgrV+VU5zyMbwwsN0c16SbS4qHX8HPUhq2XyyZBm5Hw1kPa2MPQOhkt6JKtyJEJErH1NtKzXRoECV+hwwUkpMRMELW/IIMKABrk5+mwj3SI7aQJ5V6xlflY81zU6oqWOuZuLkFH8uXxQ8zMqAG9xJSp1Gekz7QSafwzSCtXg1WnxGUrmDM26DJjAHifMyBe7RIp1pQ1SRtxbK8q+PbP4NlUIagfDc6mwfUqwz7VZZmegdnUYe++deALlk1lDWyxucOrhlEW3kEhQebd3ZqbWvsVUX084Irj4D27OT X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0753; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0753; X-Forefront-PRVS: 0624A2429E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(346002)(39380400002)(39860400002)(376002)(366004)(189003)(199004)(50466002)(6506007)(186003)(11346002)(16526019)(446003)(386003)(26005)(53936002)(55236004)(6116002)(48376002)(5009440100003)(3846002)(66066001)(68736007)(316002)(16586007)(6512007)(476003)(2351001)(47776003)(486005)(76176011)(486005)(956004)(105586002)(2616005)(305945005)(6666003)(7736002)(6916009)(106356001)(4326008)(2361001)(97736004)(52116002)(86362001)(8676002)(8936002)(2906002)(81156014)(81166006)(478600001)(5660300001)(51416003)(36756003)(6486002)(50226002)(25786009)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0753; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0753; 23:BsdUhUZ3QRe33rY1FaHbl3OBkT0gm0HgEzX40ZBCW?= tiwar/c6NaKvPgr0+v6mfwjLnvHPkor+Hzl5q3yK6BQvCwfY4S4C9x2HSs5ymoVYhlOX7+oig5ySamOHoIRq734aHoruFVjEcQqm3CWmeBZvGt/zBIYVbnf3K2FBXhIi8w9aI0Z9uGtVcHq347ODXCRR9bwekyIaOimDEzvuOdjd6U2zo6hFWGV1yBFjJjMVrYN/pd3eK9YAy1XmoaQ6BpjkeqQ1Et+ENItK2hnqVvs06TpQPzd4sNhr6wJVsF4gqOF6tJRBuUsxao91U+EnwdkOLQxMnosEzVnOG9hYZYMQjsRE3li3IzGcQET/uk+HDEFVwi8emGHpe2R9oAxGWiYAfqzMVJuWgfYVoM3GLJ6Pz2Pe1s5cJzGddcGxci1K3ZFSB/itZWzmSH874VjTSdtW+xDj6nEE82E6owui97bdIfG/vutTCp0PAXEK5xk4qQXkHiYk7vkI79RgNM+6FXCc3bw3ukfpIXzmrZ25KCC3SrsXqo0JKkoaOCcAeo28UzZcuv5rqAKmi7G4QbnRdrQdQu1p3ilUbW6AWp8jC0cUa3/GDVlZvL0m1hAlTfGK4kxTQDM9I5NBLFQXjXCCns8AKVclIduYH9ix5M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0IYLCbxbc0h0GEqG0WVPSN7dZy8cMKnj0JbcDeGpGOcvUwuU0NUpppCsrIaEgAbk4ZMMwOA2ptkKqwhSckPN0MrV0aRtFlNcoD6Q6W3CD5O26+n1HwEd9MIjQ74prgfaj7vRCWtGxoG2FiHEDwIKos76g09pU//0gFT69WFR4TasghWpx8hBSwENC2iw4YCugNIaWKmHQugJMCLKJQAJbL0Eh8UR14kYhfAOu35C8Yj2ogoUVcfap5njjR5QsLhqAqEIGm33G+gonSO2TeLCjkyt93H+589P9SRiJWoY2Ocg==; 5:2aRN4duP1uZIT5/DT6lzuBMjOR6aRqkD7TBCvi1vvnLkDI8j70HEe+Un/J4rBaXQwPJafwEfRBpH0jIctbUz1p7Q0VI6f3myS6YjzM+JaU3dkaUfJG4YUNjqSjg+lVYwWg7yzNTbS1NxPXGjmLjfOQ/1Ald4qwp5CPjdF0bBL+o=; 24:V5D+rNErQmHJk1ZH1wa88nkAIgC20ZW66pIe1QWtPoAByFY6C21DzTt1JYiZkHBy5yfFRSir0od5sJes2OaQ43jSsWGwdyZK73NCfC0mf1Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0753; 7:8iWnZ66iq4709bqiSfsWwFFnACYpKcaYPzD8h0075difP4siPv6uVk7mZjP4aJQuTwf4wW+SOI6GIb8nJc1kN5KTTnlwzSxSChekUnlHrc5239u5PnX687A5ytsjAKj7o3B012GbzqCuhZ92ruCvFLSYm9cnEra/X1CtDHvUzBoiTEhhuo6W1oZORZQdkQFO+iwD6qJ4MgmZQFdbjMDKaI03Z4/JKQE3o2VcKcaPmYNBqTnvN9hbzcQZAD5vQa+0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2018 12:02:41.9098 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f1b3706-5434-4b19-859a-08d593daa568 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0753 Subject: [dpdk-dev] [PATCH 2/7] app/crypto-perf: fix excess crypto device error 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" If number of available devices are more than logical core, no need to through an error. Just use the less number of devices. Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- app/test-crypto-perf/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.7.4 Acked-by: Pablo de Lara diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index 019d835..dd666f4 100644 --- a/app/test-crypto-perf/main.c +++ b/app/test-crypto-perf/main.c @@ -80,12 +80,9 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs, nb_lcores = rte_lcore_count() - 1; - if (enabled_cdev_count > nb_lcores) { - printf("Number of capable crypto devices (%d) " - "has to be less or equal to number of slave " - "cores (%d)\n", enabled_cdev_count, nb_lcores); - return -EINVAL; - } + /* Use less number of devices, if more area available than cores.*/ + if (enabled_cdev_count > nb_lcores) + enabled_cdev_count = nb_lcores; /* Create a mempool shared by all the devices */ uint32_t max_sess_size = 0, sess_size;