]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: Add a timer to nexthop group deletion
authorDonald Sharp <sharpd@nvidia.com>
Fri, 29 Oct 2021 12:16:13 +0000 (08:16 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 16 Jun 2022 18:47:19 +0000 (14:47 -0400)
commit35729f38fa5713b923782ca9921c893bb8d3bc25
treed3e5dc01ad463c7ceede2cacf5b53c0a130cbafb
parent382858d01500cf8f2289db17c7b07639b1714848
zebra: Add a timer to nexthop group deletion

Before deleting nexthop groups, that are installed,
from the system, start a timer and hold the nexthop
group for that time.

Suppose you have this scenario

a) create a static route with 1 x ecmp
      creates a nhg with 1 x ecmp
b) create a static route with 2 x ecmp
      creates a nhg with 2 x ecmp
      deletes a's nhg
c) create a static route with 3 x ecmp
      creates a nhg with 3 x ecmp
      deletes b's nhg
d) create a different route with 1 x ecmp
      creates another 1 x ecmp ( since a's ecmp was deleted )
e) create a different route with 2 x ecmp
      creates another 2 x ecmp ( since b's ecmp was deleted )

If you don't delete the nhg, start a timer, the nhg's used
in steps a and b can be reused for steps d and e.  This reduces
overhead work with zebra <-> kernel interactions and improves
the speed of the system.

So modify the code to note that an installed nexthop group should
be kept around a bit and hopefully reused.

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