From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id EE740A0096 for ; Mon, 8 Apr 2019 18:56:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F2AE12C55; Mon, 8 Apr 2019 18:56:23 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 7C6FE2C54 for ; Mon, 8 Apr 2019 18:56:22 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2019 09:56:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,326,1549958400"; d="scan'208";a="289764806" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by orsmga004.jf.intel.com with ESMTP; 08 Apr 2019 09:56:17 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.82]) by IRSMSX107.ger.corp.intel.com ([169.254.10.246]) with mapi id 14.03.0415.000; Mon, 8 Apr 2019 17:56:16 +0100 From: "Iremonger, Bernard" To: "Trahe, Fiona" , "dev@dpdk.org" , "Ananyev, Konstantin" , "akhil.goyal@nxp.com" Thread-Topic: [PATCH] crypto/qat: fix second seg fault in QAT PMD Thread-Index: AQHU7gZNrm5NYlKsMUyDjPDQQCntzaYyZ8YAgAASqkA= Date: Mon, 8 Apr 2019 16:56:16 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C260D867E5@IRSMSX108.ger.corp.intel.com> References: <1554726370-16591-1-git-send-email-bernard.iremonger@intel.com> <348A99DA5F5B7549AA880327E580B4358973BD1D@IRSMSX101.ger.corp.intel.com> In-Reply-To: <348A99DA5F5B7549AA880327E580B4358973BD1D@IRSMSX101.ger.corp.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGM4NTRmYmEtMzc1NC00NWFlLThlNGYtZTdiY2ZkNzkzMTdiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWGNpQU9ySDdBQ0xpNVp5K2FDbjFPdmtVejZ6QzdFQWRPUnJNQkd1NnAyY0pNVUdBbUtcLzBhcUtkV1pqdjAxMFEifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD 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" Message-ID: <20190408165616.BpBHC8i_v9b6c4oTvl6doKT9SZTooXNCfppkXs7FspQ@z> Hi Fiona, > -----Original Message----- > From: Trahe, Fiona > Sent: Monday, April 8, 2019 5:44 PM > To: Iremonger, Bernard ; dev@dpdk.org; > Ananyev, Konstantin ; akhil.goyal@nxp.com > Cc: Trahe, Fiona > Subject: RE: [PATCH] crypto/qat: fix second seg fault in QAT PMD >=20 > Hi Bernard, >=20 > > -----Original Message----- > > From: Iremonger, Bernard > > Sent: Monday, April 8, 2019 1:26 PM > > To: dev@dpdk.org; Trahe, Fiona ; Ananyev, > > Konstantin ; akhil.goyal@nxp.com > > Cc: Iremonger, Bernard > > Subject: [PATCH] crypto/qat: fix second seg fault in QAT PMD > > > > While running the IPsec unit tests the following segmentation fault is > > occurring: > > > > Thread 1 "test" received signal SIGSEGV, Segmentation fault. > > 0x0000000000bf3b50 in qat_sym_process_response ( > > op=3D0x5355280 , resp=3D0x100455100 "") at > > /root/dpdk/drivers/crypto/qat/qat_sym.h:161 > > 161 if (sess->bpi_ctx) > > > > Fixes: 91614c73b67c ("crypto/qat: make response process function > > inline") > > Signed-off-by: Bernard Iremonger > > --- > > drivers/crypto/qat/qat_sym.h | 8 +++++--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/crypto/qat/qat_sym.h > > b/drivers/crypto/qat/qat_sym.h index bc6426c..685c6c0 100644 > > --- a/drivers/crypto/qat/qat_sym.h > > +++ b/drivers/crypto/qat/qat_sym.h > > @@ -157,10 +157,12 @@ qat_sym_process_response(void **op, uint8_t > *resp) > > rx_op->sym->session, > > cryptodev_qat_driver_id); > > > > - > > - if (sess->bpi_ctx) > > + if (sess =3D=3D NULL) > > + rx_op->status =3D > RTE_CRYPTO_OP_STATUS_AUTH_FAILED; > > + else if (sess->bpi_ctx) { > > qat_bpicipher_postprocess(sess, rx_op); > > - rx_op->status =3D RTE_CRYPTO_OP_STATUS_SUCCESS; > > + rx_op->status =3D RTE_CRYPTO_OP_STATUS_SUCCESS; > > + } > > } > > *op =3D (void *)rx_op; > > } > > -- > > 2.7.4 > [Fiona] As for previous seg-fault- this is on data-path and likely due to= the > application sending in an invalid session - or a session created for a sy= mmetric > PMD, but being sent to a QAT asymmetric PMD - whose driver_id would not > appear in the session array. > Can you make sure to check for SYMMETRIC support in capabilities. >=20 I have the asym PMD disabled in the common/config_base file. I will investigate further. Regards, Bernard.