ofproto-dpif-xlate: Use bfd forwarding status in fast-failover groups.
authorNiels van Adrichem <N.L.M.vanAdrichem@tudelft.nl>
Wed, 15 Oct 2014 13:54:52 +0000 (13:54 +0000)
committerBen Pfaff <blp@nicira.com>
Thu, 16 Oct 2014 16:30:40 +0000 (09:30 -0700)
Integration of each interface' status as confirmed by BFD into the
FastFailover Group table. When BFD is configured and function
bfd_forwarding() reports false, odp_port_is_alive also reports false in
order to have a watched interface report false and omit to another
backup.

Test-suite has been succesfully run, as well as testing with ICMP echo
requests and replies that traffic was succesfully rerouted over the
backup path. More extensive load-consumption tests with a function that
only checked whether (bfd->state == STATE_UP) have been succesfully
performed, but was later changed to use the larger function
bfd_forwarding() as it captures all possible exceptions and is properly
mutually excluded.

Signed-off-by: Niels van Adrichem <n.l.m.vanadrichem@tudelft.nl>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-xlate.c

index 07a1f29..48576ad 100644 (file)
@@ -1247,6 +1247,7 @@ static bool
 odp_port_is_alive(const struct xlate_ctx *ctx, ofp_port_t ofp_port)
 {
     struct xport *xport;
+    struct bfd *bfd;
 
     xport = get_ofp_port(ctx->xbridge, ofp_port);
     if (!xport || xport->config & OFPUTIL_PC_PORT_DOWN ||
@@ -1254,6 +1255,11 @@ odp_port_is_alive(const struct xlate_ctx *ctx, ofp_port_t ofp_port)
         return false;
     }
 
+    bfd = xport->bfd;
+    if (bfd && !bfd_forwarding(bfd)) {
+        return false;
+    }
+
     return true;
 }