summaryrefslogtreecommitdiff
path: root/ofproto/ofproto.c
diff options
context:
space:
mode:
authorVishal Deep Ajmera <vishal.deep.ajmera@ericsson.com>2020-02-03 11:32:46 +0100
committerBen Pfaff <blp@ovn.org>2020-03-06 13:25:23 -0800
commit44810e6d411e36efc56e949fd28d804e9750633e (patch)
treef93ce69ca637eedafac47e0bc65c6a1995463cd0 /ofproto/ofproto.c
parentd57b89f3268dd918cf5800f2887f6e4dd6e3b967 (diff)
downloadopenvswitch-44810e6d411e36efc56e949fd28d804e9750633e.tar.gz
ofproto: Add support to watch controller port liveness in fast-failover group
Currently fast-failover group does not support checking liveness of controller port (OFPP_CONTROLLER). However this feature can be useful for selecting alternate pipeline when controller connection itself is down for e.g. by using local DHCP server to reply for any DHCP request originating from VMs. This patch adds the support for watching controller port liveness in fast- failover group. Controller port is considered live when atleast one of-connection is alive. Example usage: ovs-ofctl add-group br-int 'group_id=1234,type=ff, bucket=watch_port:CONTROLLER,actions:<A>, bucket=watch_port:1,actions:<B> Signed-off-by: Vishal Deep Ajmera <vishal.deep.ajmera@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto.c')
-rw-r--r--ofproto/ofproto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index e2591287d..0fbd6c380 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -1906,7 +1906,8 @@ ofproto_wait(struct ofproto *p)
bool
ofproto_is_alive(const struct ofproto *p)
{
- return connmgr_has_controllers(p->connmgr);
+ return (connmgr_has_controllers(p->connmgr)
+ && connmgr_is_any_controller_admitted(p->connmgr));
}
/* Adds some memory usage statistics for 'ofproto' into 'usage', for use with