Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp1088428lqs; Wed, 6 Mar 2024 06:08:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWHHXPJhldcmxkud0LeUhzkF07s2fhBK81+Sqvq3m6kEmAYjzcG0c7HjV5oZRHdaC7Ngr3Bn7gQQ6AtA01Zvy/sPlQ3s359+WBWMm/o8A== X-Google-Smtp-Source: AGHT+IEzfbH8bAWb+KoKVomf0Oh3FYW/lMeqgrAlkoGXngmXw1WFKje89Td4ezWp2KZPAcRQx36Z X-Received: by 2002:a17:906:714f:b0:a43:3b2:bcf6 with SMTP id z15-20020a170906714f00b00a4303b2bcf6mr10216479ejj.14.1709734107601; Wed, 06 Mar 2024 06:08:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709734107; cv=pass; d=google.com; s=arc-20160816; b=pppqY+p5YREhPaNbHJebQFlyQMI1BKU5eQRnVyo3OnxIPx+sUIrCvOhnF3UHooF8qc xX3NfOrUG00oUkPP4J9ycNUiPVm/sHYvNCwFOThDUeCiiA04AfPDB35ok6sAOBn4OT97 ypfWMF6nGDwqn2HetPDkbv3Tot1ELy8G8EvxskJXZ4Aaq14JeS8zNTlz7rzm0GYe1ahi dicLSQ3rFz8B1q2VIkgqS2nJ7nVVdxGJWHcS+2gvnSVX+iPrvo3zBnWHZSHYNirn/LTt Z6VMmMffPwcOwgvL6m1RNllkqgc9hoFZ5ljtDlsY/kPTLjJkDF1i7+QV5HLd5hJ5bx+b F1kw== 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=G1m+ep2Ze3tlU9synrUsEyZrILDX7jJvIqjhpRP+Sx4=; fh=Pq+Jh8vfsPzAaAzD+CrpO5rR/ezvMeEF/33Oob9TGpQ=; b=0kD1IiVSqmpCK8Z1MUiJnCpk71Lm7FAUJ3sckzog8tkUenzFXq5TA3PTQTAHZW9n10 9GXkSNsAw75f3y0zyjD9BANF2+cI9dvZAks7aALYf2oMVk6BDnstnPBHJrZwUFFFnqLZ cRFhUFFzAFwFOe34uPXrWFhCL+USvLE6gBEETJ7kwVdze9riTk9vf+O8P9oCBjuyqRIY /yqsmRsRGKcyHQbYYjm1/C26ez4BxS46oNzM4H+igwRvprToW9cOlxwy8qBsiV5/tjIS CFAWWFCioNnLilQPkb1pkwbAoKYRWtCuyLAXoBdMUZ+jCBNeV09+JFVf0VMuZ+u4Mbdf w03A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DPqne4kW; 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-2536-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2536-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g9-20020a1709063b0900b00a448f2a8117si4839152ejf.661.2024.03.06.06.08.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 06:08:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2536-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=DPqne4kW; 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-2536-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2536-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 5297A1F21C52 for ; Wed, 6 Mar 2024 14:08:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 618E7133401; Wed, 6 Mar 2024 14:07:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DPqne4kW" X-Original-To: linux-crypto@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 75C15131E27; Wed, 6 Mar 2024 14:07:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709734075; cv=none; b=UfOns+0ePVHdaqCpuRCeNL11GMmewaZF5Ot0JJYX/m6dA/pVNhKnNCqPW9E4NvfHl6QIN9Bt2GzIfRjR935HQQW9K45wuLzgu+kydfRx91mWu4dZAC7sKOfxw2/eQczrDb66QZAInRf6+HkPeEy62PSK+XfUQNAgo+u2RxpZvhY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709734075; c=relaxed/simple; bh=KHiFCrGFQg+WrReBqW+YMqU0GJq5r/0uJnWuBZ3jKCY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=fG1UdEbh87jZpsHDigcK/AtyQ3j1/KvgeQX+8eJdjndYNCo/tD5yMXorP/6KeK+rHAXgqAAuCA4FI4apPdSn+d/ZAMI/H5/MWymQKDGibHhFtgTbtFHmNba4Tc3+5/e3yn0jdk6GIAPBkJxa7PY+fF2CmkmXTkUJWN6SasczGuM= 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=DPqne4kW; arc=none smtp.client-ip=198.175.65.13 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=1709734074; x=1741270074; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=KHiFCrGFQg+WrReBqW+YMqU0GJq5r/0uJnWuBZ3jKCY=; b=DPqne4kW3EqVRSxyWo0CG58+dLgH0Rl0k76DAn9bC225iTT6u5/0dKs7 2iddqmdA1W5h0kJ9R7D8GcimeL4q3+H6CoQxfAwPEViNwsBYyprgDJEZz TCbsa3m+iluZWVTXtHHXmyLrm8+Q10ZP5lduj3Bg+wDq155y8UvU47FHV jUdWPlb7OSIy2q82zpnUjE2O8m1K9sKXwfqOwvi+xpRY9DwN74MPlKmAY ATA/Iljk2e21SrhcuwCr7hqgvGJS0kuTW+8V3nZbJYuzNeB/LYCsnYe7G Tm+UCnv2FRZlqlODWnuNZG+5M8IVeXA5OZ8yaAnm+Gul0oFvFB4zYQMLU w==; X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="15490378" X-IronPort-AV: E=Sophos;i="6.06,208,1705392000"; d="scan'208";a="15490378" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2024 06:07:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,208,1705392000"; d="scan'208";a="10192174" Received: from qat-server-archercity1.sh.intel.com ([10.67.111.115]) by orviesa007.jf.intel.com with ESMTP; 06 Mar 2024 06:07:50 -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 v5 05/10] crypto: qat - rename get_sla_arr_of_type() Date: Wed, 6 Mar 2024 21:58:50 +0800 Message-Id: <20240306135855.4123535-6-xin.zeng@intel.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240306135855.4123535-1-xin.zeng@intel.com> References: <20240306135855.4123535-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 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