Added sorting in table ip/acl by priority (descending), mpls by mpls label (ascending), many other fixes
diff --git a/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java b/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java
index 02da751..1ce945b 100644
--- a/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java
+++ b/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java
@@ -76,7 +76,7 @@
jGen.writeStringField("dataLayerSource", matchGeneric.getValue().toString());
}
else if (matchGeneric.getMatchField().id == MatchFields.ETH_TYPE){
- jGen.writeNumberField("dataLayerType", Integer.decode(matchGeneric.getValue().toString()));
+ jGen.writeStringField("dataLayerType", "0x"+(matchGeneric.getValue().toString()));
}
else if (matchGeneric.getMatchField().id == MatchFields.IN_PORT){
jGen.writeNumberField("inputPort", Integer.parseInt(matchGeneric.getValue().toString()));
@@ -152,7 +152,7 @@
jGen.writeStringField(action.getType().name(), "True");
}
else if(action.getType().compareTo(OFActionType.POP_MPLS) == 0){
- jGen.writeStringField("POP_MPLS", ((OFActionPopMpls)action).getEthertype().toString());
+ jGen.writeStringField("POP_MPLS", "0x"+((OFActionPopMpls)action).getEthertype().toString());
}
else if (action.getType().equals(OFActionType.SET_FIELD)){
//TODO Support for more setFields
@@ -188,7 +188,6 @@
* @param x
* @return
*/
-
public static int covertToMask(int x) {
x = x - ((x >>> 1) & 0x55555555);
x = (x & 0x33333333) + ((x >>> 2) & 0x33333333);