2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

htb: Set required min-rate to mtu not 1500.

This commit is contained in:
Ethan Jackson
2011-03-15 14:57:12 -07:00
parent 79398bad9e
commit 4f1046117c

View File

@@ -2497,8 +2497,10 @@ htb_parse_class_details__(struct netdev *netdev,
return EINVAL;
}
/* HTB requires at least an mtu sized min-rate to send any traffic even
* on uncongested links. */
hc->min_rate = min_rate_s ? strtoull(min_rate_s, NULL, 10) / 8 : 0;
hc->min_rate = MAX(hc->min_rate, 1500);
hc->min_rate = MAX(hc->min_rate, mtu);
hc->min_rate = MIN(hc->min_rate, htb->max_rate);
/* max-rate */