> > Select a random IPAM mac_prefix if it has not been provided by the user.
> > With this patch the admin can avoid to configure mac_prefix in order to
> > avoid L2 address collisions if multiple OVN deployments share the same
> > broadcast domain.
> > Remove MAC_ADDR_PREFIX definitions/occurrences since now mac_prefix is
> > always provided to ovn-northd
> >
> > Acked-by: Numan Siddique <[email protected]>
> > Tested-by: Miguel Duarte de Mora Barroso <[email protected]>
> > Signed-off-by: Lorenzo Bianconi <[email protected]>
>
> Thanks.
>
> I applied this to master. I folded in the following incremental to save
> a string copy and free.
ack, thx Ben.
Regards,
Lorenzo
>
> diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
> index 69c33ad9f20d..3661681dc33b 100644
> --- a/ovn/northd/ovn-northd.c
> +++ b/ovn/northd/ovn-northd.c
> @@ -7291,14 +7291,13 @@ ovnnb_db_run(struct northd_context *ctx,
> eth_addr_random(&mac_prefix);
> memset(&mac_prefix.ea[3], 0, 3);
>
> - char *addr_prefix = xasprintf("%02"PRIx8":%02"PRIx8":%02"PRIx8,
> - mac_prefix.ea[0], mac_prefix.ea[1],
> - mac_prefix.ea[2]);
> - smap_add(&options, "mac_prefix", addr_prefix);
> + smap_add_format(&options, "mac_prefix",
> + "%02"PRIx8":%02"PRIx8":%02"PRIx8,
> + mac_prefix.ea[0], mac_prefix.ea[1],
> mac_prefix.ea[2]);
> + nbrec_nb_global_verify_options(nb);
> nbrec_nb_global_set_options(nb, &options);
>
> smap_destroy(&options);
> - free(addr_prefix);
> }
>
> cleanup_macam(&macam);
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev