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 69D0DA0096 for ; Mon, 8 Apr 2019 18:44:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA14B3572; Mon, 8 Apr 2019 18:44:34 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id B3A6A2C24 for ; Mon, 8 Apr 2019 18:44:33 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2019 09:44:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,325,1549958400"; d="scan'208";a="132486212" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga008.jf.intel.com with ESMTP; 08 Apr 2019 09:44:31 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.115]) by irsmsx110.ger.corp.intel.com ([169.254.15.173]) with mapi id 14.03.0415.000; Mon, 8 Apr 2019 17:44:13 +0100 From: "Trahe, Fiona" To: "Iremonger, Bernard" , "dev@dpdk.org" , "Ananyev, Konstantin" , "akhil.goyal@nxp.com" CC: "Trahe, Fiona" Thread-Topic: [PATCH] crypto/qat: fix second seg fault in QAT PMD Thread-Index: AQHU7gZNFPccXbY5IkWDxAOhHhL1tqYyd4Nw Date: Mon, 8 Apr 2019 16:44:12 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B4358973BD1D@IRSMSX101.ger.corp.intel.com> References: <1554726370-16591-1-git-send-email-bernard.iremonger@intel.com> In-Reply-To: <1554726370-16591-1-git-send-email-bernard.iremonger@intel.com> Accept-Language: en-IE, 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: <20190408164412.U8V2APc6tlnAk4uGQE_mMUgB0XgXdbg8gx7qNlkM2nU@z> Hi Bernard, > -----Original Message----- > From: Iremonger, Bernard > Sent: Monday, April 8, 2019 1:26 PM > To: dev@dpdk.org; Trahe, Fiona ; Ananyev, Konstant= in > ; akhil.goyal@nxp.com > Cc: Iremonger, Bernard > Subject: [PATCH] crypto/qat: fix second seg fault in QAT PMD >=20 > While running the IPsec unit tests the following > segmentation fault is occurring: >=20 > 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) >=20 > 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(-) >=20 > 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); >=20 > - > - 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 t= he application sending in an invalid session - or a session created for a symmetric 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.