Giant patch of changes to support OpenFlow 1.3
The following people have contributed to this patch:
- Ali Al-Shabibi <alshabibi.ali@gmail.com>
- Ayaka Koshibe <ayaka@onlab.us>
- Brian O'Connor <bocon@onlab.us>
- Jonathan Hart <jono@onlab.us>
- Matteo Gerola <mgerola@create-net.org>
- Michele Santuari <michele.santuari@create-net.org>
- Pavlin Radoslavov <pavlin@onlab.us>
- Saurav Das <sauravdas@alumni.stanford.edu>
- Toshio Koide <t-koide@onlab.us>
- Yuta HIGUCHI <y-higuchi@onlab.us>
The patch includes the following changes:
- New Floodlight I/O loop / state machine
- New switch/port handling
- New role management (incl. Role.EQUAL)
- Added Floodlight debug framework
- Updates to Controller.java
- Move to Loxigen's OpenflowJ library
- Added OF1.3 support
- Added support for different switches (via DriverManager)
- Updated ONOS modules to use new APIs
- Added and updated unit tests
Change-Id: Ic70a8d50f7136946193d2ba2e4dc0b4bfac5f599
diff --git a/src/main/java/net/floodlightcontroller/core/internal/OFStatisticsFuture.java b/src/main/java/net/floodlightcontroller/core/internal/OFStatisticsFuture.java
index 4651c74..91b81c1 100644
--- a/src/main/java/net/floodlightcontroller/core/internal/OFStatisticsFuture.java
+++ b/src/main/java/net/floodlightcontroller/core/internal/OFStatisticsFuture.java
@@ -24,10 +24,10 @@
import net.floodlightcontroller.core.IOFSwitch;
import net.floodlightcontroller.threadpool.IThreadPoolService;
-import org.openflow.protocol.OFMessage;
-import org.openflow.protocol.OFStatisticsReply;
-import org.openflow.protocol.OFType;
-import org.openflow.protocol.statistics.OFStatistics;
+import org.projectfloodlight.openflow.protocol.OFMessage;
+import org.projectfloodlight.openflow.protocol.OFStatsReply;
+import org.projectfloodlight.openflow.protocol.OFStatsReplyFlags;
+import org.projectfloodlight.openflow.protocol.OFType;
/**
* A concrete implementation that handles asynchronously receiving OFStatistics
@@ -35,7 +35,7 @@
* @author David Erickson (daviderickson@cs.stanford.edu)
*/
public class OFStatisticsFuture extends
- OFMessageFuture<List<OFStatistics>> {
+ OFMessageFuture<List<OFStatsReply>> {
protected volatile boolean finished;
@@ -46,22 +46,23 @@
}
public OFStatisticsFuture(IThreadPoolService tp,
- IOFSwitch sw, int transactionId, long timeout, TimeUnit unit) {
+ IOFSwitch sw, int transactionId, long timeout,
+ TimeUnit unit) {
super(tp, sw, OFType.STATS_REPLY, transactionId, timeout, unit);
init();
}
private void init() {
this.finished = false;
- this.result = new CopyOnWriteArrayList<OFStatistics>();
+ this.result = new CopyOnWriteArrayList<OFStatsReply>();
}
@Override
protected void handleReply(IOFSwitch sw, OFMessage msg) {
- OFStatisticsReply sr = (OFStatisticsReply) msg;
+ OFStatsReply sr = (OFStatsReply) msg;
synchronized (this.result) {
- this.result.addAll(sr.getStatistics());
- if ((sr.getFlags() & 0x1) == 0) {
+ this.result.add(sr);
+ if ( !(sr.getFlags().contains(OFStatsReplyFlags.REPLY_MORE)) ) {
this.finished = true;
}
}