net/ice/base: modify recursive way of adding nodes
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 15 Dec 2020 04:33:53 +0000 (12:33 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:06 +0000 (16:03 +0100)
commit254f19c8c0616e8bf59a0d5cdfcd56cc2bfa69b3
tree4c0d41a97a092562e82efb3fc8c4213d7030a8d8
parent553be3ed18543fc7fe0beb3c62c5ec764c945eef
net/ice/base: 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>
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