From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 29B14440E4 for ; Mon, 27 May 2024 12:48:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1DDC8402F0; Mon, 27 May 2024 12:48:41 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mails.dpdk.org (Postfix) with ESMTP id A9D82402BC; Mon, 27 May 2024 12:48:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716806919; x=1748342919; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=RL2yjUqIl3aQPs6Ps9efzCfeFVlYfzX32eG44ezJeug=; b=VAyFtN0iHfrdxzV5afNbuV8pIDQw7+SBpSvSLrC96jaT3wykqlhPi70z QCWpbgf+Ku8cS3wZQr7hoIOdWhAHfbykrh9jkjdZ6a7WYKxLvgEOZy5WI 4eUVcabvZaZonlnyTs3uJf6glvOYWDqXqqnR7ZKBR/24/+xseNKkBTV2H eXgJ6h88sgJV4uYlGtWswLRl59aq6YkJGFYS3SuMyNJZE2C7u2otaVRA6 QUaSq5mlpgUiylZQ/gXYgV7RaaZpCsovFVtz/koJ5ajz16ps72QjKBfXt mKFAo79795tVDWQOEgbAzSSIsXC/COz8LwJsr67nS8fB3GK24pH3lZHeG g==; X-CSE-ConnectionGUID: 1RugB+QKSP2+pi7eXhupsw== X-CSE-MsgGUID: gOv//u1VSD6r6gzbEnlbAg== X-IronPort-AV: E=McAfee;i="6600,9927,11084"; a="13064053" X-IronPort-AV: E=Sophos;i="6.08,192,1712646000"; d="scan'208";a="13064053" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 03:48:37 -0700 X-CSE-ConnectionGUID: pFSoH5b5TRCl5arpflPvqQ== X-CSE-MsgGUID: BkbjxiKpQY+DLd/2aE4aGw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,192,1712646000"; d="scan'208";a="57919089" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 27 May 2024 03:48:37 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 27 May 2024 03:48:36 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 27 May 2024 03:48:36 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 27 May 2024 03:48:36 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.41) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 27 May 2024 03:48:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S8397PSTildPt5+VxuclwiOz48O8d5Z6Il2x9Ge1Um8RRut4P1/WWkhyQfUFd4ayc2MSg5mqvIcD0VOPEd4KtZuAkSO0RHajDkG0DrNESRkZXv7JKToOJh9hjqpzsf5GWeQsBnrmxnPc2hKq29GzYwvx60tcrsLM01mi1PrRMea59Y1PopmLCHof/SwuTGSSXj33XSRRwtIqkNytkq69vvl0EWjmJxk+OkxNtjx+fYnCdw2BMNvpx5Vl0F2dXD3VkQm3Ey+fQeEm2TG+ipLNI7pNZCjIaiyQPvazEImFdGeUws8wrljuNgT5i91r5dcd13OpsKBKPDaqFTCpIzEGwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=J0PhpfkuVRR+Xq3YqA31dAg5Afk1DPGIcQgJTT7eCdY=; b=e2hRPgUFukw1QfedxKXkhqlxjCQQkh1Vb9dkCvxK42ry11b/1B7VNQxTOeqKfkeQ0Gc7SolIkHKVPH/nKanRiYztow/MMdJzxsxvKuUFeImjf/8yrEn0V+jnSxMSahf1fKgOUD16PC2wIf/dMbxL40ZC8KZFFSriGleuKxJxjZI8qkek3Epbv2LoCwhqrvVGhOyxKNJ9crj5WWnhZskl3rsLcwPiIIOALEh1pEnNodRyrcNl1YoLI6z1IOtInCjCetVh8pfnwrGyCRZoq0xOxwMXKpYgdXfT1wEroMM/qxZX88QQoGi+EbesmvnXIUnakO035gQosRvVklx5Iib4ww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH7PR11MB5913.namprd11.prod.outlook.com (2603:10b6:510:137::18) by SJ2PR11MB8348.namprd11.prod.outlook.com (2603:10b6:a03:53a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.34; Mon, 27 May 2024 10:48:33 +0000 Received: from PH7PR11MB5913.namprd11.prod.outlook.com ([fe80::d3fd:2a64:24a0:e8f4]) by PH7PR11MB5913.namprd11.prod.outlook.com ([fe80::d3fd:2a64:24a0:e8f4%4]) with mapi id 15.20.7611.025; Mon, 27 May 2024 10:48:33 +0000 From: "Kundapura, Ganapati" To: Akhil Goyal , "dev@dpdk.org" CC: "Gujjar, Abhinandan S" , "fanzhang.oss@gmail.com" , "anoobj@marvell.com" , "stable@dpdk.org" Subject: RE: [PATCH v3] test/crypto: fix enqueue dequeue callback case Thread-Topic: [PATCH v3] test/crypto: fix enqueue dequeue callback case Thread-Index: AQHarf297N5T63eZjk+KI8oqjqybAbGq6iiw Date: Mon, 27 May 2024 10:48:33 +0000 Message-ID: References: <20240523124838.3474899-1-gakhil@marvell.com> <20240524171327.885698-1-gakhil@marvell.com> In-Reply-To: <20240524171327.885698-1-gakhil@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR11MB5913:EE_|SJ2PR11MB8348:EE_ x-ms-office365-filtering-correlation-id: f9918e9a-4674-4712-b768-08dc7e3a8dfc x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|1800799015|366007|376005|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?fq8xnAUTLWNyIM5VdiStGtd0puBJO5G4YijHfjTOZbtBxbStMx3DCP5FnhbA?= =?us-ascii?Q?57NsgIh9D+gven99295qsMwUeQDmyiZ6VtMFRNlkqQeOoyfUdp/u5cTCxLL/?= =?us-ascii?Q?tq5DiA14tTwYsHWngWXqCLDPmQvUYjYMe40RM1YK2X1+ujZu0BTct74zKrAu?= =?us-ascii?Q?zdhLhbaJU951in7i09yIpQRQAqfIM1R8+t/vP/0DRC+pnrL2ppwGppmr3ONe?= =?us-ascii?Q?ndS23v2KLm0osQKJ8Xhl04ITah/6/iyRqKKoglK9mGP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0rp9zCT3EyzMfRe2sOrzCIqrL1OEk/Tx3OPC60gY9cpF+Ta?= =?us-ascii?Q?3A9tAXcLR5sDV/n+kvCEGrjOgUyNWm7e99GCp7t2+Y06772Pu47gFwogcSfM?= =?us-ascii?Q?rEtOg3yqSj+xWCJYiKbqsUAm18uq5gYC/ErnrDHVSA=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB5913.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(366007)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?JLCTh+X3maP4UmeZki/H0MQyqhBnhx0SxzFM17obgD0Y5x257Db3ns7/Mxwk?= =?us-ascii?Q?gomzwC2vF5n2q0jmeaVlJeoWMfMTKfwcRNNSDIOiXK93jisOBl8d9DN08kmS?= =?us-ascii?Q?5/FsML0Mz2KRaVAAlkFM3r9o9v+/JO5rfbVuJin1XSKNY2XJFeA6NxKT2NeH?= =?us-ascii?Q?t01EM51u174UZxqsrfV9QUemBUxHvQhJ5yTFQAKaaAb7WebxQUpmhLnGxaGG?= =?us-ascii?Q?TwiCzmqVEFqUr838TKNLWulrD4LXpfSjMRIJdFQPBjP7f23rtnCNRMsx7eRG?= =?us-ascii?Q?FMV7UtykPi7TcxRz783x+Xw/i2IGc5RQRRQC/DUUNxoxJBMt8LBYowHETDhw?= =?us-ascii?Q?DbgZOOO6Z9pydpvhCbacBdsoxhpWaOxs9rK28vrfsyiWijHOqGobDLRcbd2M?= =?us-ascii?Q?8R8V8gxEVz80prgzJ0604J6hlxDFAmQCDyBMoywsKHSdba0p8WCckbSyhcEM?= =?us-ascii?Q?liRBfxQs9bV+xSX2lDfqYsjpuNkKF3NoU8jELE526KXL6fWAAV9jty5CBr4y?= =?us-ascii?Q?Fzs/htZwx0WR7+rnoTN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+?= =?us-ascii?Q?HVnUHTQF2GQ9ydy5xHp/yDCgT+ShBZ7gARPWbejdUENLd3itIOCu/GHyqjyS?= =?us-ascii?Q?1UJAyfSJiDPdi8c1blPAqh+qeVVF4HABRQZC0lKPbCwRUJZ9EOJKApAx+bQ3?= =?us-ascii?Q?2weUZbel7CNuOxQRHTyO3cXKEf747oU1MAocR03NrNav7oG/CorX7MFKrcGu?= =?us-ascii?Q?Ng=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB5913.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9918e9a-4674-4712-b768-08dc7e3a8dfc X-MS-Exchange-CrossTenant-originalarrivaltime: 27 May 2024 10:48:33.4722 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: B0zHOtVXgdAbI6xF6YdS7UPOkPCXQOtXksg4j+EbQnpiFbGcamf395gmoazo6yTT/ppUaYPSxTU15oZaSVNyt0QBNHxYnpxV8yK+5yc2RaQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB8348 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Tested cryptodev_qat_autotest and cryptodev_null_autotest this patch along = with https://patches.dpdk.org/project/dpdk/patch/20240416081222.3002268-1-g= anapati.kundapura@intel.com/, callbacks are getting called for both NULL pm= d and qat pmd. Acked-by: Ganapati Kundapura Thanks, Ganapati > -----Original Message----- > From: Akhil Goyal > Sent: Friday, May 24, 2024 10:43 PM > To: dev@dpdk.org > Cc: Kundapura, Ganapati ; Gujjar, > Abhinandan S ; fanzhang.oss@gmail.com; > anoobj@marvell.com; Akhil Goyal ; stable@dpdk.org > Subject: [PATCH v3] test/crypto: fix enqueue dequeue callback case >=20 > The enqueue/dequeue callback test cases were using the > test_null_burst_operation() for doing enqueue/dequeue. > But this function is only designed to be run for NULL PMD. > Hence for other PMDs, the callback was not getting called. > Now, separate processing thread is removed, instead NULL crypto operation= is > created and processed so that callbacks are called. > Also added a check on a global static variable to verify that the callbac= k is > actually called and fail the case if it is not getting called. >=20 > Fixes: 5523a75af539 ("test/crypto: add case for enqueue/dequeue callbacks= ") > Cc: stable@dpdk.org >=20 > Signed-off-by: Akhil Goyal > --- > -v3: replaced AES-SHA1 with NULL crypto and removed separate thread. >=20 > app/test/test_cryptodev.c | 106 ++++++++++++++++++++++++++++++++-- > ---- > 1 file changed, 89 insertions(+), 17 deletions(-) >=20 > diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index > 1703ebccf1..b644e87106 100644 > --- a/app/test/test_cryptodev.c > +++ b/app/test/test_cryptodev.c > @@ -199,6 +199,8 @@ post_process_raw_dp_op(void *user_data, > uint32_t index __rte_unused, > static struct crypto_testsuite_params testsuite_params =3D { NULL }; st= ruct > crypto_testsuite_params *p_testsuite_params =3D &testsuite_params; stati= c > struct crypto_unittest_params unittest_params; > +static bool enq_cb_called; > +static bool deq_cb_called; >=20 > int > process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id, @@ -14556,6 > +14558,7 @@ test_enq_callback(uint16_t dev_id, uint16_t qp_id, struct > rte_crypto_op **ops, > RTE_SET_USED(ops); > RTE_SET_USED(user_param); >=20 > + enq_cb_called =3D true; > printf("crypto enqueue callback called\n"); > return nb_ops; > } > @@ -14569,21 +14572,58 @@ test_deq_callback(uint16_t dev_id, uint16_t > qp_id, struct rte_crypto_op **ops, > RTE_SET_USED(ops); > RTE_SET_USED(user_param); >=20 > + deq_cb_called =3D true; > printf("crypto dequeue callback called\n"); > return nb_ops; > } >=20 > /* > - * Thread using enqueue/dequeue callback with RCU. > + * Process enqueue/dequeue NULL crypto request to verify callback with > RCU. > */ > static int > -test_enqdeq_callback_thread(void *arg) > +test_enqdeq_callback_null_cipher(void) > { > - RTE_SET_USED(arg); > - /* DP thread calls rte_cryptodev_enqueue_burst()/ > - * rte_cryptodev_dequeue_burst() and invokes callback. > - */ > - test_null_burst_operation(); > + struct crypto_testsuite_params *ts_params =3D &testsuite_params; > + struct crypto_unittest_params *ut_params =3D &unittest_params; > + > + /* Setup Cipher Parameters */ > + ut_params->cipher_xform.type =3D RTE_CRYPTO_SYM_XFORM_CIPHER; > + ut_params->cipher_xform.next =3D &ut_params->auth_xform; > + > + ut_params->cipher_xform.cipher.algo =3D RTE_CRYPTO_CIPHER_NULL; > + ut_params->cipher_xform.cipher.op =3D > RTE_CRYPTO_CIPHER_OP_ENCRYPT; > + > + /* Setup HMAC Parameters */ > + ut_params->auth_xform.type =3D RTE_CRYPTO_SYM_XFORM_AUTH; > + ut_params->auth_xform.next =3D NULL; > + > + ut_params->auth_xform.auth.algo =3D RTE_CRYPTO_AUTH_NULL; > + ut_params->auth_xform.auth.op =3D > RTE_CRYPTO_AUTH_OP_GENERATE; > + > + /* Create Crypto session*/ > + ut_params->sess =3D rte_cryptodev_sym_session_create(ts_params- > >valid_devs[0], > + &ut_params->auth_xform, ts_params- > >session_mpool); > + TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); > + > + ut_params->op =3D rte_crypto_op_alloc(ts_params->op_mpool, > RTE_CRYPTO_OP_TYPE_SYMMETRIC); > + TEST_ASSERT_NOT_NULL(ut_params->op, "Failed to allocate > symmetric > +crypto op"); > + > + /* Generate an operation for each mbuf in burst */ > + ut_params->ibuf =3D rte_pktmbuf_alloc(ts_params->mbuf_pool); > + TEST_ASSERT_NOT_NULL(ut_params->ibuf, "Failed to allocate mbuf"); > + > + /* Append some random data */ > + TEST_ASSERT_NOT_NULL(rte_pktmbuf_append(ut_params->ibuf, > sizeof(unsigned int)), > + "no room to append data"); > + > + rte_crypto_op_attach_sym_session(ut_params->op, ut_params- > >sess); > + > + ut_params->op->sym->m_src =3D ut_params->ibuf; > + > + /* Process crypto operation */ > + TEST_ASSERT_NOT_NULL(process_crypto_request(ts_params- > >valid_devs[0], ut_params->op), > + "failed to process sym crypto op"); > + > return 0; > } >=20 > @@ -14591,6 +14631,7 @@ static int > test_enq_callback_setup(void) > { > struct crypto_testsuite_params *ts_params =3D &testsuite_params; > + struct rte_cryptodev_sym_capability_idx cap_idx; > struct rte_cryptodev_info dev_info; > struct rte_cryptodev_qp_conf qp_conf =3D { > .nb_descriptors =3D MAX_NUM_OPS_INFLIGHT @@ -14598,6 > +14639,19 @@ test_enq_callback_setup(void) >=20 > struct rte_cryptodev_cb *cb; > uint16_t qp_id =3D 0; > + int j =3D 0; > + > + /* Verify the crypto capabilities for which enqueue/dequeue is done. > */ > + cap_idx.type =3D RTE_CRYPTO_SYM_XFORM_AUTH; > + cap_idx.algo.auth =3D RTE_CRYPTO_AUTH_NULL; > + if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], > + &cap_idx) =3D=3D NULL) > + return TEST_SKIPPED; > + cap_idx.type =3D RTE_CRYPTO_SYM_XFORM_CIPHER; > + cap_idx.algo.cipher =3D RTE_CRYPTO_CIPHER_NULL; > + if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], > + &cap_idx) =3D=3D NULL) > + return TEST_SKIPPED; >=20 > /* Stop the device in case it's started so it can be configured */ > rte_cryptodev_stop(ts_params->valid_devs[0]); > @@ -14621,6 +14675,7 @@ test_enq_callback_setup(void) > qp_conf.nb_descriptors, qp_id, > ts_params->valid_devs[0]); >=20 > + enq_cb_called =3D false; > /* Test with invalid crypto device */ > cb =3D rte_cryptodev_add_enq_callback(RTE_CRYPTO_MAX_DEVS, > qp_id, test_enq_callback, NULL); > @@ -14653,12 +14708,11 @@ test_enq_callback_setup(void) >=20 > rte_cryptodev_start(ts_params->valid_devs[0]); >=20 > - /* Launch a thread */ > - rte_eal_remote_launch(test_enqdeq_callback_thread, NULL, > - rte_get_next_lcore(-1, 1, 0)); > + TEST_ASSERT_SUCCESS(test_enqdeq_callback_null_cipher(), "Crypto > +Processing failed"); >=20 > - /* Wait until reader exited. */ > - rte_eal_mp_wait_lcore(); > + /* Wait until callback not called. */ > + while (!enq_cb_called && (j++ < 10)) > + rte_delay_ms(10); >=20 > /* Test with invalid crypto device */ > TEST_ASSERT_FAIL(rte_cryptodev_remove_enq_callback( > @@ -14683,6 +14737,8 @@ test_enq_callback_setup(void) > "qp %u on cryptodev %u", > qp_id, ts_params->valid_devs[0]); >=20 > + TEST_ASSERT(enq_cb_called =3D=3D true, "Crypto enqueue callback not > +called"); > + > return TEST_SUCCESS; > } >=20 > @@ -14690,6 +14746,7 @@ static int > test_deq_callback_setup(void) > { > struct crypto_testsuite_params *ts_params =3D &testsuite_params; > + struct rte_cryptodev_sym_capability_idx cap_idx; > struct rte_cryptodev_info dev_info; > struct rte_cryptodev_qp_conf qp_conf =3D { > .nb_descriptors =3D MAX_NUM_OPS_INFLIGHT @@ -14697,6 > +14754,19 @@ test_deq_callback_setup(void) >=20 > struct rte_cryptodev_cb *cb; > uint16_t qp_id =3D 0; > + int j =3D 0; > + > + /* Verify the crypto capabilities for which enqueue/dequeue is done. > */ > + cap_idx.type =3D RTE_CRYPTO_SYM_XFORM_AUTH; > + cap_idx.algo.auth =3D RTE_CRYPTO_AUTH_NULL; > + if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], > + &cap_idx) =3D=3D NULL) > + return TEST_SKIPPED; > + cap_idx.type =3D RTE_CRYPTO_SYM_XFORM_CIPHER; > + cap_idx.algo.cipher =3D RTE_CRYPTO_CIPHER_NULL; > + if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], > + &cap_idx) =3D=3D NULL) > + return TEST_SKIPPED; >=20 > /* Stop the device in case it's started so it can be configured */ > rte_cryptodev_stop(ts_params->valid_devs[0]); > @@ -14720,6 +14790,7 @@ test_deq_callback_setup(void) > qp_conf.nb_descriptors, qp_id, > ts_params->valid_devs[0]); >=20 > + deq_cb_called =3D false; > /* Test with invalid crypto device */ > cb =3D rte_cryptodev_add_deq_callback(RTE_CRYPTO_MAX_DEVS, > qp_id, test_deq_callback, NULL); > @@ -14752,12 +14823,11 @@ test_deq_callback_setup(void) >=20 > rte_cryptodev_start(ts_params->valid_devs[0]); >=20 > - /* Launch a thread */ > - rte_eal_remote_launch(test_enqdeq_callback_thread, NULL, > - rte_get_next_lcore(-1, 1, 0)); > + TEST_ASSERT_SUCCESS(test_enqdeq_callback_null_cipher(), "Crypto > +processing failed"); >=20 > - /* Wait until reader exited. */ > - rte_eal_mp_wait_lcore(); > + /* Wait until callback not called. */ > + while (!deq_cb_called && (j++ < 10)) > + rte_delay_ms(10); >=20 > /* Test with invalid crypto device */ > TEST_ASSERT_FAIL(rte_cryptodev_remove_deq_callback( > @@ -14782,6 +14852,8 @@ test_deq_callback_setup(void) > "qp %u on cryptodev %u", > qp_id, ts_params->valid_devs[0]); >=20 > + TEST_ASSERT(deq_cb_called =3D=3D true, "Crypto dequeue callback not > +called"); > + > return TEST_SUCCESS; > } >=20 > -- > 2.25.1