From: Donald Sharp Date: Thu, 11 Jun 2020 11:34:18 +0000 (-0400) Subject: zebra: Only install a minimal amount of times X-Git-Tag: base_7.6~489^2~22 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e3b9c0f2f696956aac4f7c58ad73f46b46264dca;p=mirror%2Ffrr.git zebra: Only install a minimal amount of times The code was installing the nexthop group again using the NLM_F_REPLACE function causing extremely large route installation times. This reduces the time from installing 1 million routes from sharpd with a nhg from > 200 seconds ( where I gave up ) to ~15 seconds on my machine for 32 x ecmp. As a side note 1 million routes using master sharpd takes ~50 seconds to do the same thing. Signed-off-by: Donald Sharp --- diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index b4d7df0b53..41754b9f88 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -2553,8 +2553,7 @@ void zebra_nhg_install_kernel(struct nhg_hash_entry *nhe) } if (CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_VALID) - && (!CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED) - || nhe->id >= ZEBRA_NHG_PROTO_LOWER) + && !CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED) && !CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_QUEUED)) { /* Change its type to us since we are installing it */ if (!ZEBRA_NHG_CREATED(nhe))