[ovs-dev] [PATCH 2/3] ovn-controller-vtep: Call binding_cleanup() before gateway_cleanup().

Russell Bryant rbryant at redhat.com
Tue Aug 18 15:10:11 UTC 2015


On 08/17/2015 11:29 PM, Alex Wang wrote:
> Otherwise, binding_cleanup() will be a no-op since all related chassis
> entries are deleted in gateway_cleanup().
> 
> Found by inspection.
> 
> Signed-off-by: Alex Wang <alexw at nicira.com>
> ---
>  ovn/controller-vtep/ovn-controller-vtep.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/ovn/controller-vtep/ovn-controller-vtep.c b/ovn/controller-vtep/ovn-controller-vtep.c
> index 9a3f03b..ff25319 100644
> --- a/ovn/controller-vtep/ovn-controller-vtep.c
> +++ b/ovn/controller-vtep/ovn-controller-vtep.c
> @@ -124,8 +124,8 @@ main(int argc, char *argv[])
>  
>          /* Run all of the cleanup functions, even if one of them returns false.
>           * We're done if all of them return true. */
> -        done = gateway_cleanup(&ctx);
> -        done = binding_cleanup(&ctx) && done;
> +        done = binding_cleanup(&ctx);
> +        done = gateway_cleanup(&ctx) && done;
>          if (done) {
>              poll_immediate_wake();
>          }
> 

This makes clenaup happen in the opposite order of the run() functions,
which makes sense, dependency wise.  lgtm.

Acked-by: Russell Bryant <rbryant at redhat.com>

-- 
Russell Bryant



More information about the dev mailing list