[dpdk-dev] [PATCH v4 01/11] crypto: replace rte_panic instances in crypto driver
Arnon Warshavsky
arnon at qwilt.com
Thu Apr 19 15:49:58 CEST 2018
Sure.Will change that in v5
On Thu, Apr 19, 2018 at 1:53 PM, Trahe, Fiona <fiona.trahe at intel.com> wrote:
> Hi Arnon,
> Can you change subject to crypto/dpaa:... please as it's only affecting
> that driver.
> Fiona
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Arnon Warshavsky
> > Sent: Thursday, April 19, 2018 7:01 AM
> > To: thomas at monjalon.net; Burakov, Anatoly <anatoly.burakov at intel.com>;
> Lu, Wenzhuo
> > <wenzhuo.lu at intel.com>; Doherty, Declan <declan.doherty at intel.com>;
> > jerin.jacob at caviumnetworks.com; Richardson, Bruce <
> bruce.richardson at intel.com>; Yigit, Ferruh
> > <ferruh.yigit at intel.com>
> > Cc: dev at dpdk.org; arnon at qwilt.com
> > Subject: [dpdk-dev] [PATCH v4 01/11] crypto: replace rte_panic instances
> in crypto driver
> >
> > replace panic calls with log and return value.
> >
> > --
> > v2:
> > - reformat error message to include literal string in a single line
> > v4: replace -1 return value with -ENOMEM
> >
> > Signed-off-by: Arnon Warshavsky <arnon at qwilt.com>
> > ---
> > drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 +++++---
> > drivers/crypto/dpaa_sec/dpaa_sec.c | 8 +++++---
> > 2 files changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> > b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> > index 23012e3..d465a2d 100644
> > --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> > +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> > @@ -2861,9 +2861,11 @@ struct rte_security_ops dpaa2_sec_security_ops = {
> > RTE_CACHE_LINE_SIZE,
> > rte_socket_id());
> >
> > - if (cryptodev->data->dev_private == NULL)
> > - rte_panic("Cannot allocate memzone for private "
> > - "device data");
> > + if (cryptodev->data->dev_private == NULL) {
> > + RTE_LOG(ERR, PMD, "%s() Cannot allocate memzone
> for private device data",
> > + __func__);
> > + return -ENOMEM;
> > + }
> > }
> >
> > dpaa2_dev->cryptodev = cryptodev;
> > diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c
> b/drivers/crypto/dpaa_sec/dpaa_sec.c
> > index b685220..7b63650 100644
> > --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
> > +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
> > @@ -2356,9 +2356,11 @@ struct rte_security_ops dpaa_sec_security_ops = {
> > RTE_CACHE_LINE_SIZE,
> > rte_socket_id());
> >
> > - if (cryptodev->data->dev_private == NULL)
> > - rte_panic("Cannot allocate memzone for private "
> > - "device data");
> > + if (cryptodev->data->dev_private == NULL) {
> > + RTE_LOG(ERR, PMD, "%s() Cannot allocate memzone
> for private device data",
> > + __func__);
> > + return -ENOMEM;
> > + }
> > }
> >
> > dpaa_dev->crypto_dev = cryptodev;
> > --
> > 1.8.3.1
>
>
--
*Arnon Warshavsky*
*Qwilt | work: +972-72-2221634 | mobile: +972-50-8583058 | arnon at qwilt.com
<arnon at qwilt.com>*
More information about the dev
mailing list