Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp255923rdb; Thu, 1 Feb 2024 07:43:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5tm3kYq56JvEp9WkHbVy6LdnXpy42DvFwgebZVKE4GKy7QCGECaZhy2GynwZoS1Di4bcj X-Received: by 2002:a17:906:f243:b0:a36:33ac:3086 with SMTP id gy3-20020a170906f24300b00a3633ac3086mr1823387ejb.72.1706802191351; Thu, 01 Feb 2024 07:43:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706802191; cv=pass; d=google.com; s=arc-20160816; b=GluCbGlTjpBg2RmevtCRgFE1zwL3MS1iS6sL9iR8AA4kZ3lTB37On+oyu7LQsFg80y II5+bTYwvepX2XBG6FUtgYnyDnx8j8I6UwEAsQEOS6mcOjI9o8tp+iqZFAvX220bLMsQ KaPslOXNYZ1Th8Q6ksw4eynXsK/uQ7B5yEJFmSxVrbUGBtTUPoG3PayWexwvSkNWvoTd t2difie8XJBPT16z+YU9LjIIQK4IhXmiKq9IYwc1A26cExh2LC9MSV+DdtPIGz517NFo 2iJpxamGjKQ5tLvNSH/jmbv4N62K/aGvELsEq/KGMtqeXfOL29v5GA8MakLoLTNPjetZ 3Z+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=pf4eYzgkKa6H8zKheJKvHZ8h48+rQ/4ENwBTDl7c79g=; fh=Z05/6sUv+G8wQduHZOIZ0Wx9NcsMpyQj8oUYztJoXKE=; b=ebFUQuB+X+yTN+f5HNXOK1+UOKHsnLlryCJbCxFfJaskc1xiPMd33eeYUoMtKF+W+U D2cc0YqnGd0Vz1SWC9uu0L3/RdGuEmgprpEoeR7JeJUpB/ZwHMTHphuFjYAaCb9GLkpB GAcD6mwQ/3Ny86cuqZTvzIrCU/rpxoSYTtLvTyeIoqRitNa8pP6G9UZkn8L5DU3lKMan mtD7iXEvly8I/BaP7NPcbP1NSx7K5Pr3JbRq3L/0EoZY0lQUlVYrbnROvcAntLEjlSfv mNTbEgZamlHVniNKtqpsYQbojiMiTwEkI5Tqdv6NcNWac15c0ubb7/KLi4lMO5HhLSL5 HUIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d8VjlzG6; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-crypto+bounces-1783-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1783-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCVD1usC3nClL4nN+iF2qrkSdaNVypXatsHe7xPSKOC5QZGok1oCBeGVq1weIyKHFkhWEsEhz/e5DS8yl7qLF2eN3v7dagnHR2HZtw4R0w== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q26-20020a170906b29a00b00a35e3bfa4bdsi3633306ejz.513.2024.02.01.07.43.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 07:43:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1783-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d8VjlzG6; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-crypto+bounces-1783-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1783-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 932961F25118 for ; Thu, 1 Feb 2024 15:42:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6154A626C9; Thu, 1 Feb 2024 15:42:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="d8VjlzG6" X-Original-To: linux-crypto@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C8C2779F8; Thu, 1 Feb 2024 15:42:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.55.52.93 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706802131; cv=none; b=HdwZImUTNazqCN1o/6MCn+pJii9XJT9vo6UF6oY+fFPSuo+PPAFY7oIKVL6a5mmZUh/C0Num+op/BVwkVyutsXY4TRSBd3wO0jmgotIHyrMdihTE4QMWKy6lydpMf53FHa8CNhr2y4oBevX6QBgNFZmLp86jRjwfluKtb+ATUqA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706802131; c=relaxed/simple; bh=kKbIxNomOg5IocogqlQI4qIKOM/SH9Yo81ie5EzLeEY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=fa8JPHLvB+klTC44bSD5GmSLi8+/Byhmw2awiO7QjC1BuuUe7IptsPgIKLUWFFvSYm1Jc/StX3p1zgln19YEroCsoQLdqMOAwx3x9k7Duv/0hDE4A43zIq6v15v63S1YbEbf8uFRxsvqkHQf9tP64zYAYEgSomRWFLkdtVzPMdQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=d8VjlzG6; arc=none smtp.client-ip=192.55.52.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706802129; x=1738338129; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=kKbIxNomOg5IocogqlQI4qIKOM/SH9Yo81ie5EzLeEY=; b=d8VjlzG6ZZIUjbC2PotGrKXXOEQAaYGFrdVa/U9uvwm1kscAZBFEu+Nn cUF/kg5BlT6pNcvBljJaiMYyAd/xT3+TtH1WEsI6xMEFRL4ow6saa3bY6 x9rBwtbtqnTHZYMyb9imRSIgFaKmmoozc9x6FB2bz1kL38QcZLH9+UbGo lekwuhxFSMeFF9S+niUxgHlXsQ9ITrCDjRPYk8CwqPjJTH5k6qiVTs6jL qwh/rLcyRKejZm5Wvb7FUcn3IQgvUACakbN2pYCKdlzhMXDvX0iQhLhnU fPldZoR3Wo2N0/s+Z4825nLAWBeb0Q+LleggST7BR/3hx6kU3/G+6gcDX A==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="401052942" X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="401052942" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 07:42:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="133324" Received: from qat-server-archercity1.sh.intel.com ([10.67.111.115]) by orviesa007.jf.intel.com with ESMTP; 01 Feb 2024 07:42:06 -0800 From: Xin Zeng 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 , Xin Zeng Subject: [PATCH 05/10] crypto: qat - rename get_sla_arr_of_type() Date: Thu, 1 Feb 2024 23:33:32 +0800 Message-Id: <20240201153337.4033490-6-xin.zeng@intel.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240201153337.4033490-1-xin.zeng@intel.com> References: <20240201153337.4033490-1-xin.zeng@intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Siming Wan 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 Reviewed-by: Giovanni Cabiddu Reviewed-by: Damian Muszynski Reviewed-by: Xin Zeng Signed-off-by: Xin Zeng --- 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