All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 9783c6e5 authored by Ryan Jackson's avatar Ryan Jackson

Added support for LINK_UP

parent ec7bb2f1
......@@ -245,8 +245,7 @@ NetlinkPipe::NetlinkPipe(std::string const & iface, std::string const & pipeno)
void NetlinkPipe::test(void)
{
Parameter testParam(Parameter::LOSS, 50000);
Parameter testParam(Parameter::DELAY, 90000);
updateParameter(testParam);
}
......@@ -260,7 +259,6 @@ int NetlinkPipe::init(void)
cerr << "Got pipe number " << pipeNumber << endl;
handle = hexStringToInt(pipeNumber);
cerr << "handle: " << handle << endl;
nl_handle = nl_handle_alloc();
if (nl_handle == NULL) {
......@@ -349,8 +347,8 @@ void NetlinkPipe::updateParameter(Parameter const & newParameter)
cerr << "Couldn't find htb class " << htbClassHandle << endl;
return;
}
rtnl_htb_set_rate(htbClass, newParameter.getValue());
rtnl_htb_set_ceil(htbClass, newParameter.getValue());
rtnl_htb_set_rate(htbClass, newParameter.getValue() * 1000);
rtnl_htb_set_ceil(htbClass, newParameter.getValue() * 1000);
rtnl_class_change(nl_handle, htbClass, NULL);
rtnl_class_put(htbClass);
break;
......@@ -360,7 +358,7 @@ void NetlinkPipe::updateParameter(Parameter const & newParameter)
cerr << "Couldn't find delay qdisc " << delayHandle << endl;
return;
}
rtnl_delay_set_delay(qdisc, newParameter.getValue());
rtnl_delay_set_delay(qdisc, newParameter.getValue() * 1000);
rtnl_qdisc_change(nl_handle, qdisc, NULL);
rtnl_qdisc_put(qdisc);
break;
......@@ -378,10 +376,10 @@ void NetlinkPipe::updateParameter(Parameter const & newParameter)
uint32_t value;
if (newParameter.getValue()) {
value = 1;
value = 0;
}
else {
value = 0x7ffffffff;
value = 0xffffffff;
}
qdisc = rtnl_qdisc_get(qdisc_cache, ifindex, plrHandle);
if (qdisc == NULL) {
......
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