[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a214afa6-e9d7-4152-9b43-146cf7ce0076@intel.com>
Date: Fri, 9 May 2025 15:07:56 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Michal Kubiak <michal.kubiak@...el.com>
CC: <maciej.fijalkowski@...el.com>, <aleksander.lobakin@...el.com>,
<dawid.osuchowski@...ux.intel.com>, <jacob.e.keller@...el.com>,
<jbrandeburg@...udflare.com>, <netdev@...r.kernel.org>,
<intel-wired-lan@...ts.osuosl.org>
Subject: Re: [PATCH iwl-net v2 3/3] ice: fix rebuilding the Tx scheduler tree
for large queue counts
> +ice_sched_rm_vsi_subtree(struct ice_port_info *pi,
> + struct ice_sched_node *vsi_node, u8 owner, u8 tc)
> +{
> + u16 vsi_handle = vsi_node->vsi_handle;
> + bool all_vsi_nodes_removed = true;
> + int j = 0;
> +
> + while (vsi_node) {
> + struct ice_sched_node *next_vsi_node;
> +
> + if (ice_sched_is_leaf_node_present(vsi_node)) {
> + ice_debug(pi->hw, ICE_DBG_SCHED, "VSI has leaf nodes in TC %d\n", tc);
> + return -EBUSY;
> + }
> + while (j < vsi_node->num_children) {
> + if (vsi_node->children[j]->owner == owner) {
> + ice_free_sched_node(pi, vsi_node->children[j]);
> +
> + /* reset the counter again since the num
> + * children will be updated after node removal
> + */
> + j = 0;
I know this code is a copy-pasta, but it looks that there is no need to
reset the counter (whole array isn't reshuffled), just don't increase it
IOW, would be good to check if this line (and the semi-obvious and
half-wrong comment) could be removed.
you could keep my RB tag, thank you again for the series!
> + } else {
> + j++;
> + }
> + }
> +
> + next_vsi_node = ice_sched_find_next_vsi_node(vsi_node);
> +
> + /* remove the VSI if it has no children */
> + if (!vsi_node->num_children)
> + ice_free_sched_node(pi, vsi_node);
> + else
> + all_vsi_nodes_removed = false;
> +
> + vsi_node = next_vsi_node;
> + }
> +
> + /* clean up aggregator related VSI info if any */
> + if (all_vsi_nodes_removed)
> + ice_sched_rm_agg_vsi_info(pi, vsi_handle);
> +
> + return 0;
> +}
Powered by blists - more mailing lists