Re: [PATCH v14 18/26] crypto: acomp, iaa - crypto_acomp integration of IAA Batching.

From: Herbert Xu

Date: Wed Feb 04 2026 - 23:14:59 EST


On Sat, Jan 24, 2026 at 07:35:29PM -0800, Kanchana P Sridhar wrote:
>
> @@ -291,6 +292,65 @@ static __always_inline int acomp_do_req_chain(struct acomp_req *req, bool comp)
> return acomp_reqchain_finish(req, err);
> }
>
> +static int acomp_do_req_batch_parallel(struct acomp_req *req, bool comp)
> +{
> + struct crypto_acomp *tfm = crypto_acomp_reqtfm(req);
> + unsigned long *bpwq_addr = acomp_request_ctx(req);
> + wait_queue_head_t batch_parallel_wq;
> + int ret;
> +
> + init_waitqueue_head(&batch_parallel_wq);
> + *bpwq_addr = (unsigned long)&batch_parallel_wq;
> +
> + ret = comp ? tfm->compress(req) : tfm->decompress(req);
> +
> + wait_event(batch_parallel_wq, tfm->batch_completed(req, comp));
> +
> + if (req->slen < 0)
> + ret |= -EINVAL;
> +
> + return ret;
> +}

I don't think we should have this in acomp. Just return EINPROGRESS
and let the user check each unit for the success/error.

Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt