struct nlattr *tb[TCA_HTB_MAX + 1];
struct tc_htb_opt *hopt;
u64 rate64, ceil64;
+ int warn = 0;
/* extract all subattrs from opt attr */
if (!opt)
cl->quantum = min_t(u64, quantum, INT_MAX);
if (!hopt->quantum && cl->quantum < 1000) {
- pr_warn("HTB: quantum of class %X is small. Consider r2q change.\n",
- cl->common.classid);
+ warn = -1;
cl->quantum = 1000;
}
if (!hopt->quantum && cl->quantum > 200000) {
- pr_warn("HTB: quantum of class %X is big. Consider r2q change.\n",
- cl->common.classid);
+ warn = 1;
cl->quantum = 200000;
}
if (hopt->quantum)
sch_tree_unlock(sch);
+ if (warn)
+ pr_warn("HTB: quantum of class %X is %s. Consider r2q change.\n",
+ cl->common.classid, (warn == -1 ? "small" : "big"));
+
qdisc_class_hash_grow(sch, &q->clhash);
*arg = (unsigned long)cl;