Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: qat - add compression slice count for rate limiting

In QAT GEN4 devices, the compression slice count was tracked using the
dcpr_cnt field.

Introduce a new cpr_cnt field in the rate limiting (RL) infrastructure to
track the compression (CPR) slice count independently. The cpr_cnt value is
populated via the RL_INIT admin message.

The existing dcpr_cnt field will now be used exclusively to cache the
decompression slice count, ensuring a clear separation between compression
and decompression tracking.

Signed-off-by: Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Suman Kumar Chakraborty and committed by
Herbert Xu
45515eec e983946d

+2
+1
drivers/crypto/intel/qat/qat_common/adf_rl.h
··· 68 68 u8 dcpr_cnt; 69 69 u8 pke_cnt; 70 70 u8 cph_cnt; 71 + u8 cpr_cnt; 71 72 }; 72 73 73 74 struct adf_rl_interface_data {
+1
drivers/crypto/intel/qat/qat_common/adf_rl_admin.c
··· 63 63 slices_int->pke_cnt = slices_resp.pke_cnt; 64 64 /* For symmetric crypto, slice tokens are relative to the UCS slice */ 65 65 slices_int->cph_cnt = slices_resp.ucs_cnt; 66 + slices_int->cpr_cnt = slices_resp.cpr_cnt; 66 67 67 68 return 0; 68 69 }