From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 6D8C01B122 for ; Wed, 10 Apr 2019 16:19:52 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 07:19:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,332,1549958400"; d="scan'208";a="222238957" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga001.jf.intel.com with ESMTP; 10 Apr 2019 07:19:50 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.82]) by IRSMSX109.ger.corp.intel.com ([169.254.13.189]) with mapi id 14.03.0415.000; Wed, 10 Apr 2019 15:19:49 +0100 From: "Iremonger, Bernard" To: "Iremonger, Bernard" , "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: AQHU7gZNrm5NYlKsMUyDjPDQQCntzaYyZ8YAgAASqkCAAvnDcA== Date: Wed, 10 Apr 2019 14:19:49 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C260D877D8@IRSMSX108.ger.corp.intel.com> References: <1554726370-16591-1-git-send-email-bernard.iremonger@intel.com> <348A99DA5F5B7549AA880327E580B4358973BD1D@IRSMSX101.ger.corp.intel.com> <8CEF83825BEC744B83065625E567D7C260D867E5@IRSMSX108.ger.corp.intel.com> In-Reply-To: <8CEF83825BEC744B83065625E567D7C260D867E5@IRSMSX108.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.180] Content-Type: text/plain; charset="us-ascii" 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: , X-List-Received-Date: Wed, 10 Apr 2019 14:19:53 -0000 Hi Fiona, > > > 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 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. > > > I have the asym PMD disabled in the common/config_base file. > I will investigate further. Self NAK of this patch as causing test failures. =20 Regards, =20 Bernard. =20 =20 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 3049FA0096 for ; Wed, 10 Apr 2019 16:19:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 225D91B130; Wed, 10 Apr 2019 16:19:55 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 6D8C01B122 for ; Wed, 10 Apr 2019 16:19:52 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 07:19:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,332,1549958400"; d="scan'208";a="222238957" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga001.jf.intel.com with ESMTP; 10 Apr 2019 07:19:50 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.82]) by IRSMSX109.ger.corp.intel.com ([169.254.13.189]) with mapi id 14.03.0415.000; Wed, 10 Apr 2019 15:19:49 +0100 From: "Iremonger, Bernard" To: "Iremonger, Bernard" , "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: AQHU7gZNrm5NYlKsMUyDjPDQQCntzaYyZ8YAgAASqkCAAvnDcA== Date: Wed, 10 Apr 2019 14:19:49 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C260D877D8@IRSMSX108.ger.corp.intel.com> References: <1554726370-16591-1-git-send-email-bernard.iremonger@intel.com> <348A99DA5F5B7549AA880327E580B4358973BD1D@IRSMSX101.ger.corp.intel.com> <8CEF83825BEC744B83065625E567D7C260D867E5@IRSMSX108.ger.corp.intel.com> In-Reply-To: <8CEF83825BEC744B83065625E567D7C260D867E5@IRSMSX108.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.180] 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: <20190410141949.ji9UieICfk4elGBKlLm93OlJtgE_x6J0Vg27BfFtvsU@z> Hi Fiona, > > > 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 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. > > > I have the asym PMD disabled in the common/config_base file. > I will investigate further. Self NAK of this patch as causing test failures. =20 Regards, =20 Bernard. =20 =20