[ovs-dev] [PATCH 2/2] bfd: Update bfd status on bfd creation and deletion.

Alex Wang alexw at nicira.com
Wed May 7 18:07:49 UTC 2014


Thx, applied and backported (to branch-2.2) both patches


On Wed, May 7, 2014 at 10:52 AM, Ethan Jackson <ethan at nicira.com> wrote:

> Acked-by: Ethan Jackson <ethan at nicira.com>
>
>
> On Wed, May 7, 2014 at 12:01 AM, Alex Wang <alexw at nicira.com> wrote:
> > Commit 88bf179aa3 (bfd/cfm: Check status change before update
> > status to database.) used a boolean flag to trigger bfd status
> > update.  However, the flag is not set on bfd creation and deletion.
> >
> > To prevent any stale status in database, this commit makes bfd module
> > always set the flag on bfd creation and deletion.
> >
> > Signed-off-by: Alex Wang <alexw at nicira.com>
> > ---
> >  lib/bfd.c |    3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/lib/bfd.c b/lib/bfd.c
> > index 2d53bd2..d83d198 100644
> > --- a/lib/bfd.c
> > +++ b/lib/bfd.c
> > @@ -388,6 +388,8 @@ bfd_configure(struct bfd *bfd, const char *name,
> const struct smap *cfg,
> >          bfd_set_state(bfd, STATE_DOWN, DIAG_NONE);
> >
> >          memcpy(bfd->eth_dst, eth_addr_bfd, ETH_ADDR_LEN);
> > +
> > +        bfd_status_changed(bfd);
> >      }
> >
> >      atomic_store(&bfd->check_tnl_key,
> > @@ -492,6 +494,7 @@ bfd_unref(struct bfd *bfd) OVS_EXCLUDED(mutex)
> >  {
> >      if (bfd && ovs_refcount_unref(&bfd->ref_cnt) == 1) {
> >          ovs_mutex_lock(&mutex);
> > +        bfd_status_changed(bfd);
> >          hmap_remove(all_bfds, &bfd->node);
> >          netdev_close(bfd->netdev);
> >          free(bfd->name);
> > --
> > 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/20140507/f84821fb/attachment-0005.html>


More information about the dev mailing list