From patchwork Mon Apr 2 07:36:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 132648 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp2289978ljb; Mon, 2 Apr 2018 00:38:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+KTr3YZHJk0LQ3ksFtwS3XSQnWedBVb8I8B6f/VrVgAQlwWh5hhHF+Ctp+gNjvGlmg1JCe X-Received: by 10.28.170.78 with SMTP id t75mr41830wme.55.1522654720989; Mon, 02 Apr 2018 00:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522654720; cv=none; d=google.com; s=arc-20160816; b=DLkGovKCCFKLmLAySYl2bXFUm8kXnOklKLVnZxAl1ES1YFcd/XVm9oMOj6qZSP5Ee9 Q0xf0WHDK3mMpQoF6/ApQhwMG9/a9DWGyO17PJeGoKL+E1ZIxHR203jqUisnyY54p9pd zEXcxaX63cocgUgeCkZ1/j5Wm8jrYZNLpSw8F/MmahEM6c44Cqp3PiYVw3e+JvEa6B9m sBoBeWEUIu17tL1ntIA4QzzdHciq4BQGY1RQM/T6x7TSHJtsFeCW5ee51TeF6eOsKnpn BumYJsyXzGZppja2h9/9RvVx6+KT8pYG4eQ+QTnpW9d/C+AhWxI9+l4iEmiJJCTR278t uVuw== 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=mYGAajbpG9ajHjtwBbdHR8y119LcolMmSZzhhSSzAyE=; b=XRXkfCEm4BV+vLJmCg3Wy5vYk2995wo1c76yZrDNZGLU0DzfoH7d1wHsAeRlwofUb+ hLNM424VLD455i76yLG3u3onKUn7P7OSMZwTDXOlxlf2K+lmd5SQQciibNLXf3lscqly BNzwNvTd3pVoXKtQRtbFWFLIJK7gHnuQ3Q8ilgyS878iagwh3NsQ0u2YbyqDuvP2p1R6 sl5vXvzD5XJVHHb+qWQ65tHHZxGCe/C8xjwjPAW3ntqIKJPPOgT/ARHlt/C4ZrvjjY2y d+hmMVQX3htaZ80E5TOUzhlF8L1t+UXn3dfrSP3yYcbQwmVQZDXgz5NFEHZ9ZVM6YbG7 gCgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=axv47eya; 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 w199si15944wmw.196.2018.04.02.00.38.40; Mon, 02 Apr 2018 00:38:40 -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=axv47eya; 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 E42AFAAAE; Mon, 2 Apr 2018 09:38:31 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0085.outbound.protection.outlook.com [104.47.0.85]) by dpdk.org (Postfix) with ESMTP id 48E87AAA0 for ; Mon, 2 Apr 2018 09:38:29 +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=mYGAajbpG9ajHjtwBbdHR8y119LcolMmSZzhhSSzAyE=; b=axv47eya5nkuRDV8L7Yu0VVEx87GjCHXw+ewYROsUfW2Q4889PDOe+zmIz5MgXwBGLCd/0FzI9YjEx0u3zsSwn2r2Gm3v6TIvOdrS05nIBBHHfdTiipZUn6RWcxxGylgyQzLIw4EDmJm/tzqDV06ck3MwOTAMq7/sgfoAK7qRr0= 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; Mon, 2 Apr 2018 07:38:25 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, akhil.goyal@nxp.com Date: Mon, 2 Apr 2018 13:06:28 +0530 Message-Id: <1522654594-2757-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522654594-2757-1-git-send-email-hemant.agrawal@nxp.com> References: <1522152039-32493-1-git-send-email-hemant.agrawal@nxp.com> <1522654594-2757-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MA1PR0101CA0048.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::34) 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: cd36293e-db2c-418e-8085-08d5986cb8f8 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; 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uLk3L4L3kgPSfxsXfC43w43h4FLHph4270btcraff0x9HYe68cfXKcci79XxedMxbeCx8cT4vjuWyBu/jsDTdaUSq9qP0tHCuOe7tyOlQxGWyu26A8YM5lLdGue8StQeAMQiVd6PAjo0tlF081F27dKqBqldr79RmMu3anfVMbMF673U6zwDTBX0aaxpX6v5tWjlLQKb1fpUwlQq0r07sB4XEhbgcsXmXCTa/SqP8icVqJ9M8JRCTzZeqnDy8/Tp9LdGtAsXJtOKj6gjlLqUjYAaa8ECa+sScRsxc0zY4kdEK60XFJ4om2E5hBVDZk55A4cN10Cnxt28KJhohSbT5IubMtskbBv; 4:Fv00AWR9BkDrnp7/sXd2pQT3Us4mOqW3m8aFUUois0MXvTcXVBY20gSQWI8u9nQ/Y4ulejnmoPa44LB98nn6/W4i/uNMHhUN6N+kjMhd9g6NZU55rya9NBKARHINM176TdVhuOQROAFjptX2c9xNjqUpcIlzTn7xF5nJb7UbVunzdjKTl2auGQwpDLx5QV/Vom6/nHKfpMguE8pWjsPKVIJiDc+1QUDr7wiv7SkLfs66hkXa8vNnrIHeDhXLJM7o+lZiNNet8noEXsD8bnC1xG5axm5oZViyUOTYNzIrKS3FpzoX/7BBLeD3DAvxb+zgyZPMJN/bLydOD1W9sD8VuN9GUIuhzoRBsLW5/0rObNY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0753; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0753; X-Forefront-PRVS: 0630013541 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39380400002)(366004)(396003)(376002)(39860400002)(199004)(189003)(2616005)(106356001)(76176011)(68736007)(16526019)(50466002)(486005)(5009440100003)(55236004)(6116002)(48376002)(3846002)(11346002)(47776003)(16586007)(53936002)(66066001)(305945005)(316002)(386003)(6512007)(956004)(446003)(105586002)(7736002)(6506007)(186003)(486005)(2351001)(6916009)(26005)(476003)(4326008)(2361001)(36756003)(86362001)(478600001)(2906002)(5660300001)(8676002)(50226002)(8936002)(81156014)(81166006)(51416003)(6486002)(25786009)(97736004)(52116002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0753; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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:eT5exWNci4Sqs/RnR+9Xc9YvpUinPcnAFbZCqh2PT?= j1nWY8lICFRoodOtv9IEDHFuxeT61i9SkXdSFqCkeKf0PwQPQeM/vGmaoaIHbTN5q/2lwEW7OWVKsrQw/NMZoZh0BIkgJ37tcH4AGq7kniModY6D0fUxAXHBxa8fMKXVEXP/msjrvGJ8rfOwjgZ0iT0eybPM0ilO+6rJUNdFhxpi9GXtA9ArCB9kdocbnQvfvdXWv3wuXFOzT2Y85tkzjdobR0DdXRJoW9tQtcJJ95WPb/eZF65V2ZljwXJFDcq1z19crF54R62NUmjyBuJ//RrdtZ1yPnZjBEkDb9VU7vl6nEkLu3sF5/AkWV57Jv208wqhbiAtPW9fOnenJv+Kxuzr+NOGjsB0pB0nsdZiAZJA2sqHFaXUDXapw1jF0b8ombW+WVKal1S9hOCW8wLYSYT2bDOeRhGb0Q4J8aYk7VPI5XcjTWCsC1V4ocSBYm3XYpsr+/vLrbFRC6rMomz50CxRzoUtiE3vXOMLZ5D2ZUVBtjkXqO1q3NUiHP8ObJ/m4i4+urOw8C1c3khHuSatFZ2UYwJAH82j2yq2CkVP2pGF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DUqmLXpm7U6rNiHqeJMMXF2XmfPdSqNE52jzYC6gWmx86jiQr7V5floAdRDVGrbfqC0T2cO/N2Y1F7Z+rsecle88tAofgX8KN0ECJcndWO7qpIBCfm/wNE6vDGr7Q4B4+vNTKXSJKfPOKsxxXA0/23CMhQPD7NbYjfuFqBImhJScVwloyzRXobgF/nZwXyurf3o388UygJGWdpjuJ0HaQeny8gVIDh/4c4bpVR47P0gHpWf59ZI2JFBJUPeAq8vmZ5XZn+P7B0EryJYvMcFqYozb0+mfz6hJ3IiAa5cB62FIc68Y6X5Zwi4oGBB+mnuEvV6F21RHh4VsBUpy67baZjTpg==; 5:/OIg6SJkRJCx9mP0rQrA5SEv066wi64YK0LOrv5geMCEzunZifRe8Q+3aJpeT+DjcmiagZ5bVbnExJZiHDPQWCu9ZnzJAGdozRa1UpImpl5TMP23jIb+QzVXzrzpljvRK7Go0UxqDjYecOSCQ4XjsZHEA7GPnHlem+4zKEfd0G0=; 24:WOhdrp2ot67VleLV8D3ps5ZNl7WuHmNFppwSBj/A3h6dktjYo8/Bv8K/nyv+BYA7boRzYpwFwwZ84zBFyFCx7YTjZp2lP4cvDJ1sarvYiJY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0753; 7:zCMR5wfyU7rk5CKM/R3L2PUSl+FVu8x/siJoslAIq4uk/puaFfNaT5clr3tzND8T+LpAyWYf2ICHnUVUuyHJIMX1gfP6kMZ9N/xjB4lnL9sgSf2BLkyS8b0nXMwWCHuiaH7wG1G+zCxSHHSKARoJVsic7nMbW18z3aP/wb746zSUeaa3l42Ok90ZIEw+Qf63X60hL8ePgziDnedBpCGW4x0NaOYs7G3c7l3ZVJyhB9mVz7SoMUpEi8bjSksbtpmj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2018 07:38:25.9097 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cd36293e-db2c-418e-8085-08d5986cb8f8 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 v2 2/8] 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 Acked-by: Pablo de Lara --- app/test-crypto-perf/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.7.4 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;