]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_nexthop.c
bgpd: Avoid memset when tip hash is empty
authorDonald Sharp <sharpd@nvidia.com>
Wed, 16 Sep 2020 21:48:15 +0000 (17:48 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 16 Sep 2020 21:48:15 +0000 (17:48 -0400)
commit3584c85e92b8edfb3a306d26844066bb741a2074
treed73deb4b46c2fc9c5238acc08212efc56c9da537
parentf6374bd9b7bf00aae9d32134e5848ba214e99317
bgpd: Avoid memset when tip hash is empty

The tip hash is only used when we are dealing with
evpn.  In bgp_nexthop_self we are doing a memset
irrelevant of whether we will ever find data.  Yes
hash_lookup will return pretty quickly.

Modify the code to avoid doing a memset in the case
where the tip hash is empty as that we know we'll
never find anything.  With full BGP feeds this
small memset does take some time.

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