Merge pull request #60 from freysteinn/traffic-pacing-edt-fix

traffic-pacing-edt: Fixed an operator precedence issue in codel_impl.h

This bug caused to CoDel control law to always stay at the initial 100 ms drop interval.
After this fix the control law behaves correctly, by becoming more aggressive (smaller next drop intervals)
in accordance with the inverse square root (that TCP traffic responds to).
This commit is contained in:
Jesper Dangaard Brouer
2022-11-07 13:00:50 +00:00
committed by GitHub

View File

@ -69,7 +69,7 @@ static __always_inline __u32 get_sqrt_sh16(__u64 cnt)
static __always_inline __u64 get_next_interval_sqrt(__u64 cnt)
{
__u64 val = (__u64)CODEL_EXCEED_INTERVAL << 16 / get_sqrt_sh16(cnt);
__u64 val = ((__u64)CODEL_EXCEED_INTERVAL << 16) / get_sqrt_sh16(cnt);
return val;
}