Skip to content
This repository was archived by the owner on Nov 13, 2023. It is now read-only.

Commit 4bdd6b1

Browse files
Sumanth SathyanarayanaSumanth Sathyanarayana
authored andcommitted
Merged 1.0.9
2 parents d1342c1 + 0be0f47 commit 4bdd6b1

File tree

5 files changed

+42
-15
lines changed

5 files changed

+42
-15
lines changed

RELEASE-NOTES

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,23 @@ FlowVisor 1.1.3-DEV: May 15 2013
66
* FLOWVISOR-15 : LLDP packet made by FlowVisor doesn't have "the end of LLDPDU" nor a TLV header before padding(0xcafebabe)
77
* FLOWVISOR-158: Control planes with multiple flowvisors should not broadcast LLDP packet-ins to all slices
88

9+
FlowVisor 1.0.9 : June 25 2013
10+
* FLOWVISOR-244 : Flow stats reply sent by FlowVisor doesn't set the "more replies" flag
11+
12+
FlowVisor 1.0.8 : May 29 2013
13+
* FLOWVISOR-238 : fvctl-xml and fvctl-json
14+
15+
FlowVisor 1.0.7 : May 14 2013
16+
* FLOWVISOR-234 : Slices in updated config are set to disabled.
17+
918
FlowVisor 1.0.6 : May 10 2013
10-
* FLOWVISOR-230 : fvctl list-slice-info gives confusing error message if you specify a non-existent slice
11-
* FLOWVISOR-231 : fvctl and network specs
12-
* FLOWVISOR-232 : Error adding flowspace rules with MAC addresses
19+
* FLOWVISOR-230 : fvctl list-slice-info gives confusing error message if you specify a non-existent slice
20+
* FLOWVISOR-231 : fvctl and network specs
21+
* FLOWVISOR-232 : Error adding flowspace rules with MAC addresses
1322

1423
FlowVisor 1.0.5 : May 2 2013
15-
* FLOWVISOR-216 : Undo changes to default port configurations
16-
* Potential fix for FV crashes; awaiting confirmation
24+
* FLOWVISOR-216 : Undo changes to default port configurations
25+
* Potential fix for FV crashes; awaiting confirmation
1726

1827
FlowVisor 1.0.4 : May 1 2013
1928
* FLOWVISOR-226 : fvconfig load hangs

src/org/flowvisor/FlowVisor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class FlowVisor {
4040
public final static int FLOWVISOR_VENDOR_EXTENSION = 0x80000001;
4141

4242
// VERSION
43+
4344
public final static String FLOWVISOR_VERSION = "flowvisor-1.3.0";
4445

4546
public final static int FLOWVISOR_DB_VERSION = 2;

src/org/flowvisor/classifier/FVClassifier.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
import org.openflow.protocol.OFMessage;
7878
import org.openflow.protocol.OFPhysicalPort;
7979
import org.openflow.protocol.OFPort;
80+
import org.openflow.protocol.OFStatisticsReply.OFStatisticsReplyFlags;
8081
import org.openflow.protocol.OFType;
8182
import org.openflow.protocol.OFError.OFHelloFailedCode;
8283
import org.openflow.protocol.action.*;
@@ -133,6 +134,8 @@ public class FVClassifier implements FVEventHandler, FVSendMsg, FlowMapChangedLi
133134
private boolean statsWindowOpen = true;
134135
private HashMap<String, ArrayList<FVFlowStatisticsReply>> flowStats =
135136
new HashMap<String, ArrayList<FVFlowStatisticsReply>>();
137+
private HashMap<String, ArrayList<FVFlowStatisticsReply>> actualStats =
138+
new HashMap<String, ArrayList<FVFlowStatisticsReply>>();
136139
private ConcurrentLinkedQueue<String> toDeleteSlices = new ConcurrentLinkedQueue<String>();
137140

138141
// OFPP_FLOOD
@@ -1008,8 +1011,9 @@ public boolean isRateLimited(String sliceName) {
10081011

10091012
private synchronized ArrayList<FVFlowStatisticsReply> getFlowStats(String sliceName) {
10101013
ArrayList<FVFlowStatisticsReply> stats = new ArrayList<FVFlowStatisticsReply>();
1011-
if (flowStats.get(sliceName) != null)
1012-
stats.addAll(flowStats.get(sliceName));
1014+
if (actualStats.get(sliceName) != null)
1015+
stats.addAll(actualStats.get(sliceName));
1016+
FVLog.log(LogLevel.DEBUG, null, actualStats.toString());
10131017
return stats;
10141018
}
10151019

@@ -1069,7 +1073,7 @@ private boolean matchContainsPort(FVFlowStatisticsReply reply, short outPort) {
10691073
return false;
10701074
}
10711075

1072-
public void sendFlowStatsResp(FVSlicer fvSlicer, FVStatisticsRequest original) {
1076+
public void sendFlowStatsResp(FVSlicer fvSlicer, FVStatisticsRequest original, short flag) {
10731077
FVFlowStatisticsRequest orig = (FVFlowStatisticsRequest) original.getStatistics().get(0);
10741078

10751079

@@ -1093,7 +1097,7 @@ public void sendFlowStatsResp(FVSlicer fvSlicer, FVStatisticsRequest original) {
10931097

10941098
}
10951099
statsReply.setStatistics(stats);
1096-
1100+
statsReply.setFlags(flag);
10971101
statsReply.setXid(original.getXid());
10981102

10991103
statsReply.setVersion(original.getVersion());
@@ -1109,7 +1113,8 @@ public void sendFlowStatsResp(FVSlicer fvSlicer, FVStatisticsRequest original) {
11091113

11101114
//public synchronized void classifyFlowStats(FVStatisticsReply fvStatisticsReply, HashMap<String,Object> cache) {
11111115
public synchronized void classifyFlowStats(FVStatisticsReply fvStatisticsReply) {
1112-
flowStats.clear();
1116+
actualStats.clear();
1117+
11131118
List<OFStatistics> stats = fvStatisticsReply.getStatistics();
11141119

11151120
//Adding for registering a FlowTable
@@ -1138,6 +1143,11 @@ public synchronized void classifyFlowStats(FVStatisticsReply fvStatisticsReply)
11381143
stat.setCookie(pair.getCookie());
11391144
addToFlowStats(stat, pair.getSliceName());
11401145
}
1146+
actualStats.putAll(flowStats);
1147+
FVLog.log(LogLevel.DEBUG, this, " actualStats: ",actualStats.toString(), "flowStats: ", flowStats.toString());
1148+
if ((fvStatisticsReply.getFlags() != OFStatisticsReplyFlags.REPLY_MORE.getTypeValue()) ){
1149+
flowStats.clear();
1150+
}
11411151
for (String slice : toDeleteSlices) {
11421152
cleanUpFlowMods(slice);
11431153
}

src/org/flowvisor/message/statistics/FVFlowStatisticsReply.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import org.flowvisor.message.FVStatisticsRequest;
1818
import org.flowvisor.openflow.protocol.FVMatch.cidrToIp;
1919
import org.flowvisor.slicer.FVSlicer;
20+
2021
import org.openflow.protocol.OFMatch;
2122
import org.openflow.protocol.action.OFAction;
2223
import org.openflow.protocol.action.OFActionDataLayerDestination;
@@ -32,6 +33,8 @@
3233
import org.openflow.protocol.action.OFActionVendor;
3334
import org.openflow.protocol.action.OFActionVirtualLanIdentifier;
3435
import org.openflow.protocol.action.OFActionVirtualLanPriorityCodePoint;
36+
import org.openflow.protocol.OFStatisticsReply.OFStatisticsReplyFlags;
37+
3538
import org.openflow.protocol.statistics.OFFlowStatisticsReply;
3639
import org.openflow.protocol.statistics.OFStatistics;
3740
import org.openflow.protocol.statistics.OFStatisticsType;
@@ -67,10 +70,14 @@ public void classifyFromSwitch(FVStatisticsReply msg, FVClassifier fvClassifier)
6770
return;
6871
}
6972
FVStatisticsRequest original = (FVStatisticsRequest) pair.getOFMessage();
70-
if (original.getStatisticType() == OFStatisticsType.FLOW)
71-
fvClassifier.sendFlowStatsResp(pair.getSlicer(), original);
72-
else if (original.getStatisticType() == OFStatisticsType.AGGREGATE)
73-
fvClassifier.sendAggStatsResp(pair.getSlicer(), original);
73+
74+
if(msg.getFlags() != OFStatisticsReplyFlags.REPLY_MORE.getTypeValue()){
75+
if (original.getStatisticType() == OFStatisticsType.FLOW)
76+
fvClassifier.sendFlowStatsResp(pair.getSlicer(), original, msg.getFlags());
77+
//fvClassifier.sendFlowStatsResp(pair.getSlicer(), original);
78+
else if (original.getStatisticType() == OFStatisticsType.AGGREGATE)
79+
fvClassifier.sendAggStatsResp(pair.getSlicer(), original);
80+
}
7481
}
7582

7683

src/org/flowvisor/message/statistics/FVFlowStatisticsRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public void sliceFromController(FVStatisticsRequest msg, FVClassifier fvClassifi
2626
FVSlicer fvSlicer) {
2727
FVMessageUtil.translateXidMsg(msg,fvClassifier, fvSlicer);
2828
if (!fvClassifier.pollFlowTableStats(msg))
29-
fvClassifier.sendFlowStatsResp(fvSlicer, msg);
29+
fvClassifier.sendFlowStatsResp(fvSlicer, msg, (short)0);
3030

3131
}
3232

0 commit comments

Comments
 (0)