Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1499710rdb; Mon, 19 Feb 2024 19:30:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVN2qFJ0j94B6CnZidKpcNzzwclM4fOm6HrKLvziBX/eJaemcQCVPuGTpH6TbiNIO10sjjqtY0YPrYTxY/kzj8ezspup1H9pfSEx/JRMQ== X-Google-Smtp-Source: AGHT+IFSMwBdSILO5ZCMue8kooI9FGFxcnVwapE1VckyfqZVxG3zYvl5xDn2kIRWhhUv3CzG3Skz X-Received: by 2002:a17:902:f682:b0:1db:ff7b:d202 with SMTP id l2-20020a170902f68200b001dbff7bd202mr4547876plg.11.1708399823230; Mon, 19 Feb 2024 19:30:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708399823; cv=pass; d=google.com; s=arc-20160816; b=cW+MWsEb5j9mu/U5qgxkR4vHKjoHGCilLyre9CputbCL4eT5IsaVr0XsQd2Q1kt8La jzRT0DAfmUEjzOLJLNTQ28aiNxvtPuj9uLde07uCyZrWRJ7OZtBsITFsWurV0u4PnGVw cIbp1hwKlIF8+89av3snNirw9+EZYrgI9vWn6tNBV1HCZsh5Pmq1aAzA4XoNxtos/PJR 1JYI/01TONn8IS17N9pYurhVrklLYdojfMzd5HdRfl8k/P5WM7YppMCqd+pOoH/OVe3s Drd1QJGIoSvdvIoF9k0PfPQE55xHtOVKHVUsEOmYjydJvK6lCJaDJ2sD/jLAeoWGAGZe f2QA== 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=2G4S/+Is299VrYotmptRr9/hGmflvKqt2kR5ggWVTds=; fh=Pq+Jh8vfsPzAaAzD+CrpO5rR/ezvMeEF/33Oob9TGpQ=; b=u+zrDpeY6h+CCA+/QVYdHlx57bh7/xfNRYkSLx/lvHy1+XcwTgsqRkfw8D3vWkVQIB NGHf9oFYS9NumwezPO5pXzUHUdl53XBMnogQR9qxFKZt2k1DMxJUEqa65QDzp0f60kbk oaI57jUm42NyryQ2nrMgU+SZ0F36j7AgwrCuaZmovxEf0BD6bAPV1NjnydM2Mut/x4S8 6MP5d5sA7N9+h8Ai6DRtG3uhmkoetwCD00L8Qhh7PN6k+iccaAueoYjTuyJSTQXU3EFB kc1n92pQ+fPC6lusvgXpk9tOkzNTRucChi9CHtGuXg3r/ZopTXLTdEn1t6weYA5gFEw/ cwTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lFdUtbP5; 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-2182-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2182-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d12-20020a170903230c00b001db420e7552si5396768plh.65.2024.02.19.19.30.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 19:30:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2182-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lFdUtbP5; 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-2182-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2182-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 684B82810DE for ; Tue, 20 Feb 2024 03:30:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77F025823C; Tue, 20 Feb 2024 03:29:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lFdUtbP5" X-Original-To: linux-crypto@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 B66F95820E; Tue, 20 Feb 2024 03:29:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708399784; cv=none; b=lvrCiXnsqL88SCIPgp0gOj7JG1G4Cyk3/VpjPxyroU8Fk+2da+3mRMDze23fC5HBjuc9z5xaZejNmMq6ICIMeOpvQPhAlMMNiYO9MY+F3hU9z2cNr8PyWT8stVqT9y/4T60owmAGyUE9Zq5gEImCK6dtv2wf7FLmcLM0+k+ZZWc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708399784; c=relaxed/simple; bh=AHf7nRY3vfpNNK+tkeq80dZDoVsayvhUuKbnKLUDsK4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=EqWtSNOnRay9HqLyOo+PPAxWOkJuIiVEaePrKP3nliMnsR24VNLvlTiKeYxU0A3rulUskQHNVnLHNGrSsRbok6CtyyCLd9xb5e25Sk0ZGwWjqmA0IcqOflyZ/6wx0KPhnMOSX218z6bELVv6D8XQRy8hPTW5kkpD7AqAIxxt5sU= 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=lFdUtbP5; arc=none smtp.client-ip=198.175.65.20 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=1708399783; x=1739935783; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=AHf7nRY3vfpNNK+tkeq80dZDoVsayvhUuKbnKLUDsK4=; b=lFdUtbP5ulRFM6qOhxXQSj4MEyo/YWQ5ljYsWqxoUFyfwJ7fGeISIAM8 4YKNTnh0xLrAyE5U/4cvM2vfBTMlDxeGf2Mw+5I+mE/m3HBSeXKEHkLjZ ucjf2r/jmFB2a5anxp9no9DPKQMybaPFhdlmZNxcBEaILdsa8SJgXYZjT 2dwEJYYPDASaROBXPT71mO4Mq10EaHzRH8mx9H6zZBO/EeGTlPHeopgsb aF6PW5sb1NHaIH0n5eOTaEyh/UgVu6y65Q/WEseECrApq+lr7INljAWLj 8Dj37XG4VWLiML/5rpoMGkYOtcIVQXqRqr1ak3wchwRkNuOptHYeEhwEK A==; X-IronPort-AV: E=McAfee;i="6600,9927,10989"; a="2354095" X-IronPort-AV: E=Sophos;i="6.06,171,1705392000"; d="scan'208";a="2354095" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 19:29:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,171,1705392000"; d="scan'208";a="9302086" Received: from qat-server-archercity1.sh.intel.com ([10.67.111.115]) by orviesa003.jf.intel.com with ESMTP; 19 Feb 2024 19:29:39 -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 v2 05/10] crypto: qat - rename get_sla_arr_of_type() Date: Tue, 20 Feb 2024 11:20:47 +0800 Message-Id: <20240220032052.66834-6-xin.zeng@intel.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240220032052.66834-1-xin.zeng@intel.com> References: <20240220032052.66834-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 d4f2db3c53d8..65f752f4792a 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); @@ -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]) 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