* [dpdk-stable] [PATCH 04/40] net/ice/base: fix issues around move nodes [not found] <20200907112826.48493-1-qi.z.zhang@intel.com> @ 2020-09-07 11:27 ` Qi Zhang [not found] ` <20200911131954.15999-1-qi.z.zhang@intel.com> 1 sibling, 0 replies; 2+ messages in thread From: Qi Zhang @ 2020-09-07 11:27 UTC (permalink / raw) To: qiming.yang; +Cc: dev, Qi Zhang, stable, Victor Raj 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> --- drivers/net/ice/base/ice_sched.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index cf9a6a777..edd90aecb 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -2267,7 +2267,7 @@ ice_sched_move_nodes(struct ice_port_info *pi, struct ice_sched_node *parent, 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; @@ -2335,6 +2335,10 @@ ice_sched_move_vsi_to_agg(struct ice_port_info *pi, u16 vsi_handle, u32 agg_id, 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); -- 2.13.6 ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <20200911131954.15999-1-qi.z.zhang@intel.com>]
* [dpdk-stable] [PATCH v2 04/40] net/ice/base: fix issues around move nodes [not found] ` <20200911131954.15999-1-qi.z.zhang@intel.com> @ 2020-09-11 13:19 ` Qi Zhang 0 siblings, 0 replies; 2+ messages in thread From: Qi Zhang @ 2020-09-11 13:19 UTC (permalink / raw) To: ferruh.yigit; +Cc: dev, Qi Zhang, stable, Victor Raj 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> --- drivers/net/ice/base/ice_sched.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index cf9a6a777..edd90aecb 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -2267,7 +2267,7 @@ ice_sched_move_nodes(struct ice_port_info *pi, struct ice_sched_node *parent, 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; @@ -2335,6 +2335,10 @@ ice_sched_move_vsi_to_agg(struct ice_port_info *pi, u16 vsi_handle, u32 agg_id, 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); -- 2.13.6 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-11 13:16 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20200907112826.48493-1-qi.z.zhang@intel.com> 2020-09-07 11:27 ` [dpdk-stable] [PATCH 04/40] net/ice/base: fix issues around move nodes Qi Zhang [not found] ` <20200911131954.15999-1-qi.z.zhang@intel.com> 2020-09-11 13:19 ` [dpdk-stable] [PATCH v2 " Qi Zhang
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).