[ovs-dev] [PATCH] BFD: Reconfigure BFD on port deletion
Ethan Jackson
ethan at nicira.com
Tue May 28 16:58:04 UTC 2013
Looks good to me. If you would, please add a period to the end of the
first line in the commit message, and update the comment of
bfd_configure() to mention that NULL is an acceptable value for 'cfg'.
Once that's done, I'll merge.
Thanks,
Ethan
On Thu, May 23, 2013 at 7:31 PM, Pavithra Ramesh <paramesh at vmware.com> wrote:
>
>
> Invoke the function to reconfigure BFD when a port/interface
> is deleted.
>
> Signed-off-by: Pavithra Ramesh <paramesh at vmware.com>
> ---
> lib/bfd.c | 2 +-
> ofproto/ofproto-dpif.c | 2 ++
> 2 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/lib/bfd.c b/lib/bfd.c
> index 95dad2d..48c0e38 100644
> --- a/lib/bfd.c
> +++ b/lib/bfd.c
> @@ -246,7 +246,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 8e51655..3c337ab 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -597,6 +597,7 @@ 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_cfm(struct ofport *, const struct cfm_settings *);
> +static int set_bfd(struct ofport *, const struct smap *);
> static void ofport_clear_priorities(struct ofport_dpif *);
> static void run_fast_rl(void);
>
> @@ -1859,6 +1860,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.5.4
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list