[ovs-dev] [PATCH] ovsdb: Clear 'bfd_status' when bfd is disabled.
Alex Wang
alexw at nicira.com
Thu Sep 12 00:04:21 UTC 2013
Thanks Ansis,
I'll send a separate patch for that.
On Wed, Sep 11, 2013 at 5:02 PM, Ansis Atteka <aatteka at nicira.com> wrote:
> This looks reasonable to me. One comment above.
>
> On Wed, Sep 11, 2013 at 4:39 PM, Alex Wang <alexw at nicira.com> wrote:
> > This commit makes ovsdb clear the 'bfd_status' column
> > when bfd is disabled.
> >
> > Reported-by: Ansis Atteka <aatteka at nicira.com>
> > Signed-off-by: Alex Wang <alexw at nicira.com>
> > ---
> > vswitchd/bridge.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> > index 5e54e0b..f49292b 100644
> > --- a/vswitchd/bridge.c
> > +++ b/vswitchd/bridge.c
> > @@ -2259,8 +2259,9 @@ instant_stats_run(void)
> > iface_refresh_cfm_stats(iface);
> >
> > smap_init(&smap);
> > - if (!ofproto_port_get_bfd_status(br->ofproto,
> iface->ofp_port,
> > - &smap)) {
> > + error = ofproto_port_get_bfd_status(br->ofproto,
> iface->ofp_port,
> > + &smap);
> > + if (!error || error == ENOENT) {
> > ovsrec_interface_set_bfd_status(iface->cfg, &smap);
> > smap_destroy(&smap);
> I would prefer that each smap_init() has corresponding smap_destroy()
> call. I.e. move smap_destroy() out from "if" block.
> > }
> > --
> > 1.7.9.5
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130911/79851026/attachment-0003.html>
More information about the dev
mailing list