[ovs-dev] [PATCH ovn v4 2/2] ofctrl: Wait for OVS updates to be processed before updating cur_cfg.
Han Zhou
hzhou at ovn.org
Thu Dec 3 08:31:16 UTC 2020
On Wed, Dec 2, 2020 at 7:31 AM Dumitru Ceara <dceara at redhat.com> wrote:
>
> Fixes: ca278d98a4f5 ("ovn-controller: Initial use of incremental
> Signed-off-by: Dumitru Ceara <dceara at redhat.com>
> ---
> controller/ofctrl.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/controller/ofctrl.c b/controller/ofctrl.c
> index c1bbc58..a1ac695 100644
> --- a/controller/ofctrl.c
> +++ b/controller/ofctrl.c
> @@ -2032,19 +2032,23 @@ ofctrl_put(struct ovn_desired_flow_table
*flow_table,
> bool need_put = false;
> if (flow_changed || skipped_last_time || need_reinstall_flows) {
> need_put = true;
> + old_nb_cfg = nb_cfg;
> } else if (nb_cfg != old_nb_cfg) {
> /* nb_cfg changed since last ofctrl_put() call */
> if (cur_cfg == old_nb_cfg) {
> - /* we were up-to-date already, so just update with the
> - * new nb_cfg */
> - cur_cfg = nb_cfg;
> + /* If there are no updates pending, we were up-to-date
already,
> + * update with the new nb_cfg.
> + */
> + if (ovs_list_is_empty(&flow_updates)) {
> + cur_cfg = nb_cfg;
> + old_nb_cfg = nb_cfg;
> + }
> } else {
> need_put = true;
> + old_nb_cfg = nb_cfg;
> }
> }
>
> - old_nb_cfg = nb_cfg;
> -
> if (!need_put) {
> VLOG_DBG("ofctrl_put not needed");
> return;
>
Thanks! I applied this to master.
More information about the dev
mailing list