]> git.proxmox.com Git - mirror_frr.git/commit
zebra: When registering a nexthop, we do not always need to re-eval
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 23 Aug 2018 20:05:02 +0000 (16:05 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 25 Aug 2018 12:11:01 +0000 (08:11 -0400)
commit1d30d1f4a8241ca45df4eb70181211f5af0ff487
treea3891c6bd1bc53c1d0d21e3f9d9620322638eb72
parent9b8c3903bdf0f681df17a532286bc717e1f607ad
zebra: When registering a nexthop, we do not always need to re-eval

The code prior to this change, was allowing clients to register
for nexthop tracking.  Then zebra would look up the rnh and
send to that particular client any known data.  Additionally
zebra was blindly re-evaluating the rnh for every registration.

This leads to interesting behavior in that all people registered
for that nexthop will get callbacks even if nothing changes.

Modify the code to know if we have evaluated the rnh or not
and if so limit the re-evaluation to when absolutely necessary

This is of particular importance to do because of nht callbacks
for protocols cause those protocols to do not insignificant
work and as more protocols are registering for nht callbacks
we will cause more work than is necessary.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zapi_msg.c
zebra/zebra_rnh.c
zebra/zebra_rnh.h