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 446D7A00BE; Tue, 17 May 2022 07:33:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95D1A42B77; Tue, 17 May 2022 07:32:52 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id D138142823 for ; Tue, 17 May 2022 07:32:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652765569; x=1684301569; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=ktOj2bbb+GPsPVYYlUyLtrIxuLdSm+53i17qdYeA7VE=; b=gHC+IGf18RD2WNgDlEeIa6Kp3phei8aZbxOWuITJOy6bUv+/1Sp6fo0z gBluhsgxVcHwFO6luHOI+vtb7zuLKM58wJ7+wkzF/tzYfIbC16LO/J2iZ tTMDbqnvL3zUSit+MBp806Lbg13rpNzc5mBDnFrLTadQkwmVo/M/3BgDR x3qr4ToQefcAVE/blr8HKWNakh6gg9ySst2c4nib046XSyIJr310sFW1q aAWJbdTaCqAB4m/LKgIMQoSiy/VRvyHkX/Sdo2m+cxll61CcQk2WGObKC Bs4dbVRSuKFmOcLkUU+/WKpM7ZK90k+xvxRGaWtH+FKiS4okguspo81p4 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10349"; a="268645171" X-IronPort-AV: E=Sophos;i="5.91,231,1647327600"; d="scan'208";a="268645171" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2022 22:32:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,231,1647327600"; d="scan'208";a="596934772" Received: from npg-wuwenjun-dpdk-01.sh.intel.com ([10.67.110.181]) by orsmga008.jf.intel.com with ESMTP; 16 May 2022 22:32:47 -0700 From: Wenjun Wu To: dev@dpdk.org, qiming.yang@intel.com, qi.z.zhang@intel.com Subject: [PATCH v11 3/7] net/ice/base: support priority configuration of the exact node Date: Tue, 17 May 2022 13:09:28 +0800 Message-Id: <20220517050932.4078968-4-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220517050932.4078968-1-wenjun1.wu@intel.com> References: <20220329014813.1092054-1-wenjun1.wu@intel.com> <20220517050932.4078968-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 | 22 ++++++++++++++++++++++ drivers/net/ice/base/ice_sched.h | 3 +++ 2 files changed, 25 insertions(+) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index 4ca15bf8f8..1b060d3567 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -3613,6 +3613,28 @@ ice_cfg_vsi_q_priority(struct ice_port_info *pi, u16 num_qs, u32 *q_ids, return status; } +/** + * ice_sched_cfg_sibl_node_prio_lock - 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_sched_cfg_sibl_node_prio_lock(struct ice_port_info *pi, + struct ice_sched_node *node, + u8 priority) +{ + enum ice_status status; + + 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_sched_save_q_bw_alloc - save queue node's BW allocation information * @q_ctx: queue context structure diff --git a/drivers/net/ice/base/ice_sched.h b/drivers/net/ice/base/ice_sched.h index 184ad09e6a..c9f3f79eff 100644 --- a/drivers/net/ice/base/ice_sched.h +++ b/drivers/net/ice/base/ice_sched.h @@ -169,6 +169,9 @@ enum ice_status ice_cfg_agg_bw_no_shared_lmt_per_tc(struct ice_port_info *pi, u32 agg_id, u8 tc); enum ice_status +ice_sched_cfg_sibl_node_prio_lock(struct ice_port_info *pi, + struct ice_sched_node *node, u8 priority); +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 -- 2.25.1