On Mon, Jul 26, 2021 at 11:01 AM Dumitru Ceara <[email protected]> wrote:
>
> If the Port_Binding.options map already has the correct values set for
> the 'ipv6_prefix_delegation' and 'ipv6_prefix' keys, don't update the
> map as it will trigger unnecessary jsonrpc messages to be sent on the
> wire towards OVN_Southbound.
>
> Signed-off-by: Dumitru Ceara <[email protected]>
Thanks. I applied to the main branch.
Numan
> ---
> northd/ovn-northd.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index ebe12cace..c20c98d00 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -10199,16 +10199,21 @@ build_ND_RA_flows_for_lrouter_port(
> if (!lrport_is_enabled(op->nbrp)) {
> prefix_delegation = false;
> }
> - smap_add(&options, "ipv6_prefix_delegation",
> - prefix_delegation ? "true" : "false");
> + if (smap_get_bool(&options, "ipv6_prefix_delegation",
> + false) != prefix_delegation) {
> + smap_add(&options, "ipv6_prefix_delegation",
> + prefix_delegation ? "true" : "false");
> + }
>
> bool ipv6_prefix = smap_get_bool(&op->nbrp->options,
> "prefix", false);
> if (!lrport_is_enabled(op->nbrp)) {
> ipv6_prefix = false;
> }
> - smap_add(&options, "ipv6_prefix",
> - ipv6_prefix ? "true" : "false");
> + if (smap_get_bool(&options, "ipv6_prefix", false) != ipv6_prefix) {
> + smap_add(&options, "ipv6_prefix",
> + ipv6_prefix ? "true" : "false");
> + }
> sbrec_port_binding_set_options(op->sb, &options);
>
> smap_destroy(&options);
> --
> 2.27.0
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev