From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0081.outbound.protection.outlook.com [104.47.0.81]) by dpdk.org (Postfix) with ESMTP id BDA7F1B513 for ; Wed, 4 Jul 2018 14:15:42 +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:X-MS-Exchange-SenderADCheck; bh=vKu5IJZZvrIU40VJyPribCVJ4vp8qmH/SjuvQNspuVQ=; b=sgsUlUnPfKM9zMTBtMqSwKBTSE6Mngkoi+bRCJq1MTN0Sl1OpH/9YuAAWQwzT7H4sM5FHbEZQ0gX2UoAXURG2r1yrPKGKcTuNYNTzDk5y6QETUnBIuFzVa6e7Po0k94FB7XbtlleEm9bYfAgN8Sv7b2ALPamWZGO+k+d5zQMKDU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; Received: from [10.232.134.144] (14.142.187.166) by VI1PR04MB1389.eurprd04.prod.outlook.com (2a01:111:e400:5348::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.25; Wed, 4 Jul 2018 12:15:37 +0000 To: Pablo de Lara , declan.doherty@intel.com, shally.verma@caviumnetworks.com, ravi1.kumar@amd.com, jerin.jacob@caviumnetworks.com, roy.fan.zhang@intel.com, fiona.trahe@intel.com, tdu@semihalf.com, jianjay.zhou@huawei.com Cc: dev@dpdk.org References: <20180608220234.10170-1-pablo.de.lara.guarch@intel.com> <20180628005304.26544-1-pablo.de.lara.guarch@intel.com> <20180628005304.26544-4-pablo.de.lara.guarch@intel.com> From: Akhil Goyal Message-ID: Date: Wed, 4 Jul 2018 17:45:23 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180628005304.26544-4-pablo.de.lara.guarch@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR0101CA0039.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::25) To VI1PR04MB1389.eurprd04.prod.outlook.com (2a01:111:e400:5348::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b0bd7d75-e32a-40aa-872a-08d5e1a7daeb X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB1389; X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB1389; 3:sxDW5CACHVKMTXOtgRIE1thtow2BSJlkAEAF6p3Ulh34BaJreiw01B8diUeLMb1FyY+K494TGwfmDxom2RNow+ZpNF1ecdmupfvQA3XEE9HWtzcVFIN/GVgRowUi9Q9qvaKpIXM9IWQ9umbPrxkmuzb3kkorqXZs8gyFg24MVbOUozbJ5ynrmykAekf8lxbtYSDkyMc0SVms9FSDYLorqIT+vvj0gUWdr2jPRPerFbUBtYQsqDNtI60DdUwta9SY; 25:+B3gsubVsUmlbYWFPHHP8Ou1B51SpSuFrFaJPvvKdYiMEFEJp3lro2k+klUTJeVZpZXQQLwRgeqvl3LTxyR6f6wSyy6fh4wsiA6rXn0H2MEcSK7dsIA1l7+pEEucezs/YStRujXl4nR/14QR0z/i2K8r6HYOdTmn4xUPXFtJoWRPq0ATuDbcscOAgo/ufEyWq3Y+JoZL6IEgKuCqmifJGsCEDJ9C3GAZrg62k2rml/zLBGYSYwM0/d44eJs/bHyb3mWz1Qtn/QzQj4NYC9wahs0zBliXQN6nNSw0RhsprrwFe1kfIVs9vR5mko71qMXDCj3TOpN56BqkKkJNmPvO5w==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SaE56mLH9Ck84QqXRpesNS2RXup+giaDovwi/WNgDh51V3SU7E+PQ7espOdEq+i5rU X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:VI1PR04MB1389; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB1389; X-Forefront-PRVS: 0723A02764 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(136003)(39860400002)(366004)(376002)(346002)(396003)(199004)(189003)(4326008)(106356001)(305945005)(44832011)(11346002)(81166006)(3260700006)(81156014)(50466002)(25786009)(446003)(956004)(55236004)(8676002)(316002)(58126008)(5660300001)(6666003)(52146003)(478600001)(2486003)(8936002)(16576012)(2616005)(64126003)(52116002)(53936002)(2906002)(53546011)(386003)(65826007)(229853002)(476003)(230700001)(76176011)(3846002)(31696002)(86362001)(186003)(6116002)(486006)(26005)(14444005)(31686004)(77096007)(97736004)(68736007)(67846002)(36756003)(6246003)(65806001)(7736002)(7416002)(65956001)(66066001)(23676004)(47776003)(5009440100003)(105586002)(6486002)(16526019)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB1389; H:[10.232.134.144]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA0TUIxMzg5OzIzOkUwbDREU1NDY1BDQnpKdkxGc2dEdWsxNEdo?= =?utf-8?B?cVVya1E1M2FoajhnbUlDWDh0bHFT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IOyzreTpdxyYrJpEVgzf79hj75T9jdsrUGKnz4BKylcV0RlPlhizAbB7Zv614pPIN191G18R8UFaxa7Z3E1w/F0Jc2wc3n9gycdvu4dm3pp1efNVD6t04q25jP+xPm0VwX5c8DA==; 5:h2YYS7ER3L6PGHbZPgGSPA7FMAbT30hCJ9GrM2Mh6Z15fhVcHn6MICZ3ONXZunJOIjO7BSgd0W/oqm9a3z3lLC2OCWTIoYZFhrcHUh4OBefItw8hJrDw4Ma9jCzmHZS5ZIra5COX4j6IFxv9zccvuAaMUjM+MDn0ReoVQc14IVI=; 24:l+V9WAsmHsMLL7xHKTngKGPfInpadWcHSh7EBripRNOfudPjj9mEhuEfDaav/TI724nWWYzIngE+GBNPAZSgQsAOTmwQbB2RlOX5O5CunmU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB1389; 7:v6QqG3HsEFpndcVqjzi+E8SBVubghySerMiH0ty4gLqqvPla/raCy9xjIY0ave1fxVNyrt3yL9XUmRdcoxtB2vCkuO9xVij9+PIi2tAUH6nGBlJ9Jw8tUV/Y7v5YDmkgkfwtmeR5rDaPzgQ1U29L2fgZdpnkBO42ffpzSyB8V9J2AvmiumXjuJuHuelYs9DD3rvP76EmeQaZ8Sbkf6Eg+A+SGU11sF2QNS5O/4lBK0Irn0FGIetxkQ8MfofA0Ls+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2018 12:15:37.4074 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b0bd7d75-e32a-40aa-872a-08d5e1a7daeb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB1389 Subject: Re: [dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of sessions 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, 04 Jul 2018 12:15:43 -0000 On 6/28/2018 6:22 AM, Pablo de Lara wrote: > Instead of creating a fixed number of sessions, > calculate the necessary number based on number of devices > and queue pairs used. > > Signed-off-by: Pablo de Lara > --- > app/test-crypto-perf/main.c | 31 ++++++++++++++++++++++++++++--- > 1 file changed, 28 insertions(+), 3 deletions(-) > > diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c > index 4ae14390b..b02d3f597 100644 > --- a/app/test-crypto-perf/main.c > +++ b/app/test-crypto-perf/main.c > @@ -21,7 +21,6 @@ > #include "cperf_test_verify.h" > #include "cperf_test_pmd_cyclecount.h" > > -#define NUM_SESSIONS 2048 > #define SESS_MEMPOOL_CACHE_SIZE 64 > > const char *cperf_test_type_strs[] = { > @@ -149,15 +148,41 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs, > .nb_descriptors = opts->nb_descriptors > }; > > + uint32_t dev_max_nb_sess = cdev_info.sym.max_nb_sessions; > + /* Two sessions objects are required for each session > + * (one for the header, one for the private data) > + */ > + uint32_t sessions_needed = 2 * enabled_cdev_count * > + opts->nb_qps; > +#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER > + if (!strcmp((const char *)opts->device_type, > + "crypto_scheduler")) { > + uint32_t nb_slaves = > + rte_cryptodev_scheduler_slaves_get(cdev_id, > + NULL); > + > + sessions_needed = 2 * enabled_cdev_count * > + opts->nb_qps * nb_slaves; > + } > +#endif One minor. Can we have #else? > + /* > + * A single session is required per queue pair > + * in each device > + */ > + if (dev_max_nb_sess < opts->nb_qps) { > + RTE_LOG(ERR, USER1, > + "Device does not support at least " > + "%u sessions\n", opts->nb_qps); > + return -ENOTSUP; > + } > if (session_pool_socket[socket_id] == NULL) { > char mp_name[RTE_MEMPOOL_NAMESIZE]; > struct rte_mempool *sess_mp; > > snprintf(mp_name, RTE_MEMPOOL_NAMESIZE, > "sess_mp_%u", socket_id); > - > sess_mp = rte_mempool_create(mp_name, > - NUM_SESSIONS, > + sessions_needed, > max_sess_size, > SESS_MEMPOOL_CACHE_SIZE, > 0, NULL, NULL, NULL,