aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_sched.c
diff options
context:
space:
mode:
authorVictor Raj <[email protected]>2019-02-08 20:50:30 +0000
committerJeff Kirsher <[email protected]>2019-02-25 16:56:01 +0000
commit0e8fd74df2f37e2dcc305ed22f4feb8587b91929 (patch)
tree92b30e30f797377fe205617de5db2d8e47f2043c /drivers/net/ethernet/intel/ice/ice_sched.c
parentice: Fix the calculation of ICE_MAX_MTU (diff)
downloadkernel-0e8fd74df2f37e2dcc305ed22f4feb8587b91929.tar.gz
kernel-0e8fd74df2f37e2dcc305ed22f4feb8587b91929.zip
ice: Fix added in VSI supported nodes calc
VSI supported nodes are calculated in order to add the VSI parent or intermediate nodes to the scheduler tree. If one of the node in below layers (from VSI layer) has space to add the new VSI or intermediate node above that layer then it's not required to continue the calculation further for below layers. Signed-off-by: Victor Raj <[email protected]> Reviewed-by: Bruce Allan <[email protected]> Signed-off-by: Anirudh Venkataramanan <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_sched.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_sched.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_sched.c b/drivers/net/ethernet/intel/ice/ice_sched.c
index fb38e8be1e2e..81fb7d19c0fd 100644
--- a/drivers/net/ethernet/intel/ice/ice_sched.c
+++ b/drivers/net/ethernet/intel/ice/ice_sched.c
@@ -1344,9 +1344,14 @@ ice_sched_calc_vsi_support_nodes(struct ice_hw *hw,
node = node->sibling;
}
+ /* tree has one intermediate node to add this new VSI.
+ * So no need to calculate supported nodes for below
+ * layers.
+ */
+ if (node)
+ break;
/* all the nodes are full, allocate a new one */
- if (!node)
- num_nodes[i]++;
+ num_nodes[i]++;
}
}