mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
tc: policing requires a rate estimator
Found that while trying average rate policing, it was possible to request average rate policing without a rate estimator. This results in no policing which is harmless but incorrect. Since policing could be setup in two steps, need to check in the kernel. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
71bcb09a57
commit
c1b56878fb
3 changed files with 34 additions and 3 deletions
|
|
@ -182,6 +182,12 @@ override:
|
|||
R_tab = qdisc_get_rtab(&parm->rate, tb[TCA_POLICE_RATE]);
|
||||
if (R_tab == NULL)
|
||||
goto failure;
|
||||
|
||||
if (!est && !gen_estimator_active(&police->tcf_rate_est)) {
|
||||
err = -EINVAL;
|
||||
goto failure;
|
||||
}
|
||||
|
||||
if (parm->peakrate.rate) {
|
||||
P_tab = qdisc_get_rtab(&parm->peakrate,
|
||||
tb[TCA_POLICE_PEAKRATE]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue