<properties>\r
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
<nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>\r
- <yang.version>0.6.1</yang.version>\r
- <yang.codegen.version>0.6.1</yang.codegen.version>\r
+ <yang.version>0.6.2-SNAPSHOT</yang.version>\r
+ <yang.codegen.version>0.6.2-SNAPSHOT</yang.codegen.version>\r
<bundle.plugin.version>2.3.7</bundle.plugin.version>\r
</properties>\r
<scm>\r
<enforcer.version>1.3.1</enforcer.version>
<bundle.plugin.version>2.3.7</bundle.plugin.version>
<junit.version>4.8.1</junit.version>
- <yangtools.version>0.6.1</yangtools.version>
+ <yangtools.version>0.6.2-SNAPSHOT</yangtools.version>
<!--versions for bits of the controller -->
<controller.version>0.4.2-SNAPSHOT</controller.version>
<hosttracker.api.version>0.5.2-SNAPSHOT</hosttracker.api.version>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-binding</artifactId>
- <version>0.6.1</version>
+ <version>${yangtools.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>binding-type-provider</artifactId>
- <version>0.6.1</version>
+ <version>${yangtools.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>0.6.1</version>
+ <version>${yangtools.version}</version>
<type>jar</type>
</dependency>
</dependencies>
</profiles>
<properties>
- <yangtools.version>0.6.1</yangtools.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
<!-- Java Versions -->
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>0.6.1</version>
+ <version>${yangtools.version}</version>
<type>jar</type>
</dependency>
</dependencies>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>0.6.1</version>
+ <version>${yangtools.version}</version>
<type>jar</type>
</dependency>
</dependencies>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>concepts</artifactId>
- <version>0.6.1</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>concepts</artifactId>
- <version>0.6.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>0.6.1</version>
+ <version>${yangtools.version}</version>
<type>jar</type>
</dependency>
</dependencies>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>0.6.1</version>
+ <version>${yangtools.version}</version>
<type>jar</type>
</dependency>
</dependencies>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>0.6.1</version>
+ <version>${yangtools.version}</version>
<type>jar</type>
</dependency>
</dependencies>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>0.6.1</version>
+ <version>${yangtools.version}</version>
<type>jar</type>
</dependency>
</dependencies>
this.myAppData = ByteBuffer
.allocate(session.getApplicationBufferSize());
this.peerAppData = ByteBuffer.allocate(session
- .getApplicationBufferSize());
+ .getApplicationBufferSize() * 2);
this.myNetData = ByteBuffer.allocate(session.getPacketBufferSize());
- this.peerNetData = ByteBuffer.allocate(session.getPacketBufferSize());
+ this.peerNetData = ByteBuffer.allocate(session.getPacketBufferSize() * 2);
}
@Override
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());
}
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());
}
this.dlVlanIDState = MatchFieldState.MATCH_ABSENT;
}
- if (match.getDataLayerVirtualLanPriorityCodePoint() != 0) {
+ if ((match.getWildcards() & OFMatch.OFPFW_DL_VLAN_PCP) == 0) {
this.setDataLayerVirtualLanPriorityCodePoint(
match.getDataLayerVirtualLanPriorityCodePoint(), (byte) 0);
} else {
// extract the vlan id
super.setDataLayerVirtualLan(getVlanID(firstByte,
secondByte));
- } else {
this.wildcards ^= (1 << 1); // Sync with 0F 1.0 Match
}
if ((this.dataLayerVirtualLanTCIMask & 0xe000) != 0) {
// else if its a vlan pcp mask
// extract the vlan pcp
super.setDataLayerVirtualLanPriorityCodePoint(getVlanPCP(firstByte));
- } else {
this.wildcards ^= (1 << 20);
}
this.dlVlanTCIState = MatchFieldState.MATCH_FIELD_WITH_MASK;
super.setDataLayerVirtualLan(getVlanID(firstByte, secondByte));
this.dlVlanTCIState = MatchFieldState.MATCH_FIELD_ONLY;
this.match_len += 6;
+ this.wildcards ^= (1 << 1); // Sync with 0F 1.0 Match
+ this.wildcards ^= (1 << 20);
}
}
}
// ipv4 dest processing
this.wildcards ^= (((1 << 5) - 1) << 14);
}
- } else {
- this.wildcards = 0;
}
}
import org.junit.Assert;
import org.junit.Test;
import org.opendaylight.controller.protocol_plugin.openflow.vendorextension.v6extension.V6Match;
-import org.openflow.protocol.OFMatch;
-import org.openflow.protocol.action.OFAction;
-
import org.opendaylight.controller.sal.action.Action;
import org.opendaylight.controller.sal.action.Flood;
import org.opendaylight.controller.sal.action.FloodAll;
import org.opendaylight.controller.sal.utils.IPProtocols;
import org.opendaylight.controller.sal.utils.NodeConnectorCreator;
import org.opendaylight.controller.sal.utils.NodeCreator;
+import org.openflow.protocol.OFMatch;
+import org.openflow.protocol.action.OFAction;
+import org.openflow.util.U32;
public class FlowProgrammerServiceTest {
*/
FlowConverter salToOF = new FlowConverter(aFlow);
V6Match v6Match = (V6Match) salToOF.getOFMatch();
+ // need this hardcoding here to make the test pass.
+ // this should not be a problem in actual code.
+ // in the test the sal match is converted to a V6 match.
+ // we lose the wildcard info as the V6 match is used for nicira extensions
+ // and nicira deals with wildcards in a different way.
+ // converting the V6 match back to sal match is not going to preserve the wildcard info.
+ // and we need the wildcard info for reading the vlan pcp now.
+ // when creating a V6Match using the readFrom method
+ // we do convert the nicira extensions format correctly to populate the wildcard info.
+ v6Match.setWildcards(U32.t(Long.valueOf(~OFMatch.OFPFW_DL_VLAN_PCP)));
List<OFAction> ofActions = salToOF.getOFActions();
/*
import org.junit.Assert;
import org.junit.Test;
import org.openflow.protocol.OFMatch;
+import org.openflow.util.U32;
public class V6ExtensionTest {
match.fromString("input_port=1");
match.fromString("dl_dst=20:A0:11:10:00:99");
match.fromString("dl_src=00:10:08:22:12:75");
-
match.fromString("ip_src=10.1.1.1");
match.fromString("ip_dst=1.2.3.4");
match.fromString("eth_type=0x800");
match.fromString("dl_vlan=10");
- match.fromString("dl_vpcp=1");
match.fromString("nw_proto=6");
match.fromString("nw_tos=100");
match.fromString("tp_dst=8080");
match.fromString("tp_src=60");
+ match.fromString("dl_vpcp=1");
Assert.assertTrue(match.getInputPort() == 1);
// Assert.assertTrue(match.getIPv6MatchLen()==6);
-
ofm.setInputPort((short) 1);
// V6Match is meant for IPv6, but if using OFMatch, it will be set to
// IPv4 values, as OF1.0 doesn't support IPv6.
ofm.setTransportSource((short) 60);
ofm.setTransportDestination((short) 8080);
+ // this v6match ctor now looks at the wildcard field to
+ // determine if vlan pcp has been set
+ // so set the wildcards appropriately to reflect that vlan pcp
+ // has been set.
+ int wildcards = OFMatch.OFPFW_ALL;
+ wildcards &= ~OFMatch.OFPFW_DL_VLAN_PCP;
+ ofm.setWildcards(U32.t(Long.valueOf(wildcards)));
V6Match match3 = new V6Match(ofm);
Assert.assertTrue(match.getInputPort() == match3.getInputPort());
one.lib.helper = {
parseInt : function(value) {
- return (value !== null && value !== '') ?
+ return (value != null && value.trim() !== '') ?
parseInt(value) : ''
},
parseFloat : function(value) {
- return (value !== null && value !== '') ?
+ return (value != null && value.trim() !== '') ?
parseFloat(value) : ''
}
}
public class Troubleshoot implements IDaylightWeb {
private static final UserLevel AUTH_LEVEL = UserLevel.CONTAINERUSER;
private static final List<String> flowStatsColumnNames = Arrays.asList("Node", "In Port",
- "DL Src", "DL Dst", "DL Type", "DL Vlan", "NW Src", "NW Dst","ToS Bits",
+ "DL Src", "DL Dst", "DL Type", "DL Vlan","Vlan Priority", "NW Src", "NW Dst","ToS Bits",
"NW Proto", "TP Src", "TP Dst", "Actions", "Bytes", "Packets",
"Time (s)", "Timeout (s)",
"Priority");
} else {
row.put(MatchType.DL_VLAN.id(), "*");
}
+ //Vlan Priority
+ if (match.isPresent(MatchType.DL_VLAN_PR)) {
+ if (((Byte) flow.getMatch().getField(MatchType.DL_VLAN_PR).getValue())
+ .shortValue() < 0) {
+ row.put(MatchType.DL_VLAN_PR.id(), "0");
+ } else {
+ row.put(MatchType.DL_VLAN_PR.id(), ((Byte) flow.getMatch()
+ .getField(MatchType.DL_VLAN_PR).getValue()).toString());
+ }
+ } else {
+ row.put(MatchType.DL_VLAN_PR.id(), "*");
+ }
+
if (match.isPresent(MatchType.NW_SRC)) {
row.put(MatchType.NW_SRC.id(), ((InetAddress) flow.getMatch()
.getField(MatchType.NW_SRC).getValue()).getHostAddress());
row.put("durationSeconds",
((Integer) flowOnNode.getDurationSeconds()).toString());
row.put("idleTimeout", ((Short) flow.getIdleTimeout()).toString());
- row.put("priority", String.valueOf(flow.getPriority()));
+ row.put("priority", String.valueOf(NetUtils.getUnsignedShort(flow.getPriority())));
return row;
}
label: 'DL Vlan',
sortable: true
},
+ {
+ property: 'dlVlanPriority',
+ label: 'Vlan PCP',
+ sortable: true
+ },
{
property: 'nwSrc',
label: 'NW Src',