]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Allow interface up events to read speed
authorDonald Sharp <sharpd@nvidia.com>
Tue, 27 Apr 2021 11:15:26 +0000 (07:15 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Sun, 2 May 2021 11:30:02 +0000 (07:30 -0400)
Initially the reading of the speed of an interface happened
upon interface creation and happened until the speed of a link
settled down to a single value.  The speed of an interface
can also change as that a new optic can be inserted that
changes the speed, in which case FRR would see a interface
down (optic removal) and then a interface up (optic insertion).

In this case FRR would not treat this as an event that changed
the speed.  Let's expand the checking a bit more.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/interface.c

index a3134d66478b86f75374c509739d2b222c9dd934..e7357cb302629e396f2d80a730dd4058759b6873 100644 (file)
@@ -1074,6 +1074,9 @@ void if_up(struct interface *ifp)
 
        if (zif->flags & ZIF_FLAG_EVPN_MH_UPLINK)
                zebra_evpn_mh_uplink_oper_update(zif);
+
+       thread_add_timer(zrouter.master, if_zebra_speed_update, ifp, 0,
+                        &zif->speed_update);
 }
 
 /* Interface goes down.  We have to manage different behavior of based