mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-12-06 18:01:53 +01:00
LINC-OE handshake fix.
This commit is contained in:
parent
a6235a5a95
commit
610c1e11d9
@ -5,6 +5,7 @@ import org.onlab.onos.openflow.controller.driver.SwitchDriverSubHandshakeComplet
|
|||||||
import org.onlab.onos.openflow.controller.driver.SwitchDriverSubHandshakeNotStarted;
|
import org.onlab.onos.openflow.controller.driver.SwitchDriverSubHandshakeNotStarted;
|
||||||
import org.onlab.onos.openflow.controller.Dpid;
|
import org.onlab.onos.openflow.controller.Dpid;
|
||||||
import org.onlab.onos.openflow.controller.driver.AbstractOpenFlowSwitch;
|
import org.onlab.onos.openflow.controller.driver.AbstractOpenFlowSwitch;
|
||||||
|
import org.projectfloodlight.openflow.protocol.OFBarrierRequest;
|
||||||
import org.projectfloodlight.openflow.protocol.OFCircuitPortsReply;
|
import org.projectfloodlight.openflow.protocol.OFCircuitPortsReply;
|
||||||
import org.projectfloodlight.openflow.protocol.OFCircuitPortsRequest;
|
import org.projectfloodlight.openflow.protocol.OFCircuitPortsRequest;
|
||||||
import org.projectfloodlight.openflow.protocol.OFDescStatsReply;
|
import org.projectfloodlight.openflow.protocol.OFDescStatsReply;
|
||||||
@ -21,7 +22,6 @@ import org.projectfloodlight.openflow.protocol.oxm.OFOxmInPort;
|
|||||||
import org.projectfloodlight.openflow.protocol.oxm.OFOxmOchSigid;
|
import org.projectfloodlight.openflow.protocol.oxm.OFOxmOchSigid;
|
||||||
import org.projectfloodlight.openflow.protocol.oxm.OFOxmOchSigidBasic;
|
import org.projectfloodlight.openflow.protocol.oxm.OFOxmOchSigidBasic;
|
||||||
import org.projectfloodlight.openflow.protocol.oxm.OFOxmOchSigtype;
|
import org.projectfloodlight.openflow.protocol.oxm.OFOxmOchSigtype;
|
||||||
import org.projectfloodlight.openflow.protocol.oxm.OFOxmOchSigtypeBasic;
|
|
||||||
import org.projectfloodlight.openflow.types.CircuitSignalID;
|
import org.projectfloodlight.openflow.types.CircuitSignalID;
|
||||||
import org.projectfloodlight.openflow.types.OFPort;
|
import org.projectfloodlight.openflow.types.OFPort;
|
||||||
import org.projectfloodlight.openflow.types.U8;
|
import org.projectfloodlight.openflow.types.U8;
|
||||||
@ -119,11 +119,12 @@ public class OFOpticalSwitchImplLINC13 extends AbstractOpenFlowSwitch {
|
|||||||
processHandshakeOFExperimenterPortDescRequest(
|
processHandshakeOFExperimenterPortDescRequest(
|
||||||
(OFCircuitPortsReply) m);
|
(OFCircuitPortsReply) m);
|
||||||
driverHandshakeComplete.set(true);
|
driverHandshakeComplete.set(true);
|
||||||
/* try {
|
try {
|
||||||
testMA();
|
testMA();
|
||||||
|
testReverseMA();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}*/
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log.debug("Received message {} during switch-driver " +
|
log.debug("Received message {} during switch-driver " +
|
||||||
@ -163,32 +164,23 @@ public class OFOpticalSwitchImplLINC13 extends AbstractOpenFlowSwitch {
|
|||||||
"message " +
|
"message " +
|
||||||
"{}",
|
"{}",
|
||||||
circuitPortsRequest.toString());
|
circuitPortsRequest.toString());
|
||||||
channel.write(Collections.singletonList(circuitPortsRequest));
|
sendMsg(Collections.<OFMessage>singletonList(circuitPortsRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static final U8 SIGNAL_TYPE = U8.of((short) 10);
|
||||||
//todo for testing
|
|
||||||
public static final U8 SIGNAL_TYPE = U8.of((short) 1);
|
|
||||||
private void testMA() throws IOException {
|
private void testMA() throws IOException {
|
||||||
log.debug("LINC OE *** Testing MA ");
|
log.debug("LINC OE *** Testing MA ");
|
||||||
short lambda = 100;
|
short lambda = 1;
|
||||||
if (getId() == 0x0000ffffffffff02L) {
|
if (getId() == 0x0000ffffffffff01L) {
|
||||||
final int inport = 10;
|
final int inport = 10;
|
||||||
final int outport = 20;
|
final int outport = 20;
|
||||||
//Circuit signal id
|
//Circuit signal id
|
||||||
CircuitSignalID sigID = getSignalID(lambda);
|
CircuitSignalID sigID = getSignalID(lambda);
|
||||||
|
|
||||||
OFOxmOchSigid fieldSigIDMatch = factory().oxms().ochSigid(sigID);
|
|
||||||
OFOxmOchSigtype fieldSigType = factory()
|
|
||||||
.oxms()
|
|
||||||
.ochSigtype(SIGNAL_TYPE);
|
|
||||||
|
|
||||||
OFOxmOchSigidBasic ofOxmOchSigidBasic =
|
OFOxmOchSigidBasic ofOxmOchSigidBasic =
|
||||||
factory().oxms().ochSigidBasic(sigID);
|
factory().oxms().ochSigidBasic(sigID);
|
||||||
|
|
||||||
OFOxmOchSigtypeBasic ofOxmOchSigtypeBasic =
|
|
||||||
factory().oxms().ochSigtypeBasic(SIGNAL_TYPE);
|
|
||||||
|
|
||||||
//Match Port
|
//Match Port
|
||||||
OFOxmInPort fieldPort = factory().oxms()
|
OFOxmInPort fieldPort = factory().oxms()
|
||||||
@ -196,27 +188,21 @@ public class OFOpticalSwitchImplLINC13 extends AbstractOpenFlowSwitch {
|
|||||||
OFMatchV3 matchPort =
|
OFMatchV3 matchPort =
|
||||||
factory()
|
factory()
|
||||||
.buildMatchV3().
|
.buildMatchV3().
|
||||||
setOxmList(OFOxmList.of(fieldPort,
|
setOxmList(OFOxmList.of(fieldPort)).build();
|
||||||
fieldSigType,
|
|
||||||
fieldSigIDMatch)).build();
|
|
||||||
|
|
||||||
|
|
||||||
// Set Action outport ,sigType and sigID
|
// Set Action outport ,sigType and sigID
|
||||||
List<OFAction> actionList = new ArrayList<>();
|
List<OFAction> actionList = new ArrayList<>();
|
||||||
OFAction actionOutPort =
|
OFAction actionOutPort =
|
||||||
factory().actions().output(OFPort.of(outport),
|
factory().actions().output(OFPort.of(outport),
|
||||||
Short.MAX_VALUE);
|
0xffff);
|
||||||
|
|
||||||
OFActionCircuit actionCircuit = factory()
|
OFActionCircuit actionCircuit = factory()
|
||||||
.actions()
|
.actions()
|
||||||
.circuit(ofOxmOchSigidBasic);
|
.circuit(ofOxmOchSigidBasic);
|
||||||
OFActionCircuit setActionSigType = factory()
|
|
||||||
.actions()
|
|
||||||
.circuit(ofOxmOchSigtypeBasic);
|
|
||||||
|
|
||||||
actionList.add(actionOutPort);
|
|
||||||
actionList.add(setActionSigType);
|
|
||||||
actionList.add(actionCircuit);
|
actionList.add(actionCircuit);
|
||||||
|
actionList.add(actionOutPort);
|
||||||
|
|
||||||
OFInstruction instructionAction =
|
OFInstruction instructionAction =
|
||||||
factory().instructions().buildApplyActions()
|
factory().instructions().buildApplyActions()
|
||||||
@ -228,6 +214,7 @@ public class OFOpticalSwitchImplLINC13 extends AbstractOpenFlowSwitch {
|
|||||||
OFMessage opticalFlowEntry =
|
OFMessage opticalFlowEntry =
|
||||||
factory().buildFlowAdd()
|
factory().buildFlowAdd()
|
||||||
.setMatch(matchPort)
|
.setMatch(matchPort)
|
||||||
|
.setPriority(100)
|
||||||
.setInstructions(instructions)
|
.setInstructions(instructions)
|
||||||
.setXid(getNextTransactionId())
|
.setXid(getNextTransactionId())
|
||||||
.build();
|
.build();
|
||||||
@ -235,9 +222,10 @@ public class OFOpticalSwitchImplLINC13 extends AbstractOpenFlowSwitch {
|
|||||||
List<OFMessage> msglist = new ArrayList<>(1);
|
List<OFMessage> msglist = new ArrayList<>(1);
|
||||||
msglist.add(opticalFlowEntry);
|
msglist.add(opticalFlowEntry);
|
||||||
write(msglist);
|
write(msglist);
|
||||||
|
sendBarrier(true);
|
||||||
} else if (getId() == 0x0000ffffffffff03L) {
|
} else if (getId() == 0x0000ffffffffff03L) {
|
||||||
final int inport = 21;
|
final int inport = 30;
|
||||||
final int outport = 22;
|
final int outport = 31;
|
||||||
//Circuit signal id
|
//Circuit signal id
|
||||||
CircuitSignalID sigID = getSignalID(lambda);
|
CircuitSignalID sigID = getSignalID(lambda);
|
||||||
|
|
||||||
@ -249,9 +237,6 @@ public class OFOpticalSwitchImplLINC13 extends AbstractOpenFlowSwitch {
|
|||||||
OFOxmOchSigidBasic ofOxmOchSigidBasic =
|
OFOxmOchSigidBasic ofOxmOchSigidBasic =
|
||||||
factory().oxms().ochSigidBasic(sigID);
|
factory().oxms().ochSigidBasic(sigID);
|
||||||
|
|
||||||
OFOxmOchSigtypeBasic ofOxmOchSigtypeBasic =
|
|
||||||
factory().oxms().ochSigtypeBasic(SIGNAL_TYPE);
|
|
||||||
|
|
||||||
//Match Port,SigType,SigID
|
//Match Port,SigType,SigID
|
||||||
OFOxmInPort fieldPort = factory()
|
OFOxmInPort fieldPort = factory()
|
||||||
.oxms()
|
.oxms()
|
||||||
@ -259,27 +244,26 @@ public class OFOpticalSwitchImplLINC13 extends AbstractOpenFlowSwitch {
|
|||||||
OFMatchV3 matchPort = factory()
|
OFMatchV3 matchPort = factory()
|
||||||
.buildMatchV3()
|
.buildMatchV3()
|
||||||
.setOxmList(OFOxmList.of(fieldPort,
|
.setOxmList(OFOxmList.of(fieldPort,
|
||||||
fieldSigType,
|
fieldSigIDMatch,
|
||||||
fieldSigIDMatch))
|
fieldSigType
|
||||||
|
))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Set Action outport ,SigType, sigID
|
// Set Action outport ,SigType, sigID
|
||||||
List<OFAction> actionList = new ArrayList<>();
|
List<OFAction> actionList = new ArrayList<>();
|
||||||
OFAction actionOutPort =
|
OFAction actionOutPort =
|
||||||
factory().actions().output(OFPort.of(outport),
|
factory().actions().output(OFPort.of(outport),
|
||||||
Short.MAX_VALUE);
|
0xffff);
|
||||||
|
|
||||||
OFActionCircuit setActionSigType = factory()
|
|
||||||
.actions()
|
|
||||||
.circuit(ofOxmOchSigtypeBasic);
|
|
||||||
OFActionCircuit actionCircuit = factory()
|
OFActionCircuit actionCircuit = factory()
|
||||||
.actions()
|
.actions()
|
||||||
.circuit(ofOxmOchSigidBasic);
|
.circuit(ofOxmOchSigidBasic);
|
||||||
|
|
||||||
|
|
||||||
actionList.add(actionOutPort);
|
|
||||||
actionList.add(setActionSigType);
|
//actionList.add(setActionSigType);
|
||||||
actionList.add(actionCircuit);
|
actionList.add(actionCircuit);
|
||||||
|
actionList.add(actionOutPort);
|
||||||
|
|
||||||
OFInstruction instructionAction =
|
OFInstruction instructionAction =
|
||||||
factory().instructions().buildApplyActions()
|
factory().instructions().buildApplyActions()
|
||||||
@ -290,17 +274,19 @@ public class OFOpticalSwitchImplLINC13 extends AbstractOpenFlowSwitch {
|
|||||||
|
|
||||||
OFMessage opticalFlowEntry =
|
OFMessage opticalFlowEntry =
|
||||||
factory().buildFlowAdd()
|
factory().buildFlowAdd()
|
||||||
.setMatch(matchPort)
|
.setMatch(matchPort)
|
||||||
.setInstructions(instructions)
|
.setPriority(100)
|
||||||
.setXid(getNextTransactionId())
|
.setInstructions(instructions)
|
||||||
.build();
|
.setXid(getNextTransactionId())
|
||||||
|
.build();
|
||||||
log.debug("Adding optical flow in sw {}", getStringId());
|
log.debug("Adding optical flow in sw {}", getStringId());
|
||||||
List<OFMessage> msglist = new ArrayList<>(1);
|
List<OFMessage> msglist = new ArrayList<>(1);
|
||||||
msglist.add(opticalFlowEntry);
|
msglist.add(opticalFlowEntry);
|
||||||
write(msglist);
|
write(msglist);
|
||||||
|
sendBarrier(true);
|
||||||
|
|
||||||
} else if (getId() == 0x0000ffffffffff04L) {
|
} else if (getId() == 0x0000ffffffffff02L) {
|
||||||
final int inport = 23;
|
final int inport = 21;
|
||||||
final int outport = 11;
|
final int outport = 11;
|
||||||
//Circuit signal id
|
//Circuit signal id
|
||||||
CircuitSignalID sigID = getSignalID(lambda);
|
CircuitSignalID sigID = getSignalID(lambda);
|
||||||
@ -318,15 +304,16 @@ public class OFOpticalSwitchImplLINC13 extends AbstractOpenFlowSwitch {
|
|||||||
OFMatchV3 matchPort =
|
OFMatchV3 matchPort =
|
||||||
factory().buildMatchV3()
|
factory().buildMatchV3()
|
||||||
.setOxmList(OFOxmList.of(fieldPort,
|
.setOxmList(OFOxmList.of(fieldPort,
|
||||||
fieldSigType,
|
fieldSigIDMatch,
|
||||||
fieldSigIDMatch))
|
fieldSigType
|
||||||
|
))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Set Action outport
|
// Set Action outport
|
||||||
List<OFAction> actionList = new ArrayList<>();
|
List<OFAction> actionList = new ArrayList<>();
|
||||||
OFAction actionOutPort =
|
OFAction actionOutPort =
|
||||||
factory().actions().output(OFPort.of(outport),
|
factory().actions().output(OFPort.of(outport),
|
||||||
Short.MAX_VALUE);
|
0xffff);
|
||||||
|
|
||||||
actionList.add(actionOutPort);
|
actionList.add(actionOutPort);
|
||||||
|
|
||||||
@ -339,17 +326,184 @@ public class OFOpticalSwitchImplLINC13 extends AbstractOpenFlowSwitch {
|
|||||||
|
|
||||||
OFMessage opticalFlowEntry =
|
OFMessage opticalFlowEntry =
|
||||||
factory().buildFlowAdd()
|
factory().buildFlowAdd()
|
||||||
.setMatch(matchPort)
|
.setMatch(matchPort)
|
||||||
.setInstructions(instructions)
|
.setPriority(100)
|
||||||
.setXid(getNextTransactionId())
|
.setInstructions(instructions)
|
||||||
.build();
|
.setXid(getNextTransactionId())
|
||||||
|
.build();
|
||||||
log.debug("Adding optical flow in sw {}", getStringId());
|
log.debug("Adding optical flow in sw {}", getStringId());
|
||||||
List<OFMessage> msglist = new ArrayList<>(1);
|
List<OFMessage> msglist = new ArrayList<>(1);
|
||||||
msglist.add(opticalFlowEntry);
|
msglist.add(opticalFlowEntry);
|
||||||
write(msglist);
|
write(msglist);
|
||||||
|
sendBarrier(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
private void testReverseMA() throws IOException {
|
||||||
|
log.debug("LINC OE *** Testing MA ");
|
||||||
|
short lambda = 1;
|
||||||
|
if (getId() == 0x0000ffffffffff02L) {
|
||||||
|
final int inport = 11;
|
||||||
|
final int outport = 21;
|
||||||
|
//Circuit signal id
|
||||||
|
CircuitSignalID sigID = getSignalID(lambda);
|
||||||
|
|
||||||
|
OFOxmOchSigidBasic ofOxmOchSigidBasic =
|
||||||
|
factory().oxms().ochSigidBasic(sigID);
|
||||||
|
|
||||||
|
//Match Port
|
||||||
|
OFOxmInPort fieldPort = factory().oxms()
|
||||||
|
.inPort(OFPort.of(inport));
|
||||||
|
OFMatchV3 matchPort =
|
||||||
|
factory()
|
||||||
|
.buildMatchV3().
|
||||||
|
setOxmList(OFOxmList.of(fieldPort)).build();
|
||||||
|
|
||||||
|
|
||||||
|
// Set Action outport ,sigType and sigID
|
||||||
|
List<OFAction> actionList = new ArrayList<>();
|
||||||
|
OFAction actionOutPort =
|
||||||
|
factory().actions().output(OFPort.of(outport),
|
||||||
|
0xffff);
|
||||||
|
|
||||||
|
OFActionCircuit actionCircuit = factory()
|
||||||
|
.actions()
|
||||||
|
.circuit(ofOxmOchSigidBasic);
|
||||||
|
actionList.add(actionCircuit);
|
||||||
|
actionList.add(actionOutPort);
|
||||||
|
|
||||||
|
OFInstruction instructionAction =
|
||||||
|
factory().instructions().buildApplyActions()
|
||||||
|
.setActions(actionList)
|
||||||
|
.build();
|
||||||
|
List<OFInstruction> instructions =
|
||||||
|
Collections.singletonList(instructionAction);
|
||||||
|
|
||||||
|
OFMessage opticalFlowEntry =
|
||||||
|
factory().buildFlowAdd()
|
||||||
|
.setMatch(matchPort)
|
||||||
|
.setPriority(100)
|
||||||
|
.setInstructions(instructions)
|
||||||
|
.setXid(getNextTransactionId())
|
||||||
|
.build();
|
||||||
|
log.debug("Adding optical flow in sw {}", getStringId());
|
||||||
|
List<OFMessage> msglist = new ArrayList<>(1);
|
||||||
|
msglist.add(opticalFlowEntry);
|
||||||
|
write(msglist);
|
||||||
|
sendBarrier(true);
|
||||||
|
} else if (getId() == 0x0000ffffffffff03L) {
|
||||||
|
final int inport = 31;
|
||||||
|
final int outport = 30;
|
||||||
|
//Circuit signal id
|
||||||
|
CircuitSignalID sigID = getSignalID(lambda);
|
||||||
|
|
||||||
|
OFOxmOchSigid fieldSigIDMatch = factory().oxms().ochSigid(sigID);
|
||||||
|
OFOxmOchSigtype fieldSigType = factory()
|
||||||
|
.oxms()
|
||||||
|
.ochSigtype(SIGNAL_TYPE);
|
||||||
|
|
||||||
|
OFOxmOchSigidBasic ofOxmOchSigidBasic =
|
||||||
|
factory().oxms().ochSigidBasic(sigID);
|
||||||
|
|
||||||
|
//Match Port,SigType,SigID
|
||||||
|
OFOxmInPort fieldPort = factory()
|
||||||
|
.oxms()
|
||||||
|
.inPort(OFPort.of(inport));
|
||||||
|
OFMatchV3 matchPort = factory()
|
||||||
|
.buildMatchV3()
|
||||||
|
.setOxmList(OFOxmList.of(fieldPort,
|
||||||
|
fieldSigIDMatch,
|
||||||
|
fieldSigType
|
||||||
|
))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// Set Action outport ,SigType, sigID
|
||||||
|
List<OFAction> actionList = new ArrayList<>();
|
||||||
|
OFAction actionOutPort =
|
||||||
|
factory().actions().output(OFPort.of(outport),
|
||||||
|
0xffff);
|
||||||
|
OFActionCircuit actionCircuit = factory()
|
||||||
|
.actions()
|
||||||
|
.circuit(ofOxmOchSigidBasic);
|
||||||
|
|
||||||
|
actionList.add(actionCircuit);
|
||||||
|
actionList.add(actionOutPort);
|
||||||
|
|
||||||
|
OFInstruction instructionAction =
|
||||||
|
factory().instructions().buildApplyActions()
|
||||||
|
.setActions(actionList)
|
||||||
|
.build();
|
||||||
|
List<OFInstruction> instructions =
|
||||||
|
Collections.singletonList(instructionAction);
|
||||||
|
|
||||||
|
OFMessage opticalFlowEntry =
|
||||||
|
factory().buildFlowAdd()
|
||||||
|
.setMatch(matchPort)
|
||||||
|
.setPriority(100)
|
||||||
|
.setInstructions(instructions)
|
||||||
|
.setXid(getNextTransactionId())
|
||||||
|
.build();
|
||||||
|
log.debug("Adding optical flow in sw {}", getStringId());
|
||||||
|
List<OFMessage> msglist = new ArrayList<>(1);
|
||||||
|
msglist.add(opticalFlowEntry);
|
||||||
|
write(msglist);
|
||||||
|
sendBarrier(true);
|
||||||
|
|
||||||
|
} else if (getId() == 0x0000ffffffffff01L) {
|
||||||
|
final int inport = 20;
|
||||||
|
final int outport = 10;
|
||||||
|
//Circuit signal id
|
||||||
|
CircuitSignalID sigID = getSignalID(lambda);
|
||||||
|
|
||||||
|
OFOxmOchSigid fieldSigIDMatch = factory().oxms().ochSigid(sigID);
|
||||||
|
OFOxmOchSigtype fieldSigType = factory()
|
||||||
|
.oxms()
|
||||||
|
.ochSigtype(SIGNAL_TYPE);
|
||||||
|
|
||||||
|
|
||||||
|
//Match Port, sig type and sig id
|
||||||
|
OFOxmInPort fieldPort = factory()
|
||||||
|
.oxms()
|
||||||
|
.inPort(OFPort.of(inport));
|
||||||
|
OFMatchV3 matchPort =
|
||||||
|
factory().buildMatchV3()
|
||||||
|
.setOxmList(OFOxmList.of(fieldPort,
|
||||||
|
fieldSigIDMatch,
|
||||||
|
fieldSigType
|
||||||
|
))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// Set Action outport
|
||||||
|
List<OFAction> actionList = new ArrayList<>();
|
||||||
|
OFAction actionOutPort =
|
||||||
|
factory().actions().output(OFPort.of(outport),
|
||||||
|
0xffff);
|
||||||
|
|
||||||
|
actionList.add(actionOutPort);
|
||||||
|
|
||||||
|
OFInstruction instructionAction =
|
||||||
|
factory().instructions().buildApplyActions()
|
||||||
|
.setActions(actionList)
|
||||||
|
.build();
|
||||||
|
List<OFInstruction> instructions =
|
||||||
|
Collections.singletonList(instructionAction);
|
||||||
|
|
||||||
|
OFMessage opticalFlowEntry =
|
||||||
|
factory().buildFlowAdd()
|
||||||
|
.setMatch(matchPort)
|
||||||
|
.setPriority(100)
|
||||||
|
.setInstructions(instructions)
|
||||||
|
.setXid(getNextTransactionId())
|
||||||
|
.build();
|
||||||
|
log.debug("Adding optical flow in sw {}", getStringId());
|
||||||
|
List<OFMessage> msglist = new ArrayList<>(1);
|
||||||
|
msglist.add(opticalFlowEntry);
|
||||||
|
write(msglist);
|
||||||
|
sendBarrier(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Todo remove - for testing purpose only
|
// Todo remove - for testing purpose only
|
||||||
private static CircuitSignalID getSignalID(short lambda) {
|
private static CircuitSignalID getSignalID(short lambda) {
|
||||||
@ -365,9 +519,21 @@ public class OFOpticalSwitchImplLINC13 extends AbstractOpenFlowSwitch {
|
|||||||
return signalID;
|
return signalID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void sendBarrier(boolean finalBarrier) throws IOException {
|
||||||
|
int xid = getNextTransactionId();
|
||||||
|
if (finalBarrier) {
|
||||||
|
barrierXidToWaitFor = xid;
|
||||||
|
}
|
||||||
|
OFBarrierRequest br = factory()
|
||||||
|
.buildBarrierRequest()
|
||||||
|
.setXid(xid)
|
||||||
|
.build();
|
||||||
|
sendMsg(br);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(OFMessage msg) {
|
public void write(OFMessage msg) {
|
||||||
this.channel.write(msg);
|
this.sendMsg(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user