Hello,
I need to create the following apply instruction in a FlowMod:
[{"apply_actions":[{"output":5}, {"output":4294967293}]}]
4294967293 is the controller port.
With the following instructions:
Action action1 = ActionFactory.createAction(version, ActionType.OUTPUT, Port.CONTROLLER, ActOutput.CONTROLLER_NO_BUFFER);
Action action2 = ActionFactory.createAction(version, ActionType.OUTPUT, BigPortNumber.valueOf(5), ActOutput.CONTROLLER_NO_BUFFER);
InstrMutableAction apply = createMutableInstruction(PV,InstructionType.APPLY_ACTIONS);
apply.addAction(action2);
apply.addAction(action1);
List<Instruction> ins = new ArrayList<Instruction>();
ins.add((Instruction) apply.toImmutable());
It doesn't work.
However if I put port 5 and port 9 (for example)
Action action1 = ActionFactory.createAction(version, ActionType.OUTPUT, BigPortNumber.valueOf(9), ActOutput.CONTROLLER_NO_BUFFER);
Action action2 = ActionFactory.createAction(version, ActionType.OUTPUT, BigPortNumber.valueOf(5), ActOutput.CONTROLLER_NO_BUFFER);
InstrMutableAction apply = createMutableInstruction(PV,InstructionType.APPLY_ACTIONS);
apply.addAction(action2);
apply.addAction(action1);
List<Instruction> ins = new ArrayList<Instruction>();
ins.add((Instruction) apply.toImmutable());
It works.
Can you see a problem ?
Regards,
Serge
PS: [{"apply_actions":[{"output":5}, {"output":4294967293}]}] works sometimes depending on the selected "Match" on the flowmod. With a match like [{"eth_type":"arp"},{"arp_op":1}] it works, but for a match like [{"eth_type":"ipv4"},{"ip_proto":"udp"},{"udp_dst":98}] it doesn't work.