BFD: Decreasing minimal transmit and receive interval
authorNiels van Adrichem <N.L.M.vanAdrichem@tudelft.nl>
Tue, 7 Oct 2014 15:04:13 +0000 (15:04 +0000)
committerAlex Wang <alexw@nicira.com>
Wed, 3 Dec 2014 21:40:50 +0000 (13:40 -0800)
I found the BFD transmit interval was lowerbounded by the default value
without warning, although documentation does not consider a lowerbound.

Testing has been performed with transmit and receive intervals as low as 1
ms, and although CPU overhead was effected (especially with multiple BFD
sessions such as 6 and higher), it worked well.

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

diff --git a/AUTHORS b/AUTHORS
index 5723b93..d6770ad 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -236,6 +236,7 @@ Mike Kruze              mkruze@nicira.com
 Min Chen                ustcer.tonychan@gmail.com
 Mikael Doverhag         mdoverhag@nicira.com
 Nagi Reddy Jonnala      njonnala@Brocade.com
+Niels van Adrichem      N.L.M.vanAdrichem@tudelft.nl
 Niklas Andersson        nandersson@nicira.com
 Pankaj Thakkar          thakkar@nicira.com
 Pasi Kärkkäinen         pasik@iki.fi
index 5c26ae0..8eb8765 100644 (file)
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -396,7 +396,7 @@ bfd_configure(struct bfd *bfd, const char *name, const struct smap *cfg,
     atomic_store(&bfd->check_tnl_key,
                  smap_get_bool(cfg, "check_tnl_key", false));
     min_tx = smap_get_int(cfg, "min_tx", 100);
-    min_tx = MAX(min_tx, 100);
+    min_tx = MAX(min_tx, 1);
     if (bfd->cfg_min_tx != min_tx) {
         bfd->cfg_min_tx = min_tx;
         if (bfd->state != STATE_UP
@@ -407,7 +407,7 @@ bfd_configure(struct bfd *bfd, const char *name, const struct smap *cfg,
     }
 
     min_rx = smap_get_int(cfg, "min_rx", 1000);
-    min_rx = MAX(min_rx, 100);
+    min_rx = MAX(min_rx, 1);
     if (bfd->cfg_min_rx != min_rx) {
         bfd->cfg_min_rx = min_rx;
         if (bfd->state != STATE_UP