From: Wenkai Lin linwenkai6@hisilicon.com
Print information after wd_get_cookies returning EBUSY can seriously affect performance,so remove it.
Signed-off-by: Wenkai Lin linwenkai6@hisilicon.com --- v1/wd_aead.c | 4 +--- v1/wd_cipher.c | 4 +--- v1/wd_digest.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/v1/wd_aead.c b/v1/wd_aead.c index f688309..38429fc 100644 --- a/v1/wd_aead.c +++ b/v1/wd_aead.c @@ -593,10 +593,8 @@ int wcrypto_burst_aead(void *a_ctx, struct wcrypto_aead_op_data **opdata, return -WD_EINVAL;
ret = wd_get_cookies(&ctxt->pool, (void **)cookies, num); - if (unlikely(ret)) { - WD_ERR("failed to get cookies %d!\n", ret); + if (unlikely(ret)) return ret; - }
for (i = 0; i < num; i++) { cookies[i]->tag.priv = opdata[i]->priv; diff --git a/v1/wd_cipher.c b/v1/wd_cipher.c index 60a0f25..f95015d 100644 --- a/v1/wd_cipher.c +++ b/v1/wd_cipher.c @@ -477,10 +477,8 @@ int wcrypto_burst_cipher(void *ctx, struct wcrypto_cipher_op_data **c_opdata, return -WD_EINVAL;
ret = wd_get_cookies(&ctxt->pool, (void **)cookies, num); - if (unlikely(ret)) { - WD_ERR("failed to get cookies %d!\n", ret); + if (unlikely(ret)) return ret; - }
for (i = 0; i < num; i++) { cookies[i]->tag.priv = c_opdata[i]->priv; diff --git a/v1/wd_digest.c b/v1/wd_digest.c index b617350..b8ea5ce 100644 --- a/v1/wd_digest.c +++ b/v1/wd_digest.c @@ -456,10 +456,8 @@ int wcrypto_burst_digest(void *d_ctx, struct wcrypto_digest_op_data **opdata, return -WD_EINVAL;
ret = wd_get_cookies(&ctxt->pool, (void **)cookies, num); - if (unlikely(ret)) { - WD_ERR("failed to get cookies %d!\n", ret); + if (unlikely(ret)) return ret; - }
for (i = 0; i < num; i++) { cookies[i]->tag.priv = opdata[i]->priv;