diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-10-15 14:33:58 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-11-16 15:43:35 +0100 |
commit | 5b8d32bd583c180c15e9dba07feb24c68501176d (patch) | |
tree | 0e3157a7285a82990cb4b2a4ce77254e19921725 /bgpd | |
parent | bgpd: Cleanup non-usage of prefix2str in bgp_vpn.c (diff) | |
download | frr-5b8d32bd583c180c15e9dba07feb24c68501176d.tar.xz frr-5b8d32bd583c180c15e9dba07feb24c68501176d.zip |
bgpd: Cleanup bgp_nexthop_set|get function names
The bgp_nexthop_set_node_info and bgp_nexthop_get_node_info
function names were slightly backwards, rename to bgp_node_set and get
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_nexthop.c | 6 | ||||
-rw-r--r-- | bgpd/bgp_nht.c | 20 | ||||
-rw-r--r-- | bgpd/bgp_table.h | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index 9d76a4107..187707760 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -81,7 +81,7 @@ static void bgp_nexthop_cache_reset(struct bgp_table *table) struct bgp_nexthop_cache *bnc; for (rn = bgp_table_top(table); rn; rn = bgp_route_next(rn)) { - bnc = bgp_nexthop_get_node_info(rn); + bnc = bgp_node_get_bgp_nexthop_info(rn); if (!bnc) continue; @@ -92,7 +92,7 @@ static void bgp_nexthop_cache_reset(struct bgp_table *table) } bnc_free(bnc); - bgp_nexthop_set_node_info(rn, NULL); + bgp_node_set_bgp_nexthop_info(rn, NULL); bgp_unlock_node(rn); } } @@ -601,7 +601,7 @@ static void bgp_show_nexthops(struct vty *vty, struct bgp *bgp, int detail) for (rn = bgp_table_top(bgp->nexthop_cache_table[afi]); rn; rn = bgp_route_next(rn)) { - bnc = bgp_nexthop_get_node_info(rn); + bnc = bgp_node_get_bgp_nexthop_info(rn); if (!bnc) continue; diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index 0dce96f43..221bfea93 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -95,7 +95,7 @@ static void bgp_unlink_nexthop_check(struct bgp_nexthop_cache *bnc) } unregister_zebra_rnh(bnc, CHECK_FLAG(bnc->flags, BGP_STATIC_ROUTE)); - bgp_nexthop_set_node_info(bnc->node, NULL); + bgp_node_set_bgp_nexthop_info(bnc->node, NULL); bgp_unlock_node(bnc->node); bnc->node = NULL; bnc_free(bnc); @@ -126,7 +126,7 @@ void bgp_unlink_nexthop_by_peer(struct peer *peer) rn = bgp_node_get(peer->bgp->nexthop_cache_table[afi], &p); - bnc = bgp_nexthop_get_node_info(rn); + bnc = bgp_node_get_bgp_nexthop_info(rn); if (!bnc) return; @@ -183,10 +183,10 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop, else rn = bgp_node_get(bgp_nexthop->nexthop_cache_table[afi], &p); - bnc = bgp_nexthop_get_node_info(rn); + bnc = bgp_node_get_bgp_nexthop_info(rn); if (!bnc) { bnc = bnc_new(); - bgp_nexthop_set_node_info(rn, bnc); + bgp_node_set_bgp_nexthop_info(rn, bnc); bnc->node = rn; bnc->bgp = bgp_nexthop; bgp_lock_node(rn); @@ -293,7 +293,7 @@ void bgp_delete_connected_nexthop(afi_t afi, struct peer *peer) return; } - bnc = bgp_nexthop_get_node_info(rn); + bnc = bgp_node_get_bgp_nexthop_info(rn); if (!bnc) { if (BGP_DEBUG(nht, NHT)) zlog_debug("Cannot find connected NHT node for peer %s on route_node as expected", @@ -318,7 +318,7 @@ void bgp_delete_connected_nexthop(afi_t afi, struct peer *peer) zlog_debug("Freeing connected NHT node %p for peer %s", bnc, peer->host); unregister_zebra_rnh(bnc, 0); - bgp_nexthop_set_node_info(bnc->node, NULL); + bgp_node_set_bgp_nexthop_info(bnc->node, NULL); bgp_unlock_node(bnc->node); bnc_free(bnc); } @@ -371,7 +371,7 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id) return; } - bnc = bgp_nexthop_get_node_info(rn); + bnc = bgp_node_get_bgp_nexthop_info(rn); if (!bnc) { if (BGP_DEBUG(nht, NHT)) { char buf[PREFIX2STR_BUFFER]; @@ -510,7 +510,7 @@ void bgp_cleanup_nexthops(struct bgp *bgp) for (rn = bgp_table_top(bgp->nexthop_cache_table[afi]); rn; rn = bgp_route_next(rn)) { - bnc = bgp_nexthop_get_node_info(rn); + bnc = bgp_node_get_bgp_nexthop_info(rn); if (!bnc) continue; @@ -829,7 +829,7 @@ void bgp_nht_register_nexthops(struct bgp *bgp) for (rn = bgp_table_top(bgp->nexthop_cache_table[afi]); rn; rn = bgp_route_next(rn)) { - bnc = bgp_nexthop_get_node_info(rn); + bnc = bgp_node_get_bgp_nexthop_info(rn); if (!bnc) continue; @@ -867,7 +867,7 @@ void bgp_nht_register_enhe_capability_interfaces(struct peer *peer) return; rn = bgp_node_lookup(bgp->nexthop_cache_table[AFI_IP6], &p); - bnc = bgp_nexthop_get_node_info(rn); + bnc = bgp_node_get_bgp_nexthop_info(rn); if (!bnc) return; diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h index ee21e74a1..77722e515 100644 --- a/bgpd/bgp_table.h +++ b/bgpd/bgp_table.h @@ -365,12 +365,12 @@ static inline void bgp_connected_set_node_info(struct bgp_node *node, } static inline struct bgp_nexthop_cache * -bgp_nexthop_get_node_info(struct bgp_node *node) +bgp_node_get_bgp_nexthop_info(struct bgp_node *node) { return node->info; } -static inline void bgp_nexthop_set_node_info(struct bgp_node *node, +static inline void bgp_node_set_bgp_nexthop_info(struct bgp_node *node, struct bgp_nexthop_cache *bnc) { node->info = bnc; |