From: George Abraham P <george.abraham.p@intel.com>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com,
George Abraham P <george.abraham.p@intel.com>,
Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
Ahsan Atta <ahsan.atta@intel.com>
Subject: [PATCH 1/3] crypto: qat - validate rate limiting only for enabled services
Date: Mon, 19 Oct 2026 16:33:54 +0530 [thread overview]
Message-ID: <20261019110356.3781949-2-george.abraham.p@intel.com> (raw)
In-Reply-To: <20261019110356.3781949-1-george.abraham.p@intel.com>
Rate limiting validates the throughput limits for asymmetric, symmetric
and compression services unconditionally. Devices that support only a
subset of these services (for example, QAT GEN6 wireless) can leave unused
throughput limits unset, causing rate limiting initialization to fail.
Validate the throughput limit for each enabled base service instead,
skipping services that are not enabled. The check also covers the
decompression service.
Fixes: 464da0bf19fd ("crypto: qat - add wireless mode support for QAT GEN6")
Signed-off-by: George Abraham P <george.abraham.p@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Ahsan Atta <ahsan.atta@intel.com>
---
drivers/crypto/intel/qat/qat_common/adf_rl.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/intel/qat/qat_common/adf_rl.c b/drivers/crypto/intel/qat/qat_common/adf_rl.c
index 997ef448a4df..d083276f69cb 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_rl.c
+++ b/drivers/crypto/intel/qat/qat_common/adf_rl.c
@@ -1050,14 +1050,19 @@ int adf_rl_init(struct adf_accel_dev *accel_dev)
{
struct adf_hw_device_data *hw_data = GET_HW_DATA(accel_dev);
struct adf_rl_hw_data *rl_hw_data = &hw_data->rl_data;
+ enum adf_base_services svc;
struct adf_rl *rl;
int ret = 0;
- /* Validate device parameters */
- if (RL_VALIDATE_NON_ZERO(rl_hw_data->max_tp[SVC_ASYM]) ||
- RL_VALIDATE_NON_ZERO(rl_hw_data->max_tp[SVC_SYM]) ||
- RL_VALIDATE_NON_ZERO(rl_hw_data->max_tp[SVC_DC]) ||
- RL_VALIDATE_NON_ZERO(rl_hw_data->scan_interval) ||
+ for (svc = 0; svc < SVC_BASE_COUNT; svc++) {
+ if (adf_is_service_enabled(accel_dev, svc) &&
+ RL_VALIDATE_NON_ZERO(rl_hw_data->max_tp[svc])) {
+ ret = -EOPNOTSUPP;
+ goto err_ret;
+ }
+ }
+
+ if (RL_VALIDATE_NON_ZERO(rl_hw_data->scan_interval) ||
RL_VALIDATE_NON_ZERO(rl_hw_data->pcie_scale_div) ||
RL_VALIDATE_NON_ZERO(rl_hw_data->pcie_scale_mul) ||
RL_VALIDATE_NON_ZERO(rl_hw_data->scale_ref)) {
--
2.40.1
next prev parent reply other threads:[~2026-10-19 11:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 11:03 [PATCH 0/3] crypto: qat - fix rate limiting and telemetry for QAT GEN6 wireless George Abraham P
2026-10-19 11:03 ` George Abraham P [this message]
2026-10-19 11:03 ` [PATCH 2/3] crypto: qat - fix rate limiting " George Abraham P
2026-10-19 11:03 ` [PATCH 3/3] crypto: qat - fix telemetry command queue counts George Abraham P
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261019110356.3781949-2-george.abraham.p@intel.com \
--to=george.abraham.p@intel.com \
--cc=ahsan.atta@intel.com \
--cc=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=qat-linux@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox