ice: Modify recursive way of adding nodes
authorVictor Raj <victor.raj@intel.com>
Thu, 25 Mar 2021 22:35:05 +0000 (15:35 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 8 Apr 2021 00:09:15 +0000 (17:09 -0700)
commit7fb09a737536fc7bff75c7018133acb30328ca07
treebc2c8d65011d23f43aabec1d334a9cf878f3d445
parent3056df93f7a83f456d20536c92260db0b1290ef5
ice: Modify recursive way of adding nodes

Remove the recursive way of adding the nodes to the layer in order
to reduce the stack usage. Instead the algorithm is modified to use
a while loop.

The previous code was scanning recursively the nodes horizontally.
The total stack consumption will be based on number of nodes present
on that layer. In some cases it can consume more stack.

Signed-off-by: Victor Raj <victor.raj@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_sched.c