crypto: qat - add admin msgs for telemetry
authorLucas Segarra Fernandez <lucas.segarra.fernandez@intel.com>
Fri, 22 Dec 2023 10:35:06 +0000 (11:35 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 29 Dec 2023 03:25:55 +0000 (11:25 +0800)
commit7f06679dd54a331d750e5d6f6f04a9df2eba72ff
treec025e222558d5fa97812dbc74851f8c9e24af8b0
parentb6e4b6eb1e6393580482581470a3a08c15ab977b
crypto: qat - add admin msgs for telemetry

Extend the admin interface with two new public APIs to enable
and disable the telemetry feature: adf_send_admin_tl_start() and
adf_send_admin_tl_stop().

The first, sends to the firmware, through the ICP_QAT_FW_TL_START
message, the IO address where the firmware will write telemetry
metrics and a list of ring pairs (maximum 4) to be monitored.
It returns the number of accelerators of each type supported by
this hardware. After this message is sent, the firmware starts
periodically reporting telemetry data using by writing into the
dma buffer specified as input.

The second, sends the admin message ICP_QAT_FW_TL_STOP
which stops the reporting of telemetry data.

This patch is based on earlier work done by Wojciech Ziemba.

Signed-off-by: Lucas Segarra Fernandez <lucas.segarra.fernandez@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Damian Muszynski <damian.muszynski@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/qat/qat_common/adf_admin.c
drivers/crypto/intel/qat/qat_common/adf_admin.h
drivers/crypto/intel/qat/qat_common/icp_qat_fw_init_admin.h