OPNFLWPLUG-1014: Negotiate openflow version for protocol OF 1.4 and above 44/72344/3
authorSomashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
Mon, 28 May 2018 05:38:45 +0000 (11:08 +0530)
committerArunprakash D <d.arunprakash@ericsson.com>
Thu, 31 May 2018 05:52:19 +0000 (05:52 +0000)
OVS2.8 and above communicates with OF 1.4 protocol by default.
Hello message sent by OVS2.8 will have version set as OF 1.4 without
bitmap.

When switch sends hello message without bitmap and the version set is
higher than the controller supported version, controller will send HELLO
message with the bitmap containing list of controller supported OF
versions (OF1.3, OF1.0). Once, ovs receives this HELLO message, it is
negotiating the higher supported common version available in the bitmap.
From then on OVS will send openflow messages with version set as 1.3.

When the HELLO message sent by controller is successful, it should go to
the post handshake steps, instead of waiting for next HELLO message from
switch.

Change-Id: Ibfeb61d14a95482fc2f7c399244fdaaf4ac69396
Signed-off-by: Somashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/connection/HandshakeManagerImpl.java

index e2f9d91f973129315acd441c4d77579eab1e5a6a..e2107dfb73265d0df8be274324330ca1f64e991e 100644 (file)
@@ -169,7 +169,7 @@ public class HandshakeManagerImpl implements HandshakeManager {
     }
 
     private void stepByStepVersionSubStep(Short remoteVersion) throws Exception {
-        if (remoteVersion.equals(lastProposedVersion)) {
+        if (remoteVersion >= lastProposedVersion) {
             postHandshake(lastProposedVersion, getNextXid());
             LOG.trace("ret - OK - switch answered with lastProposedVersion");
         } else {