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

Commit 902590b

Browse files
Sumanth SathyanarayanaSumanth Sathyanarayana
authored andcommitted
Merged 1.0.9
2 parents 3376196 + 0be0f47 commit 902590b

File tree

4 files changed

+41
-20
lines changed

4 files changed

+41
-20
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/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 & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
import java.util.ArrayList;
44
import java.util.HashMap;
5-
import java.util.HashSet;
65
import java.util.List;
7-
import java.util.Set;
86

97
import org.flowvisor.classifier.FVClassifier;
108
import org.flowvisor.classifier.XidPairWithMessage;
@@ -32,6 +30,9 @@
3230
import org.openflow.protocol.action.OFActionVendor;
3331
import org.openflow.protocol.action.OFActionVirtualLanIdentifier;
3432
import org.openflow.protocol.action.OFActionVirtualLanPriorityCodePoint;
33+
34+
import org.openflow.protocol.OFStatisticsReply.OFStatisticsReplyFlags;
35+
3536
import org.openflow.protocol.statistics.OFFlowStatisticsReply;
3637
import org.openflow.protocol.statistics.OFStatistics;
3738
import org.openflow.protocol.statistics.OFStatisticsType;
@@ -53,9 +54,6 @@ public class FVFlowStatisticsReply extends OFFlowStatisticsReply implements
5354
@Override
5455
public void classifyFromSwitch(FVStatisticsReply msg, FVClassifier fvClassifier) {
5556
FVLog.log(LogLevel.DEBUG, null, "Inside classifyFromSwitch in FVFlowStatisticsReply");
56-
//Make a map structure out of the FVStatisticsReply msg
57-
HashMap <String, Object> statsMap = new HashMap<String, Object>();
58-
//statsMap = toMap(msg, fvClassifier);
5957

6058
//fvClassifier.classifyFlowStats(msg,statsMap);
6159
fvClassifier.classifyFlowStats(msg);
@@ -67,10 +65,14 @@ public void classifyFromSwitch(FVStatisticsReply msg, FVClassifier fvClassifier)
6765
return;
6866
}
6967
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);
68+
69+
if(msg.getFlags() != OFStatisticsReplyFlags.REPLY_MORE.getTypeValue()){
70+
if (original.getStatisticType() == OFStatisticsType.FLOW)
71+
fvClassifier.sendFlowStatsResp(pair.getSlicer(), original, msg.getFlags());
72+
//fvClassifier.sendFlowStatsResp(pair.getSlicer(), original);
73+
else if (original.getStatisticType() == OFStatisticsType.AGGREGATE)
74+
fvClassifier.sendAggStatsResp(pair.getSlicer(), original);
75+
}
7476
}
7577

7678

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)