From 4c582913ec44c4fd53ffef208f8c65046ee004a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Date: Thu, 21 Apr 2022 00:57:23 +0200 Subject: [PATCH] babel: Add route metric smoothing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Babel RTT extension employs metric smoothing to dampen route oscillations in the face of varying RTT values between two peers[0]. This patch implements such dampening in Bird, roughly following the implementation in babeld (i.e., using the same exponential function definition). The main difference is that we calculate everything in the native Bird microsecond time unit (and increase constants accordingly), and that we split out the smoothed metric calculation in two function variants, one that has no side effects and one that does. [0] https://arxiv.org/pdf/1403.3488.pdf Signed-off-by: Toke Høiland-Jørgensen --- doc/bird.sgml | 12 +++++ proto/babel/babel.c | 121 ++++++++++++++++++++++++++++++++++++++++--- proto/babel/babel.h | 16 ++++++ proto/babel/config.Y | 10 +++- 4 files changed, 150 insertions(+), 9 deletions(-) diff --git a/doc/bird.sgml b/doc/bird.sgml index 30bc1cdb..907f2ac6 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1865,6 +1865,7 @@ protocol babel [] { ipv4 { }; ipv6 [sadr] { }; randomize router id ; + metric decay