BUG-1988: OF Plugin changes the order of NodeConnector update events 2 28/11428/2
authorMichal Rehak <mirehak@cisco.com>
Sun, 21 Sep 2014 08:54:43 +0000 (10:54 +0200)
committerMichal Rehak <mirehak@cisco.com>
Sun, 21 Sep 2014 22:24:48 +0000 (00:24 +0200)
- processing of messages is now turned on after features delivery
  and service registrations - messages must wait till registration done
- moved enqeueueing of featureReply (for OF-1.0) in front of registration code
  (for registration takes some time during which port updates arrive)

Change-Id: I0a25974b9c51eccb2772af44685c613b83dc098f
Signed-off-by: Michal Rehak <mirehak@cisco.com>
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/ConnectionConductorImpl.java

index c8766105fac067bdc12aab923343faa43c5fc4e7..fe9dc4b4f836419d9a429b9d0ab8c27c480b7f63 100644 (file)
@@ -427,11 +427,6 @@ public class ConnectionConductorImpl implements OpenflowProtocolListener,
             requestPorts();
             requestGroupFeatures();
             requestMeterFeatures();
-        } else if (version == OFConstants.OFP_VERSION_1_0) {
-            //  Because the GetFeaturesOutput contains information about the port
-            //  in OF1.0 (that we would otherwise get from the PortDesc) we have to pass
-            //  it up for parsing to convert into a NodeConnectorUpdate
-            enqueueMessage(featureOutput);
         }
         
         requestDesc();
@@ -445,6 +440,15 @@ public class ConnectionConductorImpl implements OpenflowProtocolListener,
     protected void postHandshakeBasic(GetFeaturesOutput featureOutput,
             Short negotiatedVersion) {
         version = negotiatedVersion;
+        if (version == OFConstants.OFP_VERSION_1_0) {
+            //  Because the GetFeaturesOutput contains information about the port
+            //  in OF1.0 (that we would otherwise get from the PortDesc) we have to pass
+            //  it up for parsing to convert into a NodeConnectorUpdate
+            //
+            // BUG-1988 - this must be the first item in queue in order not to get behind link-up message
+            enqueueMessage(featureOutput);
+        }
+        
         OFSessionUtil.registerSession(this, featureOutput, negotiatedVersion);
         hsPool.shutdown();
         hsPool.purge();