Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2448642rdb; Wed, 21 Feb 2024 08:01:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXF1DOe6eEcyIlwY3s6c0VOVKeHddpUB7rOJMkasMFCt0Oakd5aU2obXhXlPIfjpn04y5FoiNEIWzT/4tnEc8pR1IeIIy/QYZ0e7vtwPg== X-Google-Smtp-Source: AGHT+IETlVCc2g1dBx4qPbUnsctTb94J+cDrXglqSKqEMY+Pj1BKHfTGmgH2zESIoVJ4IQBOC2dE X-Received: by 2002:a0c:aa19:0:b0:68f:2b1a:c8de with SMTP id d25-20020a0caa19000000b0068f2b1ac8demr17534839qvb.24.1708531300140; Wed, 21 Feb 2024 08:01:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708531300; cv=pass; d=google.com; s=arc-20160816; b=MJW32L0gNS4Oyiv0/jcKNzRO4jK6JfMwuQ0jYmTEs7ABMLXXfZIe7cpq15jmyiM0MQ 400SFf0dGO3pNNDKaVgLT432OWcI8xL+Ke5IQZXANRL8uyRXwZaNsbaQEWPPatWcO4TK 654PjCNzZdg6h02vEVWy0NjcmAmTsavc+spQK0FnILhJkBG5usW5qU9w0ufFqzFq7kc1 75umJHqcd5B7AWj3YE6QksKCsA5lMGxhd7KBnc6f1/lT9A606FBRFVvYBXMJJa8ohKpI kVIEJhoGsMkDTYcJK8MQSd3VXB/6Silv8lX1HRINeccYqtPYZ4+OT9PRJJhSEtpJ6wJ8 Uiyw== 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=kMFLQX+gcJLCohstkG85+ZoT0SZ1uRn8vcGcmui94hX3gbl4GLBq1X2r+x5OcZ+hvk rGxXcpDrdlcR+3aCIOdjvR+kAjA2+T6hDOobBlbjKcg5fepYyv86tXfFuTVa/08UQbO2 vCmJlGpJpd+z/F5/6TFSkF+tgWV2TsBYmUMzZF6ySNxvS9I84hFsLQY1Z6RttPQwHgNr Z8/1ZOaVgPriKmCO+nS82NNkSv5ylslVRtuzjG4eOL03Sn3ZSf0BrAHUul39/a0hnUaY 9ea5xxoXUOx/TArS0+QfmnyA6vQZ9WJEZSFlSQLj4DSCovuBV+qD08w87n7uoozKtYMQ Jmyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NInAWi0b; 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-2223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2223-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o2-20020ad45c82000000b0068caf6856eesi11814723qvh.205.2024.02.21.08.01.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 08:01:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NInAWi0b; 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-2223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2223-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E2C1F1C21707 for ; Wed, 21 Feb 2024 16:01:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4014D81ABE; Wed, 21 Feb 2024 15:59:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NInAWi0b" X-Original-To: linux-crypto@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 026BD82D88; Wed, 21 Feb 2024 15:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708531165; cv=none; b=EBqynLhWyb9MThOo8xrlnKYTZ2Hb3UtFK85bqDDR7UIbNO1JOho9GCk5p4K0TsETqeMgHW3deoOqL+1xF/0e9clpfzUT5yivh6+xe13HCl4HgeOJWWQGLGoxY0B4iOAYzsba7qOkIjLPWMglA0MKRWBUSAK64yUTO5/Apr2d+8Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708531165; c=relaxed/simple; bh=AHf7nRY3vfpNNK+tkeq80dZDoVsayvhUuKbnKLUDsK4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=YNt9bg61hY5X6dYM8Ixivltv6pr0RGmm6oLgXIdeqTh92SqW1rrmCTeJLK3lKQNRlgPCQy7mC3+VfbAjtUyBupcLRtLXuBN3Ufm+S/MzjyEdb678LnCRROZLYmmVh+dUbI36TVaFzu17G6xBxXBo8AsfuOSBMZIW8Pmqjw2fPco= 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=NInAWi0b; arc=none smtp.client-ip=192.198.163.19 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=1708531163; x=1740067163; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=AHf7nRY3vfpNNK+tkeq80dZDoVsayvhUuKbnKLUDsK4=; b=NInAWi0bwKR1z+M2G8T2QFUZ3dlpXzBddesjn+aabRV68x2rc0M01Smk zjTBQ2Ws71QbjLCSgbrUqvVtRiPi9GpcVqjBOZzk18eXh1ZWwoWfU266B Axtf8UXBO1myRAUl3RJF1QfojYNpTlGKDNwt+UauB6QylTUP36dXtbQik rClEtNS1h2JjXbagmcu5JsKtiUkr0tRAILYqxs07qpd24DAOJ5zWiwJ19 bEwkDwFJfhwwkhNoObObUfBwELgQ4rUHWxUNk/RTo/n3muIsVOI4rl6hy V/O65+HIBWQ6zXynPMjG3PZG5fLZ7UIMs5+7jYT4jRRIyDYaKKxxNz/M0 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10991"; a="2568825" X-IronPort-AV: E=Sophos;i="6.06,175,1705392000"; d="scan'208";a="2568825" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2024 07:58:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,175,1705392000"; d="scan'208";a="9760898" Received: from qat-server-archercity1.sh.intel.com ([10.67.111.115]) by fmviesa004.fm.intel.com with ESMTP; 21 Feb 2024 07:58:55 -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 v3 05/10] crypto: qat - rename get_sla_arr_of_type() Date: Wed, 21 Feb 2024 23:50:03 +0800 Message-Id: <20240221155008.960369-6-xin.zeng@intel.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240221155008.960369-1-xin.zeng@intel.com> References: <20240221155008.960369-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