One more thing I forgot to mention in the previous round.  All patches
need a Signed-off-by in the commit message which roughly states that
you realize this is going to an open source project, and you have the
right to submit the code (see "SubmittingPatches" for a detailed
explanation).  If you could resend the patch with your signed-off-by,
I'll get this merged.

Thanks,
Ethan

On Tue, May 28, 2013 at 1:53 PM, Pavithra Ramesh <param...@vmware.com> wrote:
> Invoke the function to reconfigure BFD when a port/interface
> is deleted.
> ---
>  lib/bfd.c              |    5 +++--
>  ofproto/ofproto-dpif.c |    2 ++
>  2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/lib/bfd.c b/lib/bfd.c
> index 95dad2d..761c91c 100644
> --- a/lib/bfd.c
> +++ b/lib/bfd.c
> @@ -229,7 +229,8 @@ bfd_get_status(const struct bfd *bfd, struct smap *smap)
>  /* Initializes, destroys, or reconfigures the BFD session 'bfd' (named 
> 'name'),
>   * according to the database configuration contained in 'cfg'.  Takes 
> ownership
>   * of 'bfd', which may be NULL.  Returns a BFD object which may be used as a
> - * handle for the session, or NULL if BFD is not enabled according to 'cfg'. 
> */
> + * handle for the session, or NULL if BFD is not enabled according to 'cfg'.
> + * Also returns NULL if cfg is NULL. */
>  struct bfd *
>  bfd_configure(struct bfd *bfd, const char *name,
>                const struct smap *cfg)
> @@ -246,7 +247,7 @@ bfd_configure(struct bfd *bfd, const char *name,
>          init = true;
>      }
>
> -    if (!smap_get_bool(cfg, "enable", false)) {
> +    if (!cfg || !smap_get_bool(cfg, "enable", false)) {
>          if (bfd) {
>              hmap_remove(&all_bfds, &bfd->node);
>              free(bfd->name);
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index c4f7d25..6eaa348 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -606,6 +606,7 @@ ofport_dpif_cast(const struct ofport *ofport)
>  static void port_run(struct ofport_dpif *);
>  static void port_run_fast(struct ofport_dpif *);
>  static void port_wait(struct ofport_dpif *);
> +static int set_bfd(struct ofport *, const struct smap *);
>  static int set_cfm(struct ofport *, const struct cfm_settings *);
>  static void ofport_clear_priorities(struct ofport_dpif *);
>  static void run_fast_rl(void);
> @@ -1869,6 +1870,7 @@ port_destruct(struct ofport *port_)
>      ofproto->backer->need_revalidate = REV_RECONFIGURE;
>      bundle_remove(port_);
>      set_cfm(port_, NULL);
> +    set_bfd(port_, NULL);
>      if (ofproto->sflow) {
>          dpif_sflow_del_port(ofproto->sflow, port->odp_port);
>      }
> --
> 1.7.0.4
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to