Skip to content
This repository was archived by the owner on Nov 13, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions RELEASE-NOTES
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
FlowVisor 1.1.3-DEV: May 15 2013
FlowVisor 1.2-MAINT: June 3 2013
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not put 1.2-MAINT, specify the actual version number.

* 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
* FLOWVISOR-187: Log level of packets not matching any slice in Flowvisor
* 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
Expand Down
3 changes: 1 addition & 2 deletions src/org/flowvisor/FlowVisor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
20 changes: 15 additions & 5 deletions src/org/flowvisor/classifier/FVClassifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;
Expand Down Expand Up @@ -133,6 +134,8 @@ public class FVClassifier implements FVEventHandler, FVSendMsg, FlowMapChangedLi
private boolean statsWindowOpen = true;
private HashMap<String, ArrayList<FVFlowStatisticsReply>> flowStats =
new HashMap<String, ArrayList<FVFlowStatisticsReply>>();
private HashMap<String, ArrayList<FVFlowStatisticsReply>> actualStats =
new HashMap<String, ArrayList<FVFlowStatisticsReply>>();
private ConcurrentLinkedQueue<String> toDeleteSlices = new ConcurrentLinkedQueue<String>();

// OFPP_FLOOD
Expand Down Expand Up @@ -1008,8 +1011,9 @@ public boolean isRateLimited(String sliceName) {

private synchronized ArrayList<FVFlowStatisticsReply> getFlowStats(String sliceName) {
ArrayList<FVFlowStatisticsReply> stats = new ArrayList<FVFlowStatisticsReply>();
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;
}

Expand Down Expand Up @@ -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);


Expand All @@ -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());
Expand All @@ -1109,7 +1113,8 @@ public void sendFlowStatsResp(FVSlicer fvSlicer, FVStatisticsRequest original) {

//public synchronized void classifyFlowStats(FVStatisticsReply fvStatisticsReply, HashMap<String,Object> cache) {
public synchronized void classifyFlowStats(FVStatisticsReply fvStatisticsReply) {
flowStats.clear();
actualStats.clear();

List<OFStatistics> stats = fvStatisticsReply.getStatistics();

//Adding for registering a FlowTable
Expand Down Expand Up @@ -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);
}
Expand Down
19 changes: 10 additions & 9 deletions src/org/flowvisor/message/statistics/FVFlowStatisticsReply.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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 <String, Object> statsMap = new HashMap<String, Object>();
//statsMap = toMap(msg, fvClassifier);

//fvClassifier.classifyFlowStats(msg,statsMap);
fvClassifier.classifyFlowStats(msg);
Expand All @@ -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);
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

Expand Down