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 2FAE2440A8 for ; Thu, 23 May 2024 19:30:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F7DF40DF6; Thu, 23 May 2024 19:30:52 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by mails.dpdk.org (Postfix) with ESMTP id D2358402EE; Thu, 23 May 2024 19:30:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716485449; x=1748021449; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=QjiEJN6fRJfwh9mzfI6V4fVM2HDKsrxtEr9fzLVL+vs=; b=cBRM5+fkoXuMccsQFL6CQc8dvyzZLwmCCt7WLJrB9ZKkO0fC10KNZc/I oJWJNEOESHp+X8jrV3JBFKPym4339QxIjBohmiQQ27gZYNqFyE9BsFeHM jcEa4OESIo46Th47cCyw/HBy0NKxL0rhWmyAGglSnB+t5UVHnrG0b8lCC v6q74FOlvRbqV/mSX3ARUuXcUwpCZ3+7iIClbV/W7NtShSDiHCPePWhQN y9wYNZRdmdEZVv4NGwKfv50Ov5IsbPXqwS6+n7UVKmrBa9NKA8NWQ/UJ+ Dunzxz/GtuyJ4dMIb4rtWhV4Invl2jxq3nKdN1YBv1mRVNaFFYjhv2n6M Q==; X-CSE-ConnectionGUID: JceVPRnBSve+wQhbySXVZg== X-CSE-MsgGUID: gSSati/eRGufM4nPARitEA== X-IronPort-AV: E=McAfee;i="6600,9927,11081"; a="15765772" X-IronPort-AV: E=Sophos;i="6.08,183,1712646000"; d="scan'208";a="15765772" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2024 10:30:48 -0700 X-CSE-ConnectionGUID: 1n7g1uEySkCYBWTclW0RzQ== X-CSE-MsgGUID: 4J3VUnk6TBm7Ooq8MKRXtQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,183,1712646000"; d="scan'208";a="34222801" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa006.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 23 May 2024 10:30:48 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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; Thu, 23 May 2024 10:30:47 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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; Thu, 23 May 2024 10:30:46 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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 via Frontend Transport; Thu, 23 May 2024 10:30:46 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.168) 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; Thu, 23 May 2024 10:30:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=icUjhXpRIHdTnWNesTU/RriqXp6tr08dee6H3+0mctlUIEfQ5q7WkWXhnc8Th2D0Zrlr5/QjK2c0XxRouvOLggMgqm/4SC30kLhNyABxM4YNiIqdjkfLi3czijDaIdc0oPeJn76iMKVlfvbQKP3xy3WCPOXR1/J1+X3928mVbTmdF7ynZWwIh5uZJCWyglwBxb7rxaYbTpul49BhXcxNWBHnBlB7kVEecWjFXp8RRHaEfrVNcznK693PxXlGIp9YN0zIVwPBqommkYLZl33WDvafT95lBiEoy8heDcH3tfBcSuJoKipHwtEQNggr2fUC7bmfzBXwcJVrpUk0wPTIdw== 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=6TTmkSC0p5juF/p5r5Ocy3TYG+T/mdRXj20PuUdrW4I=; b=U53vS/vaLAwqvTjrWznvQlOhLom32lw07YxBTbGFcCwzXltOnBjczezuy8h5NLX4huMlKRrRB9RN2OvNJaSCbSDXrxc9MLbMlF3jfH4dsMN+iuSNeZc1R2DFf+moHrcjppnjjdc815Js8PtRi7/z0jEQXHQoEPFt4F34K+tlDZY8/3HKONzCtSQ7SduqCu7WgRgRn4aaepWJNldJLp7hSfIUYIf0ZvOUsbmHYfNvIbGJ0Erujqu/6C5SUhqcHMOj6cQYg82jQe0hacByERGhjT/A/+RWbcBT+Bjc3uQ9gtJfTHHngtDhfqShCyphOMu78+aKwWck6MnjWXRVe1Q3EQ== 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 MW4PR11MB5911.namprd11.prod.outlook.com (2603:10b6:303:16b::16) by SJ0PR11MB6719.namprd11.prod.outlook.com (2603:10b6:a03:478::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.19; Thu, 23 May 2024 17:30:40 +0000 Received: from MW4PR11MB5911.namprd11.prod.outlook.com ([fe80::1d00:286c:1800:c2f2]) by MW4PR11MB5911.namprd11.prod.outlook.com ([fe80::1d00:286c:1800:c2f2%3]) with mapi id 15.20.7611.016; Thu, 23 May 2024 17:30:39 +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 v2] test/crypto: fix enqueue dequeue callback case Thread-Topic: [PATCH v2] test/crypto: fix enqueue dequeue callback case Thread-Index: AQHarQ+eJcypRD9m8kqGkNZY7paSPrGlD57g Date: Thu, 23 May 2024 17:30:39 +0000 Message-ID: References: <20240522134835.3453044-1-gakhil@marvell.com> <20240523124838.3474899-1-gakhil@marvell.com> In-Reply-To: <20240523124838.3474899-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: MW4PR11MB5911:EE_|SJ0PR11MB6719:EE_ x-ms-office365-filtering-correlation-id: 2d958be0-d51c-4c50-c8bd-08dc7b4e1084 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|376005|366007|1800799015|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?Wm1mLSo4ULLU/QSJM20JuKDUgEBmOOsVUpGLhepSxxzqt5k2Knx44xbPlYqP?= =?us-ascii?Q?RDEBFXLwhj3L5T6XB+iImHHCMjOf2cIwpB06AOaOz34zQPiJe9yvpJUDVU6v?= =?us-ascii?Q?HZ1VnV0GHaT1BW7+ibhIzvRTHLgEMfVNbYjHiXWnlf3hwgaJNLnB6+75mPtV?= =?us-ascii?Q?2bbz2WrRxWTg9JXDqr0lA2iRYYeWh2j4uFAVmnlf6zmqqeo8b+AF+YTI4mu+?= =?us-ascii?Q?l1O+yB8zLnEiXPdFFDT0hPWSTXEzBhh42NPCce2Pfr+gHDHhuNdlgAGtTuex?= =?us-ascii?Q?8kNnerNeq+W5caxM+mh3ZA/kyP623SLGI3ythDk2RLjWuX8SBENRRlanXi95?= =?us-ascii?Q?XWBberfXMsaCahEWu9MdXZajt1iFgv+qEH5tiO9MC/Qm9DkkWo6Dj4f6hv5a?= =?us-ascii?Q?fr01XkryWND2UJdhj0I1CaLsKicg8pEm2dujvb7Ehxd9YtzSM+m23jop0C1u?= =?us-ascii?Q?bGmRqyk3+TCk1ss0/OLyYhC0hXpaieaSfoRpuPFZj/v/noQi8VRzFLg8VJPF?= =?us-ascii?Q?c6KuaB0RlZ6O+3anVNyZgkfv/uaZo5EjsZMvKgaKAuNYc0zB9aKwAzGiEULX?= =?us-ascii?Q?Hah7F+ecDu22T8KT6gZNB/G+QhbpB9rlYfBgHlmrCI4PVjkhaJsjtRczSHgl?= =?us-ascii?Q?5JkU7AwSsih92yFwMnkgW4xGwt4lMcpDf9SSCt9MlUnILsxkOUL0oIXDVlEd?= =?us-ascii?Q?O/0I7Yj+pck9jaInyj3yeR7zQ4SmF72Ufhz3rnwCEZWUTH+uchaoqjLvsJ1a?= =?us-ascii?Q?7msPPDteTtjBe+g3coJCMtUVLz5A7GxDtbkImxOI3qZgmKav6KVFkf35Znbs?= =?us-ascii?Q?HslHG7m3Rjos/jLcEJMdQnc1GTGofathpwzEz1gljnI8Br0MX5yIABGoG8rZ?= =?us-ascii?Q?Q0paIg718VFxAhqDVDqiONuvdja0tN7EtKGGDRumH4GyIKeXgGXHuSqarHE2?= =?us-ascii?Q?mtXdtfeoC+fSX3EPihxHvNN8//P4wrueLXNQECfHMUnDygLynVw9vdhNr2rE?= =?us-ascii?Q?vxY4t0Iy/3VDuZicU+hT69aWVXIB34kA0UQ2sG7e29exDvLFUdh2bmPMYGKF?= =?us-ascii?Q?rFir5noDUta5VUIZ01twSaBKaKlxsh+ql/CkI1ubRXTx6IAxP6yOk6NSGHrS?= =?us-ascii?Q?U8YKAat/YGYAUtEcQ5D5qxlInSR8imjMyQlHxg+xRIQGJnlpy/08RyErl+oH?= =?us-ascii?Q?Jh8CFWAQ9INch9XGdARIVw8qqEF1pyuJEtEPWQpRru6j0PHPoITFn9JZ5dcT?= =?us-ascii?Q?jk2+Rb8CTl7fGX8qYcuhAZeh2tUUNj2RpvnmydAtepB5z54dFPWD1UNADX5S?= =?us-ascii?Q?LidLe53JNWexYUVO7ZeXsGYV0dmw9enFYHMKAsA+hJN+0g=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5911.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(366007)(1800799015)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?p8lKkPiSyjBSTC9Nco/DqGnameryw5ThbBiIZp8cp2GS463kpxb5alXJwji/?= =?us-ascii?Q?tBy/Ji7cKRn3aXfp8pfBi9RKwcoxGOkdmg0sTqxSxod7aurS0/hmTR7nm37a?= =?us-ascii?Q?y8dmLEILRor6yWmcEbn2l0VCAhgugFiNB7v0QTVLehBHeaNITqRlPp9AY5uz?= =?us-ascii?Q?gdqLpANNbmtyD88iXMrWeVzB2qrRomkqnj3o+9wkBNmMBUbZAEMcpP2Qxsth?= =?us-ascii?Q?8+ppG96Jy9/83H7FG7Nk4nnyo3sCDOJk0A5kzpOQ+lTudSQE43J7tva5EnoB?= =?us-ascii?Q?t3aJhNRWz+KgbRvqHx2XdBxS417293Qae8JBKFnSmNaVQCdWTRlIeCT+L1l/?= =?us-ascii?Q?YNdVWxLcTmntBm68Ygx7d3CVzNZsyqVYc73sUfUmE4CvgrbGmsVmGbK/IIjn?= =?us-ascii?Q?FBPQvuSCSr3seTGtGrqDwNr4Xmjfi+hiILLR35az4+yZJHj3r8AC5ENfxNHn?= =?us-ascii?Q?4Mtmx60B8sg4Ij7LQ/wre409i2er7X4eDQiMJxezATzD5t1z0r66wZBqCUO/?= =?us-ascii?Q?KcaYaEBWnoWcBrcMHU6lseiNerZqa24Jnoljcte660GnpAKAQxrYCCN8smm1?= =?us-ascii?Q?YVXklt0kuTvOLD+GvtaGFHtHhas3evbA0jqebwlYyTYLMVg8CS+Fm3eP0vzH?= =?us-ascii?Q?wwlaaoOzFlMfNSIe3WSYJmr+jddPHl5ufIl7jNesvbJTnSbLGTZ9trNQJXad?= =?us-ascii?Q?2d3ExL2DS2Uvxd507KpTd7OSGjWG7qD76xld/HtN2um5cjogt38ZUzoH+GSj?= =?us-ascii?Q?D90S2gN8WXlZfNEcxUimrVmvVll+qGPkaJGuvji1ylrh1eSkHjT1oVWjaSrH?= =?us-ascii?Q?OzGf+FPcjU6L1k3Zg2Q0Qdu8bRnrKD0qZotFglOpR/pzzpXJIDef7L9HINVj?= =?us-ascii?Q?wh7NyaqyICpQQTP6kOWjXj/pRvVuNB6xqCNRQ284P4Bpj0MZVGiwTeCWMgV7?= =?us-ascii?Q?JvdxdfaiFgO4E76SIGlKHNzoIM2ngMwy0lcwfrXnAqZLWDMN4LFEQQPYCA21?= =?us-ascii?Q?URaKneM14vKvFZZ658PTolD4+QaWB/13vak9Wo9VvPeAls76c0/TDztKJV4P?= =?us-ascii?Q?303TM9rb7wPvMcOpNsBTBheVtqMMg2jlOAOMkxNXPM5oXWbiCYjutA6942GX?= =?us-ascii?Q?HULmGMZcYitTQ9cqtPL7y2nfl6xXWInrYtwQM5ZTOrYyMnT8JPkFzj2rC9jg?= =?us-ascii?Q?1cniwEj5C8DuMEeCB2o55iXfw7UjP3vYLaoZwk2//wUCWMQQ92sSUwykC/bc?= =?us-ascii?Q?rerE9IcxvTxIXp9p3KBWPQEtUmhZoxRTHHPliqggTVndp8vhENPwe6xsEO8p?= =?us-ascii?Q?BmAJwUSwnTFONxD/jVmLWk6JBNLIXShoUtVKnzpSuFER7bnnoYyR8aH01aJA?= =?us-ascii?Q?slZUEQWv0C2uUMhxVdF7GrS89bIquoUAzSpgH+26a84FDOlulFMib76AaLvm?= =?us-ascii?Q?C3hJBOkWz/lA3RqjmsryP1fSe1wThOoq2nr9GDH4PtIDYT3ch7JDN5obr9bG?= =?us-ascii?Q?f9mhkBTSgIcLTE3aiXQkd7SFkqE38sm71Ws1scEQhqubYV2Ewc8wE/7eFuU4?= =?us-ascii?Q?uZuOoPUY07JOFSD/doHUOxJ38/0913rFMCxIy5I8KCClp8wMEBQ9iwjpc81B?= =?us-ascii?Q?cA=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: MW4PR11MB5911.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d958be0-d51c-4c50-c8bd-08dc7b4e1084 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2024 17:30:39.4471 (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: djhf6lcVrb6gvbojCX7S2CkhBtS6Aisrp22L3944uOmtSmuKowz9fUGPkJquSf5xT+y170T9sJ53a8na2qdO1ngA8r69bPCAdiX/fOXQ4Sw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB6719 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 Hi, > -----Original Message----- > From: Akhil Goyal > Sent: Thursday, May 23, 2024 6:19 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 v2] 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, used a function test_AES_CBC_HMAC_SHA1_encrypt_digest() > which is normally supported by most of the PMDs. > 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 > --- > app/test/test_cryptodev.c | 48 > ++++++++++++++++++++++++++++++++++++++- > 1 file changed, 47 insertions(+), 1 deletion(-) >=20 > diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index > 1703ebccf1..87ffde6a8b 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,6 +14572,7 @@ 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; > } > @@ -14583,7 +14587,7 @@ test_enqdeq_callback_thread(void *arg) > /* DP thread calls rte_cryptodev_enqueue_burst()/ > * rte_cryptodev_dequeue_burst() and invokes callback. > */ > - test_null_burst_operation(); > + test_AES_CBC_HMAC_SHA1_encrypt_digest(); With this change cryptodev_null_autotest is skipping test_enq_callback_setu= p and test_deq_callback_setup tests as NULL PMD doesn't support=20 RTE_CRYPTO_SYM_XFORM_AUTH and RTE_CRYPTO_AUTH_SHA1_HMAC capabilities. Would be better if it works for both NULL PMD and other PMD's. > return 0; > } >=20 > @@ -14591,6 +14595,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 > +14603,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_SHA1_HMAC; > + 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_AES_CBC; > + 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 +14639,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); > @@ -14660,6 +14679,10 @@ test_enq_callback_setup(void) > /* Wait until reader exited. */ > rte_eal_mp_wait_lcore(); >=20 > + /* Wait until callback not called. */ > + while (!enq_cb_called && (j++ < 10)) > + rte_delay_ms(10); > + > /* Test with invalid crypto device */ > TEST_ASSERT_FAIL(rte_cryptodev_remove_enq_callback( > RTE_CRYPTO_MAX_DEVS, qp_id, cb), > @@ -14683,6 +14706,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 +14715,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 > +14723,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_SHA1_HMAC; > + 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_AES_CBC; > + 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 +14759,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); > @@ -14759,6 +14799,10 @@ test_deq_callback_setup(void) > /* Wait until reader exited. */ > rte_eal_mp_wait_lcore(); >=20 > + /* Wait until callback not called. */ > + while (!deq_cb_called && (j++ < 10)) > + rte_delay_ms(10); > + > /* Test with invalid crypto device */ > TEST_ASSERT_FAIL(rte_cryptodev_remove_deq_callback( > RTE_CRYPTO_MAX_DEVS, qp_id, cb), > @@ -14782,6 +14826,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