mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
crypto: qat - rename get_sla_arr_of_type()
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> Signed-off-by: Xin Zeng <xin.zeng@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
680302d191
commit
84058ffb91
@ -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);
|
||||
@ -875,7 +875,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;
|
||||
}
|
||||
@ -1065,7 +1065,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])
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user