mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
pkt_sched: gen_estimator: Optimize gen_estimator_active()
Since all other gen_estimator functions use bstats and rate_est params together, and searching for them is optimized now, let's use this also in gen_estimator_active(). The return type of gen_estimator_active() is changed to bool, and gen_find_node() parameters to const, btw. In tcf_act_police_locate() a check for ACT_P_CREATED is added before calling gen_estimator_active(). Signed-off-by: Jarek Poplawski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
3d4cd60ed0
commit
244e6c2d07
3 changed files with 13 additions and 20 deletions
|
|
@ -183,7 +183,9 @@ override:
|
|||
if (R_tab == NULL)
|
||||
goto failure;
|
||||
|
||||
if (!est && !gen_estimator_active(&police->tcf_rate_est)) {
|
||||
if (!est && (ret == ACT_P_CREATED ||
|
||||
!gen_estimator_active(&police->tcf_bstats,
|
||||
&police->tcf_rate_est))) {
|
||||
err = -EINVAL;
|
||||
goto failure;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue