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 F0F2AA0513; Fri, 8 Apr 2022 07:59:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CE444286C; Fri, 8 Apr 2022 07:59:27 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 8F22D42803 for ; Fri, 8 Apr 2022 07:59:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649397563; x=1680933563; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=6OLUIV174at4F4njhX0qaYOMqYxbof2gefBbfythGek=; b=APhwm1kUhFXU/CIljKz4lmRvRbieSHQPc2sGdYulUfDopQzw9TJjpOF1 AWeZfkLBs1E+bX7c2VyaSrnqiZXNdY9x0DEeJi50u2KVr8ngaURZdLRRP I0roVaJxB57JGtBQf/I3vV7MfJIAIS/DBy9Idx152xcGRTnW+A+r6KB75 ldIIOSgoSKx19nU6k0MC6Bnd5SyOXc9AEzRZfJwkYprLCv+W8z7G8b6Qd gP8yNcV7rP34KLtGxvl/bpI66qh9GreMwLeh5nKf/b7Baaniu17PrNnfh 135V2rnPDkTckB3ij6c1bag4RkgmPbij7TARxLi807IhYmNlyWB+bOsd+ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10310"; a="241450491" X-IronPort-AV: E=Sophos;i="5.90,244,1643702400"; d="scan'208";a="241450491" 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:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,244,1643702400"; d="scan'208";a="642773613" 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:22 -0700 From: Wenjun Wu To: dev@dpdk.org, qi.z.zhang@intel.com, qiming.yang@intel.com Subject: [PATCH v6 07/10] net/ice: support queue weight configuration Date: Fri, 8 Apr 2022 13:38:12 +0800 Message-Id: <20220408053815.850191-8-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 queue weight configuration support. Signed-off-by: Wenjun Wu --- drivers/net/ice/ice_tm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_tm.c b/drivers/net/ice/ice_tm.c index 91e420d653..4d7bb9102c 100644 --- a/drivers/net/ice/ice_tm.c +++ b/drivers/net/ice/ice_tm.c @@ -153,9 +153,9 @@ ice_node_param_check(struct ice_pf *pf, uint32_t node_id, return -EINVAL; } - if (weight != 1) { + if (weight > 200 || weight < 1) { error->type = RTE_TM_ERROR_TYPE_NODE_WEIGHT; - error->message = "weight must be 1"; + error->message = "weight must be between 1 and 200"; return -EINVAL; } @@ -804,6 +804,15 @@ static int ice_hierarchy_commit(struct rte_eth_dev *dev, PMD_DRV_LOG(ERR, "configure queue %u priority failed", tm_node->priority); goto fail_clear; } + + ret_val = ice_cfg_q_bw_alloc(hw->port_info, vsi->idx, + tm_node->tc, tm_node->id, + ICE_MAX_BW, (u32)tm_node->weight); + if (ret_val) { + error->type = RTE_TM_ERROR_TYPE_NODE_WEIGHT; + PMD_DRV_LOG(ERR, "configure queue %u weight failed", tm_node->weight); + goto fail_clear; + } } return ret_val; -- 2.25.1