Skip to content
Snippets Groups Projects
Commit d186123c authored by Sandeep Hebbani's avatar Sandeep Hebbani
Browse files

BT-143 and BT-144 : Fixed a corner case bug in qualifying a policy for...

BT-143 and BT-144 : Fixed a corner case bug in qualifying a policy for duplication-free-path, even if the policy has only one delivery port, if criteria for using duplication-free path is satisfied, then compute a duplication-free path [BT-143]. Introduced a barrier between clean-all-flows and subsequent flow-mod install messages to ensure reliable clean up of flow-table [BT-144].
parent 98e804db
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,7 @@ import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.ser.ToStringSerializer;
import org.jboss.netty.channel.Channel;
import org.openflow.protocol.OFBarrierRequest;
import org.openflow.protocol.OFFeaturesReply;
import org.openflow.protocol.OFFlowMod;
import org.openflow.protocol.OFMatch;
......@@ -509,10 +510,18 @@ public abstract class OFSwitchBase implements IOFSwitch {
.setCommand(OFFlowMod.OFPFC_DELETE)
.setOutPort(OFPort.OFPP_NONE)
.setLength(U16.t(OFFlowMod.MINIMUM_LENGTH));
fm.setXid(getNextTransactionId());
OFMessage barrierMsg = (OFBarrierRequest)
floodlightProvider.getOFMessageFactory().getMessage(
OFType.BARRIER_REQUEST);
barrierMsg.setXid(getNextTransactionId());
try {
List<OFMessage> msglist = new ArrayList<OFMessage>(1);
msglist.add(fm);
channel.write(msglist);
msglist = new ArrayList<OFMessage>(1);
msglist.add(barrierMsg);
channel.write(msglist);
} catch (Exception e) {
log.error("Failed to clear all flows on switch " + this, e);
}
......
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