提交 d1c33d02 编写于 作者: D Dmitry Kozlov

shaper: fixed bug in class id allocation procedure

this is related only for htb
上级 e3fc927e
......@@ -121,7 +121,7 @@ static int alloc_idx(int init)
pthread_rwlock_wrlock(&shaper_lock);
if (idx_map[init / __BITS_PER_LONG] & (1 << (init % __BITS_PER_LONG))) {
i = init / __BITS_PER_LONG;
p = init % __BITS_PER_LONG;
p = (init % __BITS_PER_LONG) + 1;
} else {
for (i = init / __BITS_PER_LONG; i < MAX_IDX / __BITS_PER_LONG; i++) {
p = ffs(idx_map[i]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册