Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4809896pxb; Tue, 28 Sep 2021 04:46:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT9vRye7lviwN5oC3GC9ElfFaKmvWx/4sORpnWPk58llcmBLNnqhWXGhZ7E99E6520wmf9 X-Received: by 2002:a17:90a:540a:: with SMTP id z10mr5060616pjh.115.1632829571697; Tue, 28 Sep 2021 04:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632829571; cv=none; d=google.com; s=arc-20160816; b=p2KLMXAq3HHvzqz8W54UiVF9VJmb1fyxgFDxNk5VNNsF3ghPF0yNxQKWUqGYppeBRt OmDB7fz9jxFv2cxXO0ZSFAvnB+fM45ScinzP4c0eZ5f/Yn81HU9+HdcJQ0xcUhaDHZOK 6bbXPlDZ+ff53tvAc8h561rGHohZeRXADPLvtYKCfJYaRAbk0uN4Mu7dEUlCIZLjf6Uf 4HPCPeuMSw2ZgcdTICMQzfZ+d/MBQUu6twERs0/lsbNhI/mu2G1D8XurM2sUZhZtTgS4 QhTcVCKdv3cS8TBtp4nkkKprZxwYrlXVp+e1cJ4QQjvSCzV+u1TFwuowhTP1q6TnVDWr ehLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=wznn8HEhsrAM3r114oq13xtlSGE/iE8teGc+FJg9uJQ=; b=IPDhhixz2BCeIkEEcwOpKF7cyUz7RTNVmhy438Qedx9hE0jE5U2uTBErz0BrLfs+6F //T/Xc7ot9PR7wrwn/l7pp6CM9TcB2hbYQ/Vpzzxxfz65eQhKYlqQgEjzCjwEDIgbNy8 0F0W0lfCUEOv3TeNhSGJPqwRx3usbl6elopy2YGHMUM0ZmPJa2cEDdgx286gQXfwjryj uV6sxCYmTzSKsV5G/EhBZPXGaprCLrkPYbuvYtvrsPxTqhzNWBb1rMJ+WidHZng+a+3Z KXuIoJc3JL5JG+zM1Axds/aXKg5MS8ig2XadBvrVuRfEV8JNld4zlAvkXA5NFCAiSGXA U/Zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x4si2871477pju.103.2021.09.28.04.45.58; Tue, 28 Sep 2021 04:46:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240398AbhI1Lqo (ORCPT + 99 others); Tue, 28 Sep 2021 07:46:44 -0400 Received: from mga07.intel.com ([134.134.136.100]:37927 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240403AbhI1Lqm (ORCPT ); Tue, 28 Sep 2021 07:46:42 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10120"; a="288339065" X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="288339065" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 04:45:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="562224807" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314.ger.corp.intel.com) ([10.237.222.51]) by fmsmga002.fm.intel.com with ESMTP; 28 Sep 2021 04:45:01 -0700 From: Giovanni Cabiddu To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Marco Chiappero , Giovanni Cabiddu Subject: [PATCH 08/12] crypto: qat - move pfvf collision detection values Date: Tue, 28 Sep 2021 12:44:36 +0100 Message-Id: <20210928114440.355368-9-giovanni.cabiddu@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210928114440.355368-1-giovanni.cabiddu@intel.com> References: <20210928114440.355368-1-giovanni.cabiddu@intel.com> MIME-Version: 1.0 Organization: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare - Ireland Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Marco Chiappero Keep adf_pf2vf_msg.h as much as possible focused on the protocol definition. Instead, collision parameters are an implementation detail which should stay close to the code consuming them, therefore move them to adf_pf2vf_msg.c. Signed-off-by: Marco Chiappero Reviewed-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/adf_pf2vf_msg.c | 9 +++++++++ drivers/crypto/qat/qat_common/adf_pf2vf_msg.h | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c index 41f4b5643dbb..22977001271c 100644 --- a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c +++ b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c @@ -5,6 +5,15 @@ #include "adf_common_drv.h" #include "adf_pf2vf_msg.h" +#define ADF_IOV_MSG_COLLISION_DETECT_DELAY 10 +#define ADF_IOV_MSG_ACK_DELAY 2 +#define ADF_IOV_MSG_ACK_MAX_RETRY 100 +#define ADF_IOV_MSG_RETRY_DELAY 5 +#define ADF_IOV_MSG_MAX_RETRIES 3 +#define ADF_IOV_MSG_RESP_TIMEOUT (ADF_IOV_MSG_ACK_DELAY * \ + ADF_IOV_MSG_ACK_MAX_RETRY + \ + ADF_IOV_MSG_COLLISION_DETECT_DELAY) + void adf_enable_vf2pf_interrupts(struct adf_accel_dev *accel_dev, u32 vf_mask) { struct adf_hw_device_data *hw_data = accel_dev->hw_device; diff --git a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.h b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.h index ffd43aa50b57..a7d8f8367345 100644 --- a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.h +++ b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.h @@ -90,13 +90,4 @@ /* VF->PF Compatible Version Request */ #define ADF_VF2PF_COMPAT_VER_REQ_SHIFT 22 -/* Collision detection */ -#define ADF_IOV_MSG_COLLISION_DETECT_DELAY 10 -#define ADF_IOV_MSG_ACK_DELAY 2 -#define ADF_IOV_MSG_ACK_MAX_RETRY 100 -#define ADF_IOV_MSG_RETRY_DELAY 5 -#define ADF_IOV_MSG_MAX_RETRIES 3 -#define ADF_IOV_MSG_RESP_TIMEOUT (ADF_IOV_MSG_ACK_DELAY * \ - ADF_IOV_MSG_ACK_MAX_RETRY + \ - ADF_IOV_MSG_COLLISION_DETECT_DELAY) #endif /* ADF_IOV_MSG_H */ -- 2.31.1