[ovs-dev] [PATCH branch 2.12 2/2] ovn-controller: Fix IP engine run with in-flight messages

Justin Pettit jpettit at ovn.org
Thu Aug 8 17:08:49 UTC 2019


Thanks.  I added a reference to the OVN repo commit and merged this into branch-2.12.

--Justin


> On Aug 5, 2019, at 8:50 AM, Han Zhou <zhouhan at gmail.com> wrote:
> 
> From: Dumitru Ceara <dceara at redhat.com>
> 
> When trying to incrementally process changes even if there are in-flight
> messages we were incorrectly setting the engine_aborted variable to the
> value returned by engine_run. However, engine_run returns true if the
> run was completed.
> 
> This was causing discrepancies between logical flows and openflow flows
> due to the fact that the rerun wasn't happening after an aborted run.
> 
> In order to avoid confusion the engine_aborted variable is now renamed to
> engine_run_done thus avoiding the negated logic.
> 
> CC: Han Zhou <hzhou8 at ebay.com>
> Fixes: a6b7d9f4f047 ("ovn-controller: Fix flow installation latency caused by
> recompute.")
> Acked-by: Han Zhou <hzhou8 at ebay.com>
> Acked-by: Mark Michelson <mmichels at redhat.com>
> Tested-by: Numan Siddique <nusiddiq at redhat.com>
> Signed-off-by: Dumitru Ceara <dceara at redhat.com>
> Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
> ---
> ovn/controller/ovn-controller.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c
> index 54b1aa9..b4a027c 100644
> --- a/ovn/controller/ovn-controller.c
> +++ b/ovn/controller/ovn-controller.c
> @@ -1896,7 +1896,7 @@ main(int argc, char *argv[])
> 
>     uint64_t engine_run_id = 0;
>     uint64_t old_engine_run_id = 0;
> -    bool engine_aborted = false;
> +    bool engine_run_done = true;
> 
>     unsigned int ovs_cond_seqno = UINT_MAX;
>     unsigned int ovnsb_cond_seqno = UINT_MAX;
> @@ -1997,14 +1997,14 @@ main(int argc, char *argv[])
>                              * this round of engine_run and continue processing
>                              * acculated changes incrementally later when
>                              * ofctrl_can_put() returns true. */
> -                            if (!engine_aborted) {
> +                            if (engine_run_done) {
>                                 engine_set_abort_recompute(true);
> -                                engine_aborted = engine_run(&en_flow_output,
> -                                                            ++engine_run_id);
> +                                engine_run_done = engine_run(&en_flow_output,
> +                                                             ++engine_run_id);
>                             }
>                         } else {
>                             engine_set_abort_recompute(false);
> -                            engine_aborted = false;
> +                            engine_run_done = true;
>                             engine_run(&en_flow_output, ++engine_run_id);
>                         }
>                     }
> @@ -2048,8 +2048,8 @@ main(int argc, char *argv[])
>                 }
> 
>             }
> -            if (old_engine_run_id == engine_run_id || engine_aborted) {
> -                if (engine_aborted || engine_need_run(&en_flow_output)) {
> +            if (old_engine_run_id == engine_run_id || !engine_run_done) {
> +                if (!engine_run_done || engine_need_run(&en_flow_output)) {
>                     VLOG_DBG("engine did not run, force recompute next time: "
>                              "br_int %p, chassis %p", br_int, chassis);
>                     engine_set_force_recompute(true);
> -- 
> 2.1.0
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev



More information about the dev mailing list