Skip to content
Snippets Groups Projects
Commit 1bc28ca2 authored by Srinivasan Ramasubramanian's avatar Srinivasan Ramasubramanian
Browse files

When sending LLDPs and BDDPs from all the switches, send LLDPs first and then...

When sending LLDPs and BDDPs from all the switches, send LLDPs first and then BDDPs. This would enable direct links to be detected first and reduced instability.
parent efcfc513
No related branches found
No related tags found
No related merge requests found
......@@ -346,24 +346,22 @@ public class LinkDiscoveryManager
}
protected void sendLLDPs(SwitchPortTuple swt) {
protected void sendLLDPs(SwitchPortTuple swt, boolean isStandard) {
IOFSwitch sw = swt.getSw();
if (sw == null) return;
OFPhysicalPort port = sw.getPort(swt.getPort());
if (port != null) {
sendLLDPs(sw, port, true);
sendLLDPs(sw, port, false);
sendLLDPs(sw, port, isStandard);
}
}
protected void sendLLDPs(IOFSwitch sw) {
protected void sendLLDPs(IOFSwitch sw, boolean isStandard) {
if (sw.getEnabledPorts() != null) {
for (OFPhysicalPort port : sw.getEnabledPorts()) {
sendLLDPs(sw, port, true);
sendLLDPs(sw, port, false);
sendLLDPs(sw, port, isStandard);
}
}
sw.flush();
......@@ -377,7 +375,11 @@ public class LinkDiscoveryManager
Map<Long, IOFSwitch> switches = floodlightProvider.getSwitches();
for (Entry<Long, IOFSwitch> entry : switches.entrySet()) {
IOFSwitch sw = entry.getValue();
sendLLDPs(sw);
sendLLDPs(sw, true);
}
for (Entry<Long, IOFSwitch> entry : switches.entrySet()) {
IOFSwitch sw = entry.getValue();
sendLLDPs(sw, false);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment