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 C8F81A0513; Fri, 8 Apr 2022 07:59:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21904427F1; Fri, 8 Apr 2022 07:59:19 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 978414003F for ; Fri, 8 Apr 2022 07:59:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649397556; x=1680933556; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=dTNehpnax13DOZ/3DtDt9rANbydwbAH5ufjInT2sV6U=; b=a93q1cadWASy0qZM5paIYIKwwzbSMWRSTbJI/A3JjHJMlejFrPepeqMd gry20mo/udWrNdnKN66D4yu+SbD5jKTRTwlEl2wsTXqm+sKxeP5tTFEfG oWgN5p9L2M9fQGrRLtI7617iIIqn0O8mKqXhcxEwPknw9GSQ27zkr5Lug 7llzLASJWBexBbWj1ct+rtf8wDUOlJv2GwqpBNBXz6XLzyFerfOx86/jZ TUu+HazY6VZBpT4uIfL0W7CDBMEA+tmrC7pyJESwFoOug9Vl+APvPQZCg 2pDLkctZChiigEMB1M2G9kvpIv4SKP3Takd4pX12ug6mPBVByRhjiC8+b w==; X-IronPort-AV: E=McAfee;i="6400,9594,10310"; a="241450384" X-IronPort-AV: E=Sophos;i="5.90,244,1643702400"; d="scan'208";a="241450384" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 22:59:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,244,1643702400"; d="scan'208";a="642773521" Received: from npg-wuwenjun-dpdk-01.sh.intel.com ([10.67.110.181]) by FMSMGA003.fm.intel.com with ESMTP; 07 Apr 2022 22:59:14 -0700 From: Wenjun Wu To: dev@dpdk.org, qi.z.zhang@intel.com, qiming.yang@intel.com Subject: [PATCH v6 02/10] net/ice/base: support priority configuration of the exact node Date: Fri, 8 Apr 2022 13:38:07 +0800 Message-Id: <20220408053815.850191-3-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220408053815.850191-1-wenjun1.wu@intel.com> References: <20220329014813.1092054-1-wenjun1.wu@intel.com> <20220408053815.850191-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