[ovs-dev] [PATCH 2/9] ovn-controller: Make indexes more broadly available.

Mickey Spiegel mickeys.dev at gmail.com
Tue Dec 6 01:58:57 UTC 2016


On Sun, Dec 4, 2016 at 11:17 PM, Ben Pfaff <blp at ovn.org> wrote:

> This will allow binding_run() to use them in an upcoming commit.
>

I am not sure this is really necessary. See my comments on patch 6.

Acked-by: Mickey Spiegel <mickeys.dev at gmail.com>


> Signed-off-by: Ben Pfaff <blp at ovn.org>
> ---
>  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 fea7841..894af6f 100644
> --- a/ovn/controller/ovn-controller.c
> +++ b/ovn/controller/ovn-controller.c
> @@ -512,6 +512,11 @@ main(int argc, char *argv[])
>          const struct ovsrec_bridge *br_int = get_br_int(&ctx);
>          const char *chassis_id = get_chassis_id(ctx.ovs_idl);
>
> +        struct lport_index lports;
> +        struct mcgroup_index mcgroups;
> +        lport_index_init(&lports, ctx.ovnsb_idl);
> +        mcgroup_index_init(&mcgroups, ctx.ovnsb_idl);
> +
>          const struct sbrec_chassis *chassis = NULL;
>          if (chassis_id) {
>              chassis = chassis_run(&ctx, chassis_id, br_int);
> @@ -524,11 +529,6 @@ main(int argc, char *argv[])
>              patch_run(&ctx, br_int, chassis_id, &local_datapaths,
>                        &patched_datapaths);
>
> -            struct lport_index lports;
> -            struct mcgroup_index mcgroups;
> -            lport_index_init(&lports, ctx.ovnsb_idl);
> -            mcgroup_index_init(&mcgroups, ctx.ovnsb_idl);
> -
>              enum mf_field_id mff_ovn_geneve = ofctrl_run(br_int,
>
> &pending_ct_zones);
>
> @@ -557,10 +557,10 @@ main(int argc, char *argv[])
>                      }
>                  }
>              }
> -            mcgroup_index_destroy(&mcgroups);
> -            lport_index_destroy(&lports);
>          }
>
> +        mcgroup_index_destroy(&mcgroups);
> +        lport_index_destroy(&lports);
>          sset_destroy(&all_lports);
>
>          struct local_datapath *cur_node, *next_node;
> --
> 2.10.2
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list