* [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD @ 2019-04-08 12:26 Bernard Iremonger 2019-04-08 12:26 ` Bernard Iremonger 2019-04-08 16:44 ` Trahe, Fiona 0 siblings, 2 replies; 8+ messages in thread From: Bernard Iremonger @ 2019-04-08 12:26 UTC (permalink / raw) To: dev, fiona.trahe, konstantin.ananyev, akhil.goyal; +Cc: Bernard Iremonger 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=0x5355280 <unittest_params+512>, resp=0x100455100 "") 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 <bernard.iremonger@intel.com> --- 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 == NULL) + rx_op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED; + else if (sess->bpi_ctx) { qat_bpicipher_postprocess(sess, rx_op); - rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; + rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; + } } *op = (void *)rx_op; } -- 2.7.4 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD 2019-04-08 12:26 [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD Bernard Iremonger @ 2019-04-08 12:26 ` Bernard Iremonger 2019-04-08 16:44 ` Trahe, Fiona 1 sibling, 0 replies; 8+ messages in thread From: Bernard Iremonger @ 2019-04-08 12:26 UTC (permalink / raw) To: dev, fiona.trahe, konstantin.ananyev, akhil.goyal; +Cc: Bernard Iremonger 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=0x5355280 <unittest_params+512>, resp=0x100455100 "") 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 <bernard.iremonger@intel.com> --- 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 == NULL) + rx_op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED; + else if (sess->bpi_ctx) { qat_bpicipher_postprocess(sess, rx_op); - rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; + rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; + } } *op = (void *)rx_op; } -- 2.7.4 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD 2019-04-08 12:26 [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD Bernard Iremonger 2019-04-08 12:26 ` Bernard Iremonger @ 2019-04-08 16:44 ` Trahe, Fiona 2019-04-08 16:44 ` Trahe, Fiona 2019-04-08 16:56 ` Iremonger, Bernard 1 sibling, 2 replies; 8+ messages in thread From: Trahe, Fiona @ 2019-04-08 16:44 UTC (permalink / raw) To: Iremonger, Bernard, dev, Ananyev, Konstantin, akhil.goyal; +Cc: Trahe, Fiona Hi Bernard, > -----Original Message----- > From: Iremonger, Bernard > Sent: Monday, April 8, 2019 1:26 PM > To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; Ananyev, Konstantin > <konstantin.ananyev@intel.com>; akhil.goyal@nxp.com > Cc: Iremonger, Bernard <bernard.iremonger@intel.com> > 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=0x5355280 <unittest_params+512>, resp=0x100455100 "") > 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 <bernard.iremonger@intel.com> > --- > 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 == NULL) > + rx_op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED; > + else if (sess->bpi_ctx) { > qat_bpicipher_postprocess(sess, rx_op); > - rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > + rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > + } > } > *op = (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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD 2019-04-08 16:44 ` Trahe, Fiona @ 2019-04-08 16:44 ` Trahe, Fiona 2019-04-08 16:56 ` Iremonger, Bernard 1 sibling, 0 replies; 8+ messages in thread From: Trahe, Fiona @ 2019-04-08 16:44 UTC (permalink / raw) To: Iremonger, Bernard, dev, Ananyev, Konstantin, akhil.goyal; +Cc: Trahe, Fiona Hi Bernard, > -----Original Message----- > From: Iremonger, Bernard > Sent: Monday, April 8, 2019 1:26 PM > To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; Ananyev, Konstantin > <konstantin.ananyev@intel.com>; akhil.goyal@nxp.com > Cc: Iremonger, Bernard <bernard.iremonger@intel.com> > 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=0x5355280 <unittest_params+512>, resp=0x100455100 "") > 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 <bernard.iremonger@intel.com> > --- > 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 == NULL) > + rx_op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED; > + else if (sess->bpi_ctx) { > qat_bpicipher_postprocess(sess, rx_op); > - rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > + rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > + } > } > *op = (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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD 2019-04-08 16:44 ` Trahe, Fiona 2019-04-08 16:44 ` Trahe, Fiona @ 2019-04-08 16:56 ` Iremonger, Bernard 2019-04-08 16:56 ` Iremonger, Bernard 2019-04-10 14:19 ` Iremonger, Bernard 1 sibling, 2 replies; 8+ messages in thread From: Iremonger, Bernard @ 2019-04-08 16:56 UTC (permalink / raw) To: Trahe, Fiona, dev, Ananyev, Konstantin, akhil.goyal Hi Fiona, > -----Original Message----- > From: Trahe, Fiona > Sent: Monday, April 8, 2019 5:44 PM > To: Iremonger, Bernard <bernard.iremonger@intel.com>; dev@dpdk.org; > Ananyev, Konstantin <konstantin.ananyev@intel.com>; akhil.goyal@nxp.com > Cc: Trahe, Fiona <fiona.trahe@intel.com> > Subject: RE: [PATCH] crypto/qat: fix second seg fault in QAT PMD > > Hi Bernard, > > > -----Original Message----- > > From: Iremonger, Bernard > > Sent: Monday, April 8, 2019 1:26 PM > > To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; Ananyev, > > Konstantin <konstantin.ananyev@intel.com>; akhil.goyal@nxp.com > > Cc: Iremonger, Bernard <bernard.iremonger@intel.com> > > 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=0x5355280 <unittest_params+512>, resp=0x100455100 "") 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 <bernard.iremonger@intel.com> > > --- > > 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 == NULL) > > + rx_op->status = > RTE_CRYPTO_OP_STATUS_AUTH_FAILED; > > + else if (sess->bpi_ctx) { > > qat_bpicipher_postprocess(sess, rx_op); > > - rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > > + rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > > + } > > } > > *op = (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. Regards, Bernard. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD 2019-04-08 16:56 ` Iremonger, Bernard @ 2019-04-08 16:56 ` Iremonger, Bernard 2019-04-10 14:19 ` Iremonger, Bernard 1 sibling, 0 replies; 8+ messages in thread From: Iremonger, Bernard @ 2019-04-08 16:56 UTC (permalink / raw) To: Trahe, Fiona, dev, Ananyev, Konstantin, akhil.goyal Hi Fiona, > -----Original Message----- > From: Trahe, Fiona > Sent: Monday, April 8, 2019 5:44 PM > To: Iremonger, Bernard <bernard.iremonger@intel.com>; dev@dpdk.org; > Ananyev, Konstantin <konstantin.ananyev@intel.com>; akhil.goyal@nxp.com > Cc: Trahe, Fiona <fiona.trahe@intel.com> > Subject: RE: [PATCH] crypto/qat: fix second seg fault in QAT PMD > > Hi Bernard, > > > -----Original Message----- > > From: Iremonger, Bernard > > Sent: Monday, April 8, 2019 1:26 PM > > To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; Ananyev, > > Konstantin <konstantin.ananyev@intel.com>; akhil.goyal@nxp.com > > Cc: Iremonger, Bernard <bernard.iremonger@intel.com> > > 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=0x5355280 <unittest_params+512>, resp=0x100455100 "") 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 <bernard.iremonger@intel.com> > > --- > > 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 == NULL) > > + rx_op->status = > RTE_CRYPTO_OP_STATUS_AUTH_FAILED; > > + else if (sess->bpi_ctx) { > > qat_bpicipher_postprocess(sess, rx_op); > > - rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > > + rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > > + } > > } > > *op = (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. Regards, Bernard. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD 2019-04-08 16:56 ` Iremonger, Bernard 2019-04-08 16:56 ` Iremonger, Bernard @ 2019-04-10 14:19 ` Iremonger, Bernard 2019-04-10 14:19 ` Iremonger, Bernard 1 sibling, 1 reply; 8+ messages in thread From: Iremonger, Bernard @ 2019-04-10 14:19 UTC (permalink / raw) To: Iremonger, Bernard, Trahe, Fiona, dev, Ananyev, Konstantin, akhil.goyal Hi Fiona, <snip> > > > 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=0x5355280 <unittest_params+512>, resp=0x100455100 "") 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 <bernard.iremonger@intel.com> > > > --- > > > 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 == NULL) > > > + rx_op->status = > > RTE_CRYPTO_OP_STATUS_AUTH_FAILED; > > > + else if (sess->bpi_ctx) { > > > qat_bpicipher_postprocess(sess, rx_op); > > > - rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > > > + rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > > > + } > > > } > > > *op = (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. Regards, Bernard. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD 2019-04-10 14:19 ` Iremonger, Bernard @ 2019-04-10 14:19 ` Iremonger, Bernard 0 siblings, 0 replies; 8+ messages in thread From: Iremonger, Bernard @ 2019-04-10 14:19 UTC (permalink / raw) To: Iremonger, Bernard, Trahe, Fiona, dev, Ananyev, Konstantin, akhil.goyal Hi Fiona, <snip> > > > 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=0x5355280 <unittest_params+512>, resp=0x100455100 "") 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 <bernard.iremonger@intel.com> > > > --- > > > 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 == NULL) > > > + rx_op->status = > > RTE_CRYPTO_OP_STATUS_AUTH_FAILED; > > > + else if (sess->bpi_ctx) { > > > qat_bpicipher_postprocess(sess, rx_op); > > > - rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > > > + rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; > > > + } > > > } > > > *op = (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. Regards, Bernard. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-04-10 14:19 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-04-08 12:26 [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD Bernard Iremonger 2019-04-08 12:26 ` Bernard Iremonger 2019-04-08 16:44 ` Trahe, Fiona 2019-04-08 16:44 ` Trahe, Fiona 2019-04-08 16:56 ` Iremonger, Bernard 2019-04-08 16:56 ` Iremonger, Bernard 2019-04-10 14:19 ` Iremonger, Bernard 2019-04-10 14:19 ` Iremonger, Bernard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).