From: Wenzhuo Lu <wenzhuo.lu@intel.com>
To: dev@dpdk.org
Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>
Subject: [dpdk-dev] [PATCH 2/6] net/i40e: fix TM level capability getting
Date: Fri, 13 Oct 2017 10:58:04 +0800 [thread overview]
Message-ID: <1507863488-41191-3-git-send-email-wenzhuo.lu@intel.com> (raw)
In-Reply-To: <1507863488-41191-1-git-send-email-wenzhuo.lu@intel.com>
Only queue nodes should be taken as leaf nodes, all
the other nodes are non-leaf nodes.
Correct it when getting the TM level capability.
Fixes: 0fb1ef1e7930 ("net/i40e: support getting TM level capability")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/i40e/i40e_tm.c | 41 +++++++++++++++++++++++------------------
1 file changed, 23 insertions(+), 18 deletions(-)
diff --git a/drivers/net/i40e/i40e_tm.c b/drivers/net/i40e/i40e_tm.c
index fe99215..d46a972 100644
--- a/drivers/net/i40e/i40e_tm.c
+++ b/drivers/net/i40e/i40e_tm.c
@@ -755,15 +755,34 @@ static int i40e_hierarchy_commit(struct rte_eth_dev *dev,
cap->n_nodes_max = 1;
cap->n_nodes_nonleaf_max = 1;
cap->n_nodes_leaf_max = 0;
- cap->non_leaf_nodes_identical = true;
- cap->leaf_nodes_identical = true;
+ } else if (level_id == I40E_TM_NODE_TYPE_TC) {
+ /* TC */
+ cap->n_nodes_max = I40E_MAX_TRAFFIC_CLASS;
+ cap->n_nodes_nonleaf_max = I40E_MAX_TRAFFIC_CLASS;
+ cap->n_nodes_leaf_max = 0;
+ } else {
+ /* queue */
+ cap->n_nodes_max = hw->func_caps.num_tx_qp;
+ cap->n_nodes_nonleaf_max = 0;
+ cap->n_nodes_leaf_max = hw->func_caps.num_tx_qp;
+ }
+
+ cap->non_leaf_nodes_identical = true;
+ cap->leaf_nodes_identical = true;
+
+ if (level_id != I40E_TM_NODE_TYPE_QUEUE) {
cap->nonleaf.shaper_private_supported = true;
cap->nonleaf.shaper_private_dual_rate_supported = false;
cap->nonleaf.shaper_private_rate_min = 0;
/* 40Gbps -> 5GBps */
cap->nonleaf.shaper_private_rate_max = 5000000000ull;
cap->nonleaf.shaper_shared_n_max = 0;
- cap->nonleaf.sched_n_children_max = I40E_MAX_TRAFFIC_CLASS;
+ if (level_id == I40E_TM_NODE_TYPE_PORT)
+ cap->nonleaf.sched_n_children_max =
+ I40E_MAX_TRAFFIC_CLASS;
+ else
+ cap->nonleaf.sched_n_children_max =
+ hw->func_caps.num_tx_qp;
cap->nonleaf.sched_sp_n_priorities_max = 1;
cap->nonleaf.sched_wfq_n_children_per_group_max = 0;
cap->nonleaf.sched_wfq_n_groups_max = 0;
@@ -773,21 +792,7 @@ static int i40e_hierarchy_commit(struct rte_eth_dev *dev,
return 0;
}
- /* TC or queue node */
- if (level_id == I40E_TM_NODE_TYPE_TC) {
- /* TC */
- cap->n_nodes_max = I40E_MAX_TRAFFIC_CLASS;
- cap->n_nodes_nonleaf_max = I40E_MAX_TRAFFIC_CLASS;
- cap->n_nodes_leaf_max = 0;
- cap->non_leaf_nodes_identical = true;
- } else {
- /* queue */
- cap->n_nodes_max = hw->func_caps.num_tx_qp;
- cap->n_nodes_nonleaf_max = 0;
- cap->n_nodes_leaf_max = hw->func_caps.num_tx_qp;
- cap->non_leaf_nodes_identical = true;
- }
- cap->leaf_nodes_identical = true;
+ /* queue node */
cap->leaf.shaper_private_supported = true;
cap->leaf.shaper_private_dual_rate_supported = false;
cap->leaf.shaper_private_rate_min = 0;
--
1.9.3
next prev parent reply other threads:[~2017-10-13 2:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-13 2:58 [dpdk-dev] [PATCH 0/6] fix TM (Traffic Management) issues on i40e and ixgbe Wenzhuo Lu
2017-10-13 2:58 ` [dpdk-dev] [PATCH 1/6] net/i40e: fix TM node parameter checking Wenzhuo Lu
2017-10-13 2:58 ` Wenzhuo Lu [this message]
2017-10-13 2:58 ` [dpdk-dev] [PATCH 3/6] net/ixgbe: " Wenzhuo Lu
2017-10-13 2:58 ` [dpdk-dev] [PATCH 4/6] net/ixgbe: fix TM level capability getting Wenzhuo Lu
2017-10-13 2:58 ` [dpdk-dev] [PATCH 5/6] net/i40e: fix not supporting NULL TM profile Wenzhuo Lu
2017-10-13 2:58 ` [dpdk-dev] [PATCH 6/6] net/ixgbe: " Wenzhuo Lu
2017-10-17 5:50 ` [dpdk-dev] [PATCH v2 0/7] fix TM (Traffic Management) issues on i40e and ixgbe Wenzhuo Lu
2017-10-17 5:50 ` [dpdk-dev] [PATCH v2 1/7] net/i40e: fix TM node parameter checking Wenzhuo Lu
2017-10-17 5:50 ` [dpdk-dev] [PATCH v2 2/7] net/i40e: fix TM level capability getting Wenzhuo Lu
2017-10-17 5:50 ` [dpdk-dev] [PATCH v2 3/7] net/ixgbe: fix TM node parameter checking Wenzhuo Lu
2017-10-17 5:50 ` [dpdk-dev] [PATCH v2 4/7] net/ixgbe: fix TM level capability getting Wenzhuo Lu
2017-10-17 5:50 ` [dpdk-dev] [PATCH v2 5/7] net/i40e: fix not supporting NULL TM profile Wenzhuo Lu
2017-10-17 5:50 ` [dpdk-dev] [PATCH v2 6/7] net/ixgbe: " Wenzhuo Lu
2017-10-17 5:50 ` [dpdk-dev] [PATCH v2 7/7] net/i40e: fix wrong parent when adding TM node Wenzhuo Lu
2017-10-20 14:18 ` [dpdk-dev] [PATCH v2 0/7] fix TM (Traffic Management) issues on i40e and ixgbe Dumitrescu, Cristian
2017-10-23 17:02 ` Ferruh Yigit
2017-10-20 14:17 ` [dpdk-dev] [PATCH 0/6] " Dumitrescu, Cristian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1507863488-41191-3-git-send-email-wenzhuo.lu@intel.com \
--to=wenzhuo.lu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).