diff --git a/RELEASE-NOTES b/RELEASE-NOTES index bf0659c..00a0b0c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1,4 +1,4 @@ -FlowVisor 1.1.3-DEV: May 15 2013 +FlowVisor 1.2-MAINT: June 3 2013 * FLOWVISOR-59 : Flowvisor should be able to ask the flow table from the switch * FLOWVISOR-62 : Allow slice perms to be specfied with "rwd" in addition to by number * FLOWVISOR-191: fvctl add-flowspace should check whether a slice exist before returning @@ -6,14 +6,23 @@ FlowVisor 1.1.3-DEV: May 15 2013 * FLOWVISOR-15 : LLDP packet made by FlowVisor doesn't have "the end of LLDPDU" nor a TLV header before padding(0xcafebabe) * FLOWVISOR-158: Control planes with multiple flowvisors should not broadcast LLDP packet-ins to all slices +FlowVisor 1.0.9 : June 25 2013 + * FLOWVISOR-244 : Flow stats reply sent by FlowVisor doesn't set the "more replies" flag + +FlowVisor 1.0.8 : May 29 2013 + * FLOWVISOR-238 : fvctl-xml and fvctl-json + +FlowVisor 1.0.7 : May 14 2013 + * FLOWVISOR-234 : Slices in updated config are set to disabled. + FlowVisor 1.0.6 : May 10 2013 - * FLOWVISOR-230 : fvctl list-slice-info gives confusing error message if you specify a non-existent slice - * FLOWVISOR-231 : fvctl and network specs - * FLOWVISOR-232 : Error adding flowspace rules with MAC addresses + * FLOWVISOR-230 : fvctl list-slice-info gives confusing error message if you specify a non-existent slice + * FLOWVISOR-231 : fvctl and network specs + * FLOWVISOR-232 : Error adding flowspace rules with MAC addresses FlowVisor 1.0.5 : May 2 2013 - * FLOWVISOR-216 : Undo changes to default port configurations - * Potential fix for FV crashes; awaiting confirmation + * FLOWVISOR-216 : Undo changes to default port configurations + * Potential fix for FV crashes; awaiting confirmation FlowVisor 1.0.4 : May 1 2013 * FLOWVISOR-226 : fvconfig load hangs diff --git a/src/org/flowvisor/FlowVisor.java b/src/org/flowvisor/FlowVisor.java index 3567fb3..87b7535 100644 --- a/src/org/flowvisor/FlowVisor.java +++ b/src/org/flowvisor/FlowVisor.java @@ -40,11 +40,10 @@ public class FlowVisor { public final static int FLOWVISOR_VENDOR_EXTENSION = 0x80000001; // VERSION - public final static String FLOWVISOR_VERSION = "flowvisor-1.2.0"; + public final static String FLOWVISOR_VERSION = "flowvisor-1.2.1"; public final static int FLOWVISOR_DB_VERSION = 2; - // Max slicename len ; used in LLDP for now; needs to be 1 byte public final static int MAX_SLICENAME_LEN = 255; diff --git a/src/org/flowvisor/classifier/FVClassifier.java b/src/org/flowvisor/classifier/FVClassifier.java index 68ba187..0126851 100644 --- a/src/org/flowvisor/classifier/FVClassifier.java +++ b/src/org/flowvisor/classifier/FVClassifier.java @@ -77,6 +77,7 @@ import org.openflow.protocol.OFMessage; import org.openflow.protocol.OFPhysicalPort; import org.openflow.protocol.OFPort; +import org.openflow.protocol.OFStatisticsReply.OFStatisticsReplyFlags; import org.openflow.protocol.OFType; import org.openflow.protocol.OFError.OFHelloFailedCode; import org.openflow.protocol.action.*; @@ -133,6 +134,8 @@ public class FVClassifier implements FVEventHandler, FVSendMsg, FlowMapChangedLi private boolean statsWindowOpen = true; private HashMap> flowStats = new HashMap>(); + private HashMap> actualStats = + new HashMap>(); private ConcurrentLinkedQueue toDeleteSlices = new ConcurrentLinkedQueue(); // OFPP_FLOOD @@ -1008,8 +1011,9 @@ public boolean isRateLimited(String sliceName) { private synchronized ArrayList getFlowStats(String sliceName) { ArrayList stats = new ArrayList(); - if (flowStats.get(sliceName) != null) - stats.addAll(flowStats.get(sliceName)); + if (actualStats.get(sliceName) != null) + stats.addAll(actualStats.get(sliceName)); + FVLog.log(LogLevel.DEBUG, null, actualStats.toString()); return stats; } @@ -1069,7 +1073,7 @@ private boolean matchContainsPort(FVFlowStatisticsReply reply, short outPort) { return false; } - public void sendFlowStatsResp(FVSlicer fvSlicer, FVStatisticsRequest original) { + public void sendFlowStatsResp(FVSlicer fvSlicer, FVStatisticsRequest original, short flag) { FVFlowStatisticsRequest orig = (FVFlowStatisticsRequest) original.getStatistics().get(0); @@ -1093,7 +1097,7 @@ public void sendFlowStatsResp(FVSlicer fvSlicer, FVStatisticsRequest original) { } statsReply.setStatistics(stats); - + statsReply.setFlags(flag); statsReply.setXid(original.getXid()); statsReply.setVersion(original.getVersion()); @@ -1109,7 +1113,8 @@ public void sendFlowStatsResp(FVSlicer fvSlicer, FVStatisticsRequest original) { //public synchronized void classifyFlowStats(FVStatisticsReply fvStatisticsReply, HashMap cache) { public synchronized void classifyFlowStats(FVStatisticsReply fvStatisticsReply) { - flowStats.clear(); + actualStats.clear(); + List stats = fvStatisticsReply.getStatistics(); //Adding for registering a FlowTable @@ -1138,6 +1143,11 @@ public synchronized void classifyFlowStats(FVStatisticsReply fvStatisticsReply) stat.setCookie(pair.getCookie()); addToFlowStats(stat, pair.getSliceName()); } + actualStats.putAll(flowStats); + FVLog.log(LogLevel.DEBUG, this, " actualStats: ",actualStats.toString(), "flowStats: ", flowStats.toString()); + if ((fvStatisticsReply.getFlags() != OFStatisticsReplyFlags.REPLY_MORE.getTypeValue()) ){ + flowStats.clear(); + } for (String slice : toDeleteSlices) { cleanUpFlowMods(slice); } diff --git a/src/org/flowvisor/message/statistics/FVFlowStatisticsReply.java b/src/org/flowvisor/message/statistics/FVFlowStatisticsReply.java index 4c6e391..2029fae 100644 --- a/src/org/flowvisor/message/statistics/FVFlowStatisticsReply.java +++ b/src/org/flowvisor/message/statistics/FVFlowStatisticsReply.java @@ -2,9 +2,7 @@ import java.util.ArrayList; import java.util.HashMap; -import java.util.HashSet; import java.util.List; -import java.util.Set; import org.flowvisor.classifier.FVClassifier; import org.flowvisor.classifier.XidPairWithMessage; @@ -32,6 +30,8 @@ import org.openflow.protocol.action.OFActionVendor; import org.openflow.protocol.action.OFActionVirtualLanIdentifier; import org.openflow.protocol.action.OFActionVirtualLanPriorityCodePoint; +import org.openflow.protocol.OFStatisticsReply.OFStatisticsReplyFlags; + import org.openflow.protocol.statistics.OFFlowStatisticsReply; import org.openflow.protocol.statistics.OFStatistics; import org.openflow.protocol.statistics.OFStatisticsType; @@ -53,9 +53,6 @@ public class FVFlowStatisticsReply extends OFFlowStatisticsReply implements @Override public void classifyFromSwitch(FVStatisticsReply msg, FVClassifier fvClassifier) { FVLog.log(LogLevel.DEBUG, null, "Inside classifyFromSwitch in FVFlowStatisticsReply"); - //Make a map structure out of the FVStatisticsReply msg - HashMap statsMap = new HashMap(); - //statsMap = toMap(msg, fvClassifier); //fvClassifier.classifyFlowStats(msg,statsMap); fvClassifier.classifyFlowStats(msg); @@ -67,10 +64,14 @@ public void classifyFromSwitch(FVStatisticsReply msg, FVClassifier fvClassifier) return; } FVStatisticsRequest original = (FVStatisticsRequest) pair.getOFMessage(); - if (original.getStatisticType() == OFStatisticsType.FLOW) - fvClassifier.sendFlowStatsResp(pair.getSlicer(), original); - else if (original.getStatisticType() == OFStatisticsType.AGGREGATE) - fvClassifier.sendAggStatsResp(pair.getSlicer(), original); + + if(msg.getFlags() != OFStatisticsReplyFlags.REPLY_MORE.getTypeValue()){ + if (original.getStatisticType() == OFStatisticsType.FLOW) + fvClassifier.sendFlowStatsResp(pair.getSlicer(), original, msg.getFlags()); + //fvClassifier.sendFlowStatsResp(pair.getSlicer(), original); + else if (original.getStatisticType() == OFStatisticsType.AGGREGATE) + fvClassifier.sendAggStatsResp(pair.getSlicer(), original); + } } diff --git a/src/org/flowvisor/message/statistics/FVFlowStatisticsRequest.java b/src/org/flowvisor/message/statistics/FVFlowStatisticsRequest.java index 7d9f433..2c767e5 100644 --- a/src/org/flowvisor/message/statistics/FVFlowStatisticsRequest.java +++ b/src/org/flowvisor/message/statistics/FVFlowStatisticsRequest.java @@ -26,7 +26,7 @@ public void sliceFromController(FVStatisticsRequest msg, FVClassifier fvClassifi FVSlicer fvSlicer) { FVMessageUtil.translateXidMsg(msg,fvClassifier, fvSlicer); if (!fvClassifier.pollFlowTableStats(msg)) - fvClassifier.sendFlowStatsResp(fvSlicer, msg); + fvClassifier.sendFlowStatsResp(fvSlicer, msg, (short)0); }