Commit 4af3fbbe authored by Tom Zanussi's avatar Tom Zanussi Committed by Xiaochen Shen
Browse files

crypto: iaa - fix decomp_bytes_in stats

mainline inclusion
from mainline-v6.10-rc1
commit 19b0ed5ddc8b554d1dfc34f870dc56e706ed205a
category: bugfix
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I9TA1S
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=19b0ed5ddc8b554d1dfc34f870dc56e706ed205a



--------------------------------

Decomp stats should use slen, not dlen.  Change both the global and
per-wq stats to use the correct value.

Intel-SIG: commit 19b0ed5ddc8b crypto: iaa - fix decomp_bytes_in stats.
Backporting patches for Intel IAA crypto driver on Intel Xeon platform.

Signed-off-by: default avatarTom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarXiaochen Shen <xiaochen.shen@intel.com>
parent 8309da04
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1079,8 +1079,8 @@ static void iaa_desc_complete(struct idxd_desc *idxd_desc,
		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->dlen);
		update_wq_decomp_bytes(iaa_wq->wq, ctx->req->dlen);
		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) {