From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A1A8A0093; Fri, 22 Apr 2022 03:19:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA35E427F6; Fri, 22 Apr 2022 03:19:36 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 236844067C for ; Fri, 22 Apr 2022 03:19:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650590375; x=1682126375; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=dTNehpnax13DOZ/3DtDt9rANbydwbAH5ufjInT2sV6U=; b=O35rJPB7/1NihjD6cZKW7FvQlWKcMyyNlruGPuhXRkT/iqltLjeLcGIU p88RVC2XZzNR/fi8IipTIjUWEsH0gdGgf8BBHnIleGRg/5u47L9P7PYhH llAVu8oPZFc53Rjj2F2/C4CJiFnF7oyH3ZEb6nGciHw52CUBx4+dPRHq7 HikCkkKeAnqTci3Mnv5Um84/FIOyWzqKBpWrtP+OiXfXQxeQtxeR1dTh3 cPtuJvarTuaq5UVxfrKAmEFXfDmlasfDLfBzKXgDRK6c2xBfq7U0MHnui Izv7f3/eZ91QUm4r9Ro1KurO9zjtKpBEstPoS+PwEVbUhw+kmrXPv/ifZ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="350972709" X-IronPort-AV: E=Sophos;i="5.90,280,1643702400"; d="scan'208";a="350972709" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2022 18:19:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,280,1643702400"; d="scan'208";a="533816244" Received: from npg-wuwenjun-dpdk-01.sh.intel.com ([10.67.110.181]) by orsmga002.jf.intel.com with ESMTP; 21 Apr 2022 18:19:33 -0700 From: Wenjun Wu To: dev@dpdk.org, qiming.yang@intel.com, qi.z.zhang@intel.com Subject: [PATCH v7 2/9] net/ice/base: support priority configuration of the exact node Date: Fri, 22 Apr 2022 08:57:39 +0800 Message-Id: <20220422005746.2300736-3-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220422005746.2300736-1-wenjun1.wu@intel.com> References: <20220329014813.1092054-1-wenjun1.wu@intel.com> <20220422005746.2300736-1-wenjun1.wu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch adds priority configuration support of the exact node in the scheduler tree. This function does not need additional calls to the scheduler lock. Signed-off-by: Wenjun Wu --- drivers/net/ice/base/ice_sched.c | 21 +++++++++++++++++++++ drivers/net/ice/base/ice_sched.h | 3 +++ 2 files changed, 24 insertions(+) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index e697c579be..c0f90b762b 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -3613,6 +3613,27 @@ ice_cfg_vsi_q_priority(struct ice_port_info *pi, u16 num_qs, u32 *q_ids, return status; } +/** + * ice_cfg_node_priority - config priority of node + * @pi: port information structure + * @node: sched node to configure + * @priority: sibling priority + * + * This function configures node element's sibling priority only. + */ +enum ice_status +ice_cfg_node_priority(struct ice_port_info *pi, struct ice_sched_node *node, + u8 priority) +{ + enum ice_status status = ICE_ERR_PARAM; + + ice_acquire_lock(&pi->sched_lock); + status = ice_sched_cfg_sibl_node_prio(pi, node, priority); + ice_release_lock(&pi->sched_lock); + + return status; +} + /** * ice_cfg_agg_vsi_priority_per_tc - config aggregator's VSI priority per TC * @pi: port information structure diff --git a/drivers/net/ice/base/ice_sched.h b/drivers/net/ice/base/ice_sched.h index 1441b5f191..e1dc6e18a4 100644 --- a/drivers/net/ice/base/ice_sched.h +++ b/drivers/net/ice/base/ice_sched.h @@ -172,6 +172,9 @@ enum ice_status ice_cfg_vsi_q_priority(struct ice_port_info *pi, u16 num_qs, u32 *q_ids, u8 *q_prio); enum ice_status +ice_cfg_node_priority(struct ice_port_info *pi, + struct ice_sched_node *node, u8 priority); +enum ice_status ice_cfg_vsi_bw_alloc(struct ice_port_info *pi, u16 vsi_handle, u8 ena_tcmap, enum ice_rl_type rl_type, u8 *bw_alloc); enum ice_status -- 2.25.1