Skip to content

Commit

Permalink
ofctrl: Wakeup when entering S_UPDATE_FLOWS.
Browse files Browse the repository at this point in the history
In theory it is possible that ovn-controller tried to install flows by
calling ofctrl_put() while ofctrl is at a state other than
S_UPDATE_FLOWS thus not able to install. So, when entering S_UPDATE_FLOWS,
we should immediately wakeup the main loop so that any pending flows
can be installed without being delayed.

Signed-off-by: Han Zhou <hzhou@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
(cherry picked from commit fbb8e19)
Signed-off-by: Numan Siddique <numans@ovn.org>
  • Loading branch information
hzhou8 authored and numansiddique committed Aug 9, 2022
1 parent a325d9c commit 8684a94
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controller/ofctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,10 @@ run_S_CLEAR_FLOWS(void)
}

state = S_UPDATE_FLOWS;

/* Give a chance for the main loop to call ofctrl_put() in case there were
* pending flows waiting ofctrl state change to S_UPDATE_FLOWS. */
poll_immediate_wake();
}

static void
Expand Down

0 comments on commit 8684a94

Please sign in to comment.