Commit 8aa31d65 authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Bandwidth conversion was off by exactly a factor of 8. Needed to convert bits to bytes.

parent eaa24dfc
...@@ -142,8 +142,8 @@ void NetlinkPipe::updateParameter(Parameter const & newParameter) ...@@ -142,8 +142,8 @@ void NetlinkPipe::updateParameter(Parameter const & newParameter)
cerr << "Couldn't find htb class " << htbClassHandle << endl; cerr << "Couldn't find htb class " << htbClassHandle << endl;
return; return;
} }
rtnl_htb_set_rate(htbClass, newParameter.getValue() * 1000); rtnl_htb_set_rate(htbClass, floor(newParameter.getValue() * 1000 / 8.0));
rtnl_htb_set_ceil(htbClass, newParameter.getValue() * 1000); rtnl_htb_set_ceil(htbClass, floor(newParameter.getValue() * 1000 / 8.0));
rtnl_class_change(nl_handle, htbClass, NULL); rtnl_class_change(nl_handle, htbClass, NULL);
rtnl_class_put(htbClass); rtnl_class_put(htbClass);
break; break;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#define LIB_HH_DELAY_AGENT_1 #define LIB_HH_DELAY_AGENT_1
#include <cassert> #include <cassert>
#include <cmath>
#include <string> #include <string>
#include <map> #include <map>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment