From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akhil Goyal Subject: Re: [PATCH v5 04/16] test/crypto: limit number of sessions Date: Thu, 5 Jul 2018 17:00:25 +0530 Message-ID: References: <20180608220234.10170-1-pablo.de.lara.guarch@intel.com> <20180705020805.38308-1-pablo.de.lara.guarch@intel.com> <20180705020805.38308-5-pablo.de.lara.guarch@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: "Verma, Shally" , Pablo de Lara , "declan.doherty@intel.com" , "ravi1.kumar@amd.com" , "Jacob, Jerin" , "roy.fan.zhang@intel.com" , "fiona.trahe@intel.com" , "tdu@semihalf.com" , "jianjay.zhou@huawei.com" Return-path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0069.outbound.protection.outlook.com [104.47.0.69]) by dpdk.org (Postfix) with ESMTP id 54CC01B8BE for ; Thu, 5 Jul 2018 13:30:46 +0200 (CEST) In-Reply-To: Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Shally, On 7/5/2018 4:57 PM, Verma, Shally wrote: > >> -----Original Message----- >> From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >> Sent: 05 July 2018 07:38 >> To: declan.doherty@intel.com; akhil.goyal@nxp.com; Verma, Shally ; ravi1.kumar@amd.com; Jacob, >> Jerin ; roy.fan.zhang@intel.com; fiona.trahe@intel.com; tdu@semihalf.com; >> jianjay.zhou@huawei.com >> Cc: dev@dpdk.org; Pablo de Lara >> Subject: [PATCH v5 04/16] test/crypto: limit number of sessions >> >> External Email >> >> Instead of using the maximum number of sessions >> allowed by the PMDs (which will change to unlimited most >> of the PMDs), limit the number to a small sufficient amount. >> >> Signed-off-by: Pablo de Lara >> Acked-by: Akhil Goyal >> --- >> test/test/test_cryptodev.c | 27 +++++++++++++++++++++------ >> 1 file changed, 21 insertions(+), 6 deletions(-) >> >> diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c >> index 389f79677..5c906cfae 100644 >> --- a/test/test/test_cryptodev.c >> +++ b/test/test/test_cryptodev.c >> @@ -39,6 +39,7 @@ >> #include "test_cryptodev_hmac_test_vectors.h" >> >> #define VDEV_ARGS_SIZE 100 >> +#define MAX_NB_SESSIONS 4 >> >> static int gbl_driver_id; >> >> @@ -435,9 +436,16 @@ testsuite_setup(void) >> * Create mempool with maximum number of sessions * 2, >> * to include the session headers >> */ >> + if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) { >> + RTE_LOG(ERR, USER1, "Device does not support " >> + "at least %u sessions\n", >> + MAX_NB_SESSIONS); >> + return TEST_FAILED; >> + } >> + > If info.sym.max_nb_sessions = 0, won't it fail from here? It is added in 8/16 of this series. Till this patch 0 is not a valid value. > Thanks > Shally >