On Thu, May 14, 2020 at 2:15 AM Mark Michelson <[email protected]> wrote:
> Acked-by: Mark Michelson <[email protected]> > > Thanks Ilya and Mark. I applied this patch to master. Numan > On 5/13/20 12:50 PM, Ilya Maximets wrote: > > Example of one of the valgrind reports: > > > > 4,012 bytes in 59 blocks are definitely lost in loss record 1,579 of > 1,631 > > at 0x4839748: malloc (vg_replace_malloc.c:308) > > by 0x483BD63: realloc (vg_replace_malloc.c:836) > > by 0x4C8F74: xrealloc (util.c:149) > > by 0x4397E4: add_ipv4_netaddr.isra.0 (ovn-util.c:34) > > by 0x439A65: parse_and_store_addresses (ovn-util.c:141) > > by 0x439CB8: extract_addresses (ovn-util.c:174) > > by 0x439CB8: extract_lsp_addresses (ovn-util.c:189) > > by 0x41A134: fill_ipv6_prefix_state (pinctrl.c:1092) > > by 0x41A134: prepare_ipv6_prefixd (pinctrl.c:1209) > > by 0x41FC57: pinctrl_run (pinctrl.c:2930) > > by 0x4096BB: main (ovn-controller.c:2101) > > > > CC: Numan Siddique <[email protected]> > > CC: Lorenzo Bianconi <[email protected]> > > Fixes: 8be01f4a5329 ("Send service monitor health checks") > > Fixes: e3a398e9146e ("controller: Add ipv6 prefix delegation state > machine") > > Signed-off-by: Ilya Maximets <[email protected]> > > --- > > controller/pinctrl.c | 13 ++++++++----- > > 1 file changed, 8 insertions(+), 5 deletions(-) > > > > diff --git a/controller/pinctrl.c b/controller/pinctrl.c > > index d976ec82b..103198282 100644 > > --- a/controller/pinctrl.c > > +++ b/controller/pinctrl.c > > @@ -1130,6 +1130,7 @@ fill_ipv6_prefix_state(struct ovsdb_idl_txn > *ovnsb_idl_txn, > > smap_destroy(&options); > > } > > pfd->last_used = time_msec(); > > + destroy_lport_addresses(&c_addrs); > > } > > > > return changed; > > @@ -1194,8 +1195,10 @@ prepare_ipv6_prefixd(struct ovsdb_idl_txn > *ovnsb_idl_txn, > > ea = laddrs.ea; > > if (laddrs.n_ipv6_addrs > 0) { > > ip6_addr = laddrs.ipv6_addrs[0].addr; > > + destroy_lport_addresses(&laddrs); > > break; > > } > > + destroy_lport_addresses(&laddrs); > > } > > > > if (eth_addr_is_zero(ea)) { > > @@ -5839,8 +5842,9 @@ sync_svc_monitors(struct ovsdb_idl_txn > *ovnsb_idl_txn, > > > > struct eth_addr ea; > > bool mac_found = false; > > - for (size_t i = 0; i < pb->n_mac; i++) { > > + for (size_t i = 0; i < pb->n_mac && !mac_found; i++) { > > struct lport_addresses laddrs; > > + > > if (!extract_lsp_addresses(pb->mac[i], &laddrs)) { > > continue; > > } > > @@ -5853,14 +5857,13 @@ sync_svc_monitors(struct ovsdb_idl_txn > *ovnsb_idl_txn, > > } > > } > > > > - if (mac_found) { > > - break; > > - } else if (!laddrs.n_ipv4_addrs) { > > + if (!mac_found && !laddrs.n_ipv4_addrs) { > > /* IPv4 address(es) are not configured. Use the first > mac. */ > > ea = laddrs.ea; > > mac_found = true; > > - break; > > } > > + > > + destroy_lport_addresses(&laddrs); > > } > > > > if (!mac_found) { > > > > _______________________________________________ > 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
