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 C6BD9A0503; Thu, 28 Apr 2022 05:21:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BB354280A; Thu, 28 Apr 2022 05:21:31 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 011AC427FD for ; Thu, 28 Apr 2022 05:21:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651116088; x=1682652088; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=uum2pRlzio5gsVpOhps/eoKTw3EdL0ghijuFA1MBGM4=; b=gH8jMO9yoCTs0CfIMVmWhax1ao9Uow2pk6W3jsFMnxVvLOLZ8uruIHw4 WwEUqSqy4SlhCUHwilEajAe0gzRknhQmNB3zLkevomTts1U6XPOXnrdH4 Fh6bBsORcMKh1sjw2jULBnToLAKqH3D8szSaJAP5DeGjU2anjzm0LIdia SZAEYx1ed4Dy+IxYLwupVDIJta7ryC5QhQM5dnuZySZZyEx6gjFF6PmOt LwY72jOg8Du2rBlWGVzuLxZsT+McaiMXbBLCl5Qcs777QfWEebtMI5Yh1 tDR7Ahj/ELuOnRFrrtHVOFA8W5HSCe+Zku9rdsbTia4MtIMFrSH0+GmPq Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10330"; a="253526050" X-IronPort-AV: E=Sophos;i="5.90,295,1643702400"; d="scan'208";a="253526050" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2022 20:21:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,295,1643702400"; d="scan'208";a="661534574" Received: from npg-wuwenjun-dpdk-01.sh.intel.com ([10.67.110.181]) by fmsmga002.fm.intel.com with ESMTP; 27 Apr 2022 20:21:26 -0700 From: Wenjun Wu To: dev@dpdk.org, qiming.yang@intel.com, qi.z.zhang@intel.com Subject: [PATCH v8 6/9] net/ice: support queue priority configuration Date: Thu, 28 Apr 2022 10:59:11 +0800 Message-Id: <20220428025914.3475281-7-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220428025914.3475281-1-wenjun1.wu@intel.com> References: <20220329014813.1092054-1-wenjun1.wu@intel.com> <20220428025914.3475281-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 priority configuration support. The highest priority is 0, and the lowest priority is 7. Signed-off-by: Wenjun Wu --- drivers/net/ice/ice_tm.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_tm.c b/drivers/net/ice/ice_tm.c index d70d077286..91e420d653 100644 --- a/drivers/net/ice/ice_tm.c +++ b/drivers/net/ice/ice_tm.c @@ -147,9 +147,9 @@ ice_node_param_check(struct ice_pf *pf, uint32_t node_id, return -EINVAL; } - if (priority) { + if (priority >= 8) { error->type = RTE_TM_ERROR_TYPE_NODE_PRIORITY; - error->message = "priority should be 0"; + error->message = "priority should be less than 8"; return -EINVAL; } @@ -684,6 +684,7 @@ static int ice_hierarchy_commit(struct rte_eth_dev *dev, struct ice_vsi *vsi; int ret_val = ICE_SUCCESS; uint64_t peak = 0; + uint8_t priority; uint32_t i; uint32_t idx_vsi_child; uint32_t idx_qg; @@ -779,6 +780,7 @@ static int ice_hierarchy_commit(struct rte_eth_dev *dev, qid = tm_node->id; txq = dev->data->tx_queues[qid]; vsi = txq->vsi; + q_teid = txq->q_teid; if (tm_node->shaper_profile) { /* Transfer from Byte per seconds to Kbps */ peak = tm_node->shaper_profile->profile.peak.rate; @@ -794,6 +796,14 @@ static int ice_hierarchy_commit(struct rte_eth_dev *dev, goto fail_clear; } } + priority = 7 - tm_node->priority; + ret_val = ice_cfg_vsi_q_priority(hw->port_info, 1, + &q_teid, &priority); + if (ret_val) { + error->type = RTE_TM_ERROR_TYPE_NODE_PRIORITY; + PMD_DRV_LOG(ERR, "configure queue %u priority failed", tm_node->priority); + goto fail_clear; + } } return ret_val; -- 2.25.1