1. Fixed the max children check when moving the last(8th) children. This
allows the parent node to hold 8 children instead of 7.
2. Check whether the VSI is already part of the given aggregator subtree
before moving it.
Fixes:
29a0c11489ef ("net/ice/base: clean code")
Cc: stable@dpdk.org
Signed-off-by: Victor Raj <victor.raj@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
return ICE_ERR_PARAM;
/* Does parent have enough space */
- if (parent->num_children + num_items >=
+ if (parent->num_children + num_items >
hw->max_children[parent->tx_sched_layer])
return ICE_ERR_AQ_FULL;
if (!vsi_node)
return ICE_ERR_DOES_NOT_EXIST;
+ /* Is this VSI already part of given aggregator? */
+ if (ice_sched_find_node_in_subtree(pi->hw, agg_node, vsi_node))
+ return ICE_SUCCESS;
+
aggl = ice_sched_get_agg_layer(pi->hw);
vsil = ice_sched_get_vsi_layer(pi->hw);