X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fopenflow%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Finternal%2FFlowConverter.java;h=6d1c563aa44729581b5eb46b5e61f8cb0543b47a;hb=c61d22e4dc73fdaba09aa8c0b189ea7459679e03;hp=8fa4941b88771c94dbf3b578a3f89717339f899e;hpb=a9e07305d0f806384e6ddf14ebc2e1aa9d40562e;p=controller.git diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowConverter.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowConverter.java index 8fa4941b88..6d1c563aa4 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowConverter.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowConverter.java @@ -57,6 +57,7 @@ import org.openflow.protocol.action.OFAction; import org.openflow.protocol.action.OFActionDataLayer; import org.openflow.protocol.action.OFActionDataLayerDestination; import org.openflow.protocol.action.OFActionDataLayerSource; +import org.openflow.protocol.action.OFActionEnqueue; import org.openflow.protocol.action.OFActionNetworkLayerAddress; import org.openflow.protocol.action.OFActionNetworkLayerDestination; import org.openflow.protocol.action.OFActionNetworkLayerSource; @@ -280,6 +281,15 @@ public class FlowConverter { actionsLength += OFActionOutput.MINIMUM_LENGTH; continue; } + if (action.getType() == ActionType.ENQUEUE) { + Enqueue a = (Enqueue) action; + OFActionEnqueue ofAction = new OFActionEnqueue(); + ofAction.setPort(PortConverter.toOFPort(a.getPort())); + ofAction.setQueueId(a.getQueue()); + actionsList.add(ofAction); + actionsLength += OFActionEnqueue.MINIMUM_LENGTH; + continue; + } if (action.getType() == ActionType.DROP) { continue; } @@ -413,7 +423,7 @@ public class FlowConverter { continue; } if (action.getType() == ActionType.SET_NEXT_HOP) { - logger.info("Unsupported action: {}", action); + logger.warn("Unsupported action: {}", action); continue; } } @@ -529,7 +539,7 @@ public class FlowConverter { salMatch.setField(new MatchField(MatchType.DL_VLAN, vlan)); } - if (ofMatch.getDataLayerVirtualLanPriorityCodePoint() != 0) { + if ((ofMatch.getWildcards() & OFMatch.OFPFW_DL_VLAN_PCP) == 0) { salMatch.setField(MatchType.DL_VLAN_PR, ofMatch .getDataLayerVirtualLanPriorityCodePoint()); } @@ -602,7 +612,7 @@ public class FlowConverter { salMatch.setField(new MatchField(MatchType.DL_VLAN, vlan)); } - if (v6Match.getDataLayerVirtualLanPriorityCodePoint() != 0) { + if ((v6Match.getWildcards() & OFMatch.OFPFW_DL_VLAN_PCP) == 0) { salMatch.setField(MatchType.DL_VLAN_PR, v6Match .getDataLayerVirtualLanPriorityCodePoint()); } @@ -683,6 +693,10 @@ public class FlowConverter { NodeConnectorCreator.createOFNodeConnector( ofPort, node)); } + } else if (ofAction instanceof OFActionEnqueue) { + salAction = new Enqueue(NodeConnectorCreator.createOFNodeConnector( + ((OFActionEnqueue) ofAction).getPort(), node), + ((OFActionEnqueue) ofAction).getQueueId()); } else if (ofAction instanceof OFActionVirtualLanIdentifier) { salAction = new SetVlanId( ((OFActionVirtualLanIdentifier) ofAction)