[英]opendaylight: multiple goto instructions in a single flow rule
I am using opendaylight (Carbon) and open VSwitch. 我正在使用opendaylight(Carbon)并打开VSwitch。 I am building an application in java for which I would like to send the packet to multiple GoTo target tables.
我正在用Java构建一个应用程序,我想将该应用程序将数据包发送到多个GoTo目标表。 The following code fragment shows how I am building the instructions:
以下代码片段显示了我如何构建指令:
private static InstructionsBuilder createGoToNextTableInstruction(short idstable, short l2switchTable) {
// Create an instruction allowing the interaction.
List<Instruction> instructions = new ArrayList<Instruction>();
Instruction gotoIdsTableInstruction = new InstructionBuilder()
.setInstruction(new GoToTableCaseBuilder()
.setGoToTable(new GoToTableBuilder().setTableId(idstable).build()).build())
.setKey(new InstructionKey(getInstructionKey())).setOrder(0).build();
instructions.add(gotoIdsTableInstruction);
Instruction gotoL2SwitchInstruction = new InstructionBuilder()
.setInstruction(new GoToTableCaseBuilder()
.setGoToTable(new GoToTableBuilder().setTableId(l2switchTable).build()).build())
.setKey(new InstructionKey(getInstructionKey())).setOrder(1).build();
instructions.add(gotoL2SwitchInstruction);
InstructionsBuilder isb = new InstructionsBuilder();
isb.setInstruction(instructions);
return isb;
}
The instructions are used to construct a flow rule as follows: 这些指令用于构造流规则,如下所示:
flowBuilder.setMatch(match).setInstructions(isb.build()).setPriority(30)
.setBufferId(OFConstants.ANY).setHardTimeout(0).setIdleTimeout(0)
.setFlags(new FlowModFlags(false, false, false, false, false));
I run the application and no exceptions are thrown. 我运行该应用程序,没有抛出异常。 However, when I go to list the flow rules at the switch, the flow never got installed.
但是,当我在交换机上列出流规则时,该流从未安装。 I can successfully install flows on the switch when I have a single GoTo instruction but not when I have multiple GoTo instructions.
当我有一条GoTo指令时,我可以在交换机上成功安装流程,但是当我有多条GoTo指令时,则不能成功。
My questions are : 我的问题是:
I tried the following : 我尝试了以下方法:
sudo ovs-ofctl -O OpenFlow13 add-flow s1 table=0,in_port=2,actions=goto_table:1,goto_table:2
ovs-ofctl: instruction goto_table may be specified only once
Here is my version: 这是我的版本:
ovs-ofctl --version
ovs-ofctl (Open vSwitch) 2.4.1
Compiled Sep 25 2016 21:59:05
OpenFlow versions 0x1:0x4
Is this an ovs version problem? 这是OVS版本的问题吗?
Thanks. 谢谢。
I verified that it is indeed not possible to have multiple GoTo targets in a single flow rule in openflow. 我验证了在openflow的单个流规则中确实不可能有多个GoTo目标。 Just following up here for the benefit of others.
只是为了他人的利益而在这里跟进。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.