From: Dave Jiang <dave.jiang@intel.com>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Kristen Accardi <kristen.c.accardi@intel.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Andrew Morton <akpm@linux-foundation.org>,
Yosry Ahmed <yosry@kernel.org>, Nhat Pham <nphamcs@gmail.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-crypto@vger.kernel.org,
Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Subject: Re: [PATCH 3/4] crypto: iaa - avoid counting fallback decompression bytes
Date: Tue, 14 Jul 2026 14:56:22 -0700 [thread overview]
Message-ID: <fa0a99aa-6bef-4ca2-93d8-f475b5f9ca1f@intel.com> (raw)
In-Reply-To: <20260713-iaa-crypto-fixes-zswap-v1-3-65cac23c684d@intel.com>
On 7/13/26 9:10 PM, Vinicius Costa Gomes wrote:
> From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
>
> When decompression falls back to deflate-generic after an analytics
> error, the request no longer completes through IAA.
>
> Move decompression byte accounting into the successful IAA completion
> path in both the synchronous and asynchronous flows so decomp_bytes only
> reflects bytes actually processed by IAA.
>
> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Missing Vinicius sign-off.
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/crypto/intel/iaa/iaa_crypto_main.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/crypto/intel/iaa/iaa_crypto_main.c b/drivers/crypto/intel/iaa/iaa_crypto_main.c
> index fb154959c2aa..8f68b1478476 100644
> --- a/drivers/crypto/intel/iaa/iaa_crypto_main.c
> +++ b/drivers/crypto/intel/iaa/iaa_crypto_main.c
> @@ -1084,15 +1084,17 @@ static void iaa_desc_complete(struct idxd_desc *idxd_desc,
> }
> } else {
> ctx->req->dlen = idxd_desc->iax_completion->output_size;
> +
> + if (!ctx->compress) {
> + update_total_decomp_bytes_in(ctx->req->slen);
> + update_wq_decomp_bytes(iaa_wq->wq, ctx->req->slen);
> + }
> }
>
> /* Update stats */
> if (ctx->compress) {
> update_total_comp_bytes_out(ctx->req->dlen);
> update_wq_comp_bytes(iaa_wq->wq, ctx->req->dlen);
> - } else {
> - update_total_decomp_bytes_in(ctx->req->slen);
> - update_wq_decomp_bytes(iaa_wq->wq, ctx->req->slen);
> }
>
> if (ctx->compress && compression_ctx->verify_compress) {
> @@ -1475,16 +1477,16 @@ static int iaa_decompress(struct crypto_tfm *tfm, struct acomp_req *req,
> }
> } else {
> req->dlen = idxd_desc->iax_completion->output_size;
> +
> + /* Update stats */
> + update_total_decomp_bytes_in(slen);
> + update_wq_decomp_bytes(wq, slen);
> }
>
> *dlen = req->dlen;
>
> if (!ctx->async_mode)
> idxd_free_desc(wq, idxd_desc);
> -
> - /* Update stats */
> - update_total_decomp_bytes_in(slen);
> - update_wq_decomp_bytes(wq, slen);
> out:
> return ret;
> err:
>
next prev parent reply other threads:[~2026-07-14 21:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 4:10 [PATCH 0/4] crypto: iaa - Fixes for multi entry SG lists Vinicius Costa Gomes
2026-07-14 4:10 ` [PATCH 1/4] dmaengine: idxd: assign all engines to group 0 in IAA defaults Vinicius Costa Gomes
2026-07-14 21:53 ` Dave Jiang
2026-07-14 21:55 ` Dave Jiang
2026-07-15 1:38 ` Vinicius Costa Gomes
2026-07-14 4:10 ` [PATCH 2/4] crypto: iaa - fall back to software for multi-entry scatterlists Vinicius Costa Gomes
2026-07-14 21:54 ` Dave Jiang
2026-07-14 4:10 ` [PATCH 3/4] crypto: iaa - avoid counting fallback decompression bytes Vinicius Costa Gomes
2026-07-14 21:56 ` Dave Jiang [this message]
2026-07-14 4:10 ` [PATCH 4/4] crypto: iaa - use bounce buffer for multi-sg decompress input Vinicius Costa Gomes
2026-07-14 22:01 ` Dave Jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa0a99aa-6bef-4ca2-93d8-f475b5f9ca1f@intel.com \
--to=dave.jiang@intel.com \
--cc=Frank.Li@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dmaengine@vger.kernel.org \
--cc=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=kristen.c.accardi@intel.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nphamcs@gmail.com \
--cc=vinicius.gomes@intel.com \
--cc=vkoul@kernel.org \
--cc=yosry@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®