netdev-linux: Make htb quantum always no less than mtu.
authorAlex Wang <alexw@nicira.com>
Fri, 27 Mar 2015 18:34:53 +0000 (11:34 -0700)
committerAlex Wang <alexw@nicira.com>
Fri, 27 Mar 2015 20:53:54 +0000 (13:53 -0700)
commit3638617df538b3ab945fcebb10d25ca272c3a6ca
tree2c903584f0ead16c14eb9140f694bd8b9d4d413a
parentaaa1c7a982cb5fb078650e377333fdb267b11136
netdev-linux: Make htb quantum always no less than mtu.

Currently, ovs uses hardcoded rate2quantum = 10 for each htb qdisc.
When qdisc class's rate is small, the resulting quantum (calculated
by min_rate / rate2quantum) will be smaller than MTU.  This is not
recommended and tc will keep complaining the following in syslog.

localhost kernel: HTB: quantum of class 10003 is small. Consider r2q change.
localhost kernel: HTB: quantum of class 10004 is small. Consider r2q change.
localhost kernel: HTB: quantum of class 10005 is small. Consider r2q change.
localhost kernel: HTB: quantum of class 10006 is small. Consider r2q change.

To fix the issue, this commit makes ovs always use htb quantum no less
than the MTU.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/netdev-linux.c