crypto: qat - improve the ACK timings in PFVF send
authorMarco Chiappero <marco.chiappero@intel.com>
Thu, 16 Dec 2021 09:13:23 +0000 (09:13 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 24 Dec 2021 03:18:25 +0000 (14:18 +1100)
Review the ACK timings in adf_gen2_pfvf_send() to improve the latency
by reducing the polling interval. Also increase the timeout, for higher
tolerance in highly loaded systems, and reposition these new values to
allow for inclusion by the future GEN4 devices too.

Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
Co-developed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/adf_gen2_pfvf.c
drivers/crypto/qat/qat_common/adf_pfvf_utils.h

index 53c2e124944dbbb0626c83bdc0acf099e45e0eaa..feab01ec4bbb30e6990f69a29cff1d876fae4287 100644 (file)
@@ -37,9 +37,6 @@ static const struct pfvf_csr_format csr_gen2_fmt = {
        { ADF_PFVF_GEN2_MSGDATA_SHIFT, ADF_PFVF_GEN2_MSGDATA_MASK },
 };
 
-#define ADF_PFVF_MSG_ACK_DELAY_US      2000
-#define ADF_PFVF_MSG_ACK_MAX_DELAY_US  (ADF_PFVF_MSG_ACK_DELAY_US * 100)
-
 #define ADF_PFVF_MSG_RETRY_DELAY       5
 #define ADF_PFVF_MSG_MAX_RETRIES       3
 
index 7b73b5992d031c8815511c3d6187f648769c3dfd..7676fdddbe2686bd97899c670553f155469fb93a 100644 (file)
@@ -6,6 +6,10 @@
 #include <linux/types.h>
 #include "adf_pfvf_msg.h"
 
+/* How long to wait for far side to acknowledge receipt */
+#define ADF_PFVF_MSG_ACK_DELAY_US      4
+#define ADF_PFVF_MSG_ACK_MAX_DELAY_US  (1 * USEC_PER_SEC)
+
 struct pfvf_field_format {
        u8  offset;
        u32 mask;