diff options
author | Vishal Deep Ajmera <vishal.deep.ajmera@ericsson.com> | 2020-02-03 11:32:46 +0100 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2020-03-06 13:25:23 -0800 |
commit | 44810e6d411e36efc56e949fd28d804e9750633e (patch) | |
tree | f93ce69ca637eedafac47e0bc65c6a1995463cd0 /ofproto/ofproto-dpif-xlate.c | |
parent | d57b89f3268dd918cf5800f2887f6e4dd6e3b967 (diff) | |
download | openvswitch-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-dpif-xlate.c')
-rw-r--r-- | ofproto/ofproto-dpif-xlate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 0b45ecf3d..adf57a5e8 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -1888,9 +1888,12 @@ bucket_is_alive(const struct xlate_ctx *ctx, return (!ofputil_bucket_has_liveness(bucket) || (bucket->watch_port != OFPP_ANY + && bucket->watch_port != OFPP_CONTROLLER && odp_port_is_alive(ctx, bucket->watch_port)) || (bucket->watch_group != OFPG_ANY - && group_is_alive(ctx, bucket->watch_group, depth + 1))); + && group_is_alive(ctx, bucket->watch_group, depth + 1)) + || (bucket->watch_port == OFPP_CONTROLLER + && ofproto_is_alive(&ctx->xbridge->ofproto->up))); } static void |