crypto: qat - refactor compression template logic
authorSuman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>
Wed, 30 Apr 2025 11:34:44 +0000 (12:34 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 5 May 2025 10:20:44 +0000 (18:20 +0800)
commitcd0e7160f80f5fd3ebb6481ddf4f562838cad4bf
treec26a561acb72e3a28ba3ce20f15968556e75a026
parentb8ca43806292d7094103c2af44fbb9824874b19e
crypto: qat - refactor compression template logic

The logic that generates the compression templates, which are used by to
submit compression requests to the QAT device, is very similar between
QAT devices and diverges mainly on the HW generation-specific
configuration word.

This makes the logic that generates the compression and decompression
templates common between GEN2 and GEN4 devices and abstracts the
generation-specific logic to the generation-specific implementations.

The adf_gen2_dc.c and adf_gen4_dc.c have been replaced by adf_dc.c, and
the generation-specific logic has been reduced and moved to
adf_gen2_hw_data.c and adf_gen4_hw_data.c.

This does not introduce any functional change.

Co-developed-by: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>
Signed-off-by: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>
Signed-off-by: Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
23 files changed:
drivers/crypto/intel/qat/qat_420xx/adf_420xx_hw_data.c
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c
drivers/crypto/intel/qat/qat_c3xxx/adf_c3xxx_hw_data.c
drivers/crypto/intel/qat/qat_c3xxxvf/adf_c3xxxvf_hw_data.c
drivers/crypto/intel/qat/qat_c62x/adf_c62x_hw_data.c
drivers/crypto/intel/qat/qat_c62xvf/adf_c62xvf_hw_data.c
drivers/crypto/intel/qat/qat_common/Makefile
drivers/crypto/intel/qat/qat_common/adf_accel_devices.h
drivers/crypto/intel/qat/qat_common/adf_dc.c [new file with mode: 0644]
drivers/crypto/intel/qat/qat_common/adf_dc.h [new file with mode: 0644]
drivers/crypto/intel/qat/qat_common/adf_gen2_dc.c [deleted file]
drivers/crypto/intel/qat/qat_common/adf_gen2_dc.h [deleted file]
drivers/crypto/intel/qat/qat_common/adf_gen2_hw_data.c
drivers/crypto/intel/qat/qat_common/adf_gen2_hw_data.h
drivers/crypto/intel/qat/qat_common/adf_gen4_dc.c [deleted file]
drivers/crypto/intel/qat/qat_common/adf_gen4_dc.h [deleted file]
drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.c
drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.h
drivers/crypto/intel/qat/qat_common/qat_comp_algs.c
drivers/crypto/intel/qat/qat_common/qat_compression.c
drivers/crypto/intel/qat/qat_common/qat_compression.h
drivers/crypto/intel/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c
drivers/crypto/intel/qat/qat_dh895xccvf/adf_dh895xccvf_hw_data.c