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 9BFB8A0032; Tue, 29 Mar 2022 12:01:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 50490428BA; Tue, 29 Mar 2022 12:01:23 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 2C38542818 for ; Tue, 29 Mar 2022 12:01:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648548081; x=1680084081; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=dTNehpnax13DOZ/3DtDt9rANbydwbAH5ufjInT2sV6U=; b=UaUs10DPjv8ix4McitZ03N+x/sFlJ/A27yutuUzyMJi9xmUF/tkhnfqm R3JhPWKOjTtjbCZWvA29GwbMIn+1EqeYVZqGWFK0vSqwYNTu4LwpElt9b ySnep46lRmBYW5wA2Bfe7/4sK2+GgFG+9rYSrpOvpXuslFTZNQMTGfsPH 33tDE4eosfll4esed+AyGyS5zjJ32a0k6ar+bIC4nYVqDhF+EwaWolc5t SBNT2AmBeroy8QVbaO18HpMcundKiNp579F6Vv5x8FksU2ptNObr6rOFf J0dReu9Z4zgaUBOD6rzQl+dwwRyF3pOJEXX4a30+bcDq15q59AgrXA/pu Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10300"; a="246701844" X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="246701844" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 03:01:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="546325873" Received: from npg-wuwenjun-dpdk-01.sh.intel.com ([10.67.110.181]) by orsmga007.jf.intel.com with ESMTP; 29 Mar 2022 03:01:18 -0700 From: Wenjun Wu To: dev@dpdk.org, qiming.yang@intel.com, qi.z.zhang@intel.com Subject: [PATCH v5 2/9] net/ice/base: support priority configuration of the exact node Date: Tue, 29 Mar 2022 17:38:45 +0800 Message-Id: <20220329093852.1360767-3-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220329093852.1360767-1-wenjun1.wu@intel.com> References: <20220329045612.1262025-1-wenjun1.wu@intel.com> <20220329093852.1360767-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