From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 030C2A2EEB for ; Thu, 12 Sep 2019 17:10:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 27A471E96C; Thu, 12 Sep 2019 17:09:59 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 359FA1E96A for ; Thu, 12 Sep 2019 17:09:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Sep 2019 08:09:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,497,1559545200"; d="scan'208";a="215073199" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by fmsmga002.fm.intel.com with ESMTP; 12 Sep 2019 08:09:55 -0700 Received: from pgsmsx102.gar.corp.intel.com ([169.254.6.203]) by PGSMSX108.gar.corp.intel.com ([169.254.8.138]) with mapi id 14.03.0439.000; Thu, 12 Sep 2019 23:08:03 +0800 From: "Gujjar, Abhinandan S" To: Hemant Agrawal , "dev@dpdk.org" CC: "jerinj@marvell.com" Thread-Topic: [PATCH] test/event_crypto: add check for session init failure Thread-Index: AQHVZKAS/xYEk8B3bE+ndAtD04un86coLkFg Date: Thu, 12 Sep 2019 15:08:03 +0000 Message-ID: <5612CB344B05EE4F95FC5B729939F78079540FFE@PGSMSX102.gar.corp.intel.com> References: <20190906104228.15271-1-hemant.agrawal@nxp.com> In-Reply-To: <20190906104228.15271-1-hemant.agrawal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTE5YzdiNGItOTIwNS00M2UwLTk3ZWUtOGQ2YmVjY2I2MDgyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiK2g1RVBRK3o0WmtmT3RxSjNuNlpEeUpKa1Q1OVJ6cTFCTDRDdllGZEVYQ09oVVR4UGF5empOb2NDQlduc3FGaCJ9 dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] test/event_crypto: add check for session init failure 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" Acked-by: abhinandan.gujjar@intel.com > -----Original Message----- > From: Hemant Agrawal > Sent: Friday, September 6, 2019 4:12 PM > To: dev@dpdk.org > Cc: jerinj@marvell.com; Gujjar, Abhinandan S ; > Hemant Agrawal > Subject: [PATCH] test/event_crypto: add check for session init failure >=20 > Mismatch in algo or sec capability can cause session to fail. > This patch handle it and return error timely. >=20 > Signed-off-by: Hemant Agrawal > --- > app/test/test_event_crypto_adapter.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test/test_event_crypto_adapter.c > b/app/test/test_event_crypto_adapter.c > index 73655020d..e7bf80978 100644 > --- a/app/test/test_event_crypto_adapter.c > +++ b/app/test/test_event_crypto_adapter.c > @@ -199,8 +199,9 @@ test_op_forward_mode(uint8_t session_less) > TEST_ASSERT_NOT_NULL(sess, "Session creation failed\n"); >=20 > /* Create Crypto session*/ > - rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess, > + ret =3D rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess, > &cipher_xform, params.session_priv_mpool); > + TEST_ASSERT_SUCCESS(ret, "Failed to init session\n"); >=20 > ret =3D rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, > evdev, &cap); > @@ -398,8 +399,10 @@ test_op_new_mode(uint8_t session_less) > rte_cryptodev_sym_session_set_user_data(sess, > &m_data, sizeof(m_data)); > } > - rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess, > + ret =3D rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess, > &cipher_xform, params.session_priv_mpool); > + TEST_ASSERT_SUCCESS(ret, "Failed to init session\n"); > + > rte_crypto_op_attach_sym_session(op, sess); > } else { > struct rte_crypto_sym_xform *first_xform; > -- > 2.17.1