kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xin Zeng <xin.zeng@intel.com>
To: herbert@gondor.apana.org.au, alex.williamson@redhat.com,
	jgg@nvidia.com, yishaih@nvidia.com,
	shameerali.kolothum.thodi@huawei.com, kevin.tian@intel.com
Cc: linux-crypto@vger.kernel.org, kvm@vger.kernel.org,
	qat-linux@intel.com, Siming Wan <siming.wan@intel.com>,
	Xin Zeng <xin.zeng@intel.com>
Subject: [PATCH 05/10] crypto: qat - rename get_sla_arr_of_type()
Date: Thu,  1 Feb 2024 23:33:32 +0800	[thread overview]
Message-ID: <20240201153337.4033490-6-xin.zeng@intel.com> (raw)
In-Reply-To: <20240201153337.4033490-1-xin.zeng@intel.com>

From: Siming Wan <siming.wan@intel.com>

The function get_sla_arr_of_type() returns a pointer to an SLA type
specific array.
Rename it and expose it as it will be used externally to this module.

This does not introduce any functional change.

Signed-off-by: Siming Wan <siming.wan@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Damian Muszynski <damian.muszynski@intel.com>
Reviewed-by: Xin Zeng <xin.zeng@intel.com>
Signed-off-by: Xin Zeng <xin.zeng@intel.com>
---
 drivers/crypto/intel/qat/qat_common/adf_rl.c | 10 +++++-----
 drivers/crypto/intel/qat/qat_common/adf_rl.h |  2 ++
 2 files changed, 7 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 de1b214dba1f..41017af1be68 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_rl.c
+++ b/drivers/crypto/intel/qat/qat_common/adf_rl.c
@@ -183,14 +183,14 @@ static enum adf_cfg_service_type srv_to_cfg_svc_type(enum adf_base_services rl_s
 }
 
 /**
- * get_sla_arr_of_type() - Returns a pointer to SLA type specific array
+ * adf_rl_get_sla_arr_of_type() - Returns a pointer to SLA type specific array
  * @rl_data: pointer to ratelimiting data
  * @type: SLA type
  * @sla_arr: pointer to variable where requested pointer will be stored
  *
  * Return: Max number of elements allowed for the returned array
  */
-static u32 get_sla_arr_of_type(struct adf_rl *rl_data, enum rl_node_type type,
+u32 adf_rl_get_sla_arr_of_type(struct adf_rl *rl_data, enum rl_node_type type,
 			       struct rl_sla ***sla_arr)
 {
 	switch (type) {
@@ -778,7 +778,7 @@ static void clear_sla(struct adf_rl *rl_data, struct rl_sla *sla)
 		rp_in_use[sla->ring_pairs_ids[i]] = false;
 
 	update_budget(sla, old_cir, true);
-	get_sla_arr_of_type(rl_data, sla->type, &sla_type_arr);
+	adf_rl_get_sla_arr_of_type(rl_data, sla->type, &sla_type_arr);
 	assign_node_to_parent(rl_data->accel_dev, sla, true);
 	adf_rl_send_admin_delete_msg(rl_data->accel_dev, node_id, sla->type);
 	mark_rps_usage(sla, rl_data->rp_in_use, false);
@@ -857,7 +857,7 @@ static int add_update_sla(struct adf_accel_dev *accel_dev,
 
 	if (!is_update) {
 		mark_rps_usage(sla, rl_data->rp_in_use, true);
-		get_sla_arr_of_type(rl_data, sla->type, &sla_type_arr);
+		adf_rl_get_sla_arr_of_type(rl_data, sla->type, &sla_type_arr);
 		sla_type_arr[sla->node_id] = sla;
 		rl_data->sla[sla->sla_id] = sla;
 	}
@@ -1047,7 +1047,7 @@ void adf_rl_remove_sla_all(struct adf_accel_dev *accel_dev, bool incl_default)
 
 	/* Unregister and remove all SLAs */
 	for (j = RL_LEAF; j >= end_type; j--) {
-		max_id = get_sla_arr_of_type(rl_data, j, &sla_type_arr);
+		max_id = adf_rl_get_sla_arr_of_type(rl_data, j, &sla_type_arr);
 
 		for (i = 0; i < max_id; i++) {
 			if (!sla_type_arr[i])
diff --git a/drivers/crypto/intel/qat/qat_common/adf_rl.h b/drivers/crypto/intel/qat/qat_common/adf_rl.h
index 269c6656fb90..bfe750ea0e83 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_rl.h
+++ b/drivers/crypto/intel/qat/qat_common/adf_rl.h
@@ -151,6 +151,8 @@ struct rl_sla {
 	u16 ring_pairs_cnt;
 };
 
+u32 adf_rl_get_sla_arr_of_type(struct adf_rl *rl_data, enum rl_node_type type,
+			       struct rl_sla ***sla_arr);
 int adf_rl_add_sla(struct adf_accel_dev *accel_dev,
 		   struct adf_rl_sla_input_data *sla_in);
 int adf_rl_update_sla(struct adf_accel_dev *accel_dev,
-- 
2.18.2


  parent reply	other threads:[~2024-02-01 15:42 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 15:33 [PATCH 00/10] crypto: qat - enable SRIOV VF live migration for Xin Zeng
2024-02-01 15:33 ` [PATCH 01/10] crypto: qat - adf_get_etr_base() helper Xin Zeng
2024-02-01 15:33 ` [PATCH 02/10] crypto: qat - relocate and rename 4xxx PF2VM definitions Xin Zeng
2024-02-01 15:33 ` [PATCH 03/10] crypto: qat - move PFVF compat checker to a function Xin Zeng
2024-02-01 15:33 ` [PATCH 04/10] crypto: qat - relocate CSR access code Xin Zeng
2024-02-01 15:33 ` Xin Zeng [this message]
2024-02-01 15:33 ` [PATCH 06/10] crypto: qat - expand CSR operations for QAT GEN4 devices Xin Zeng
2024-02-01 15:33 ` [PATCH 07/10] crypto: qat - add bank save and restore flows Xin Zeng
2024-02-04  7:49   ` [EXTERNAL] " Kamlesh Gurudasani
2024-02-19  3:41     ` Wan, Siming
2024-02-01 15:33 ` [PATCH 08/10] crypto: qat - add interface for live migration Xin Zeng
2024-02-01 15:33 ` [PATCH 09/10] crypto: qat - implement " Xin Zeng
2024-02-01 15:33 ` [PATCH 10/10] vfio/qat: Add vfio_pci driver for Intel QAT VF devices Xin Zeng
2024-02-06 12:55   ` Jason Gunthorpe
2024-02-09  8:23     ` Zeng, Xin
2024-02-09 12:10       ` Jason Gunthorpe
2024-02-11  8:17         ` Yishai Hadas
2024-02-17 16:20           ` Zeng, Xin
2024-02-20 13:24             ` Jason Gunthorpe
2024-02-20 15:53               ` Zeng, Xin
2024-02-20 17:03                 ` Jason Gunthorpe
2024-02-21  8:44                   ` Zeng, Xin
2024-02-21 13:18                     ` Jason Gunthorpe
2024-02-21 15:11                       ` Yishai Hadas
2024-02-22  9:39                         ` Yishai Hadas
2024-02-06 21:14   ` Alex Williamson
2024-02-09 16:16     ` Zeng, Xin
2024-02-08 12:17   ` Shameerali Kolothum Thodi
2024-02-13 13:08     ` Zeng, Xin
2024-02-13 14:55       ` Jason Gunthorpe

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=20240201153337.4033490-6-xin.zeng@intel.com \
    --to=xin.zeng@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jgg@nvidia.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=qat-linux@intel.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=siming.wan@intel.com \
    --cc=yishaih@nvidia.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;
as well as URLs for NNTP newsgroup(s).