FRM should use async function on southbound event 54/6754/2
authorAlessandro Boch <aboch@cisco.com>
Tue, 6 May 2014 17:39:18 +0000 (10:39 -0700)
committerAlessandro Boch <aboch@cisco.com>
Wed, 7 May 2014 14:15:54 +0000 (14:15 +0000)
- On reacting to southbound events (switch up/down, ports added/removed, ...)
  FRM is supposed to use asynchronous calls for flows installation/removal.
  This is needed because these events may affect a large number of flows,
  for which we do not want to slow down the processing via sync calls.
  Also, logic has been we never do process synchronously a southbound event.
- In case of port up, FRM was still using a synchronous call.
  This patch is for taking care of that.

Change-Id: I4b6dae0df75ad778ea2f1d555a258a48ea66c57b
Signed-off-by: Alessandro Boch <aboch@cisco.com>
opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java

index f7b647dd721a1f1f9117d95bc3723867574e5064..46008b24c638241c665a7bde863f0ff5052d587a 100644 (file)
@@ -2342,7 +2342,7 @@ public class ForwardingRulesManager implements
         for (FlowConfig flowConfig : flowConfigForNode) {
             if (doesFlowContainNodeConnector(flowConfig.getFlow(), nodeConnector)) {
                 if (flowConfig.installInHw() && !flowConfig.getStatus().equals(StatusCode.SUCCESS.toString())) {
-                    Status status = this.installFlowEntry(flowConfig.getFlowEntry());
+                    Status status = this.installFlowEntryAsync(flowConfig.getFlowEntry());
                     if (!status.isSuccess()) {
                         flowConfig.setStatus(status.getDescription());
                     } else {