From 1782514fb957d86c0e2510f2e76651345c5c9fb1 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 13 Nov 2020 19:35:20 -0500 Subject: *: Remove route_map_object_t from the system The route_map_object_t was being used to track what protocol we were being called against. But each protocol was only ever calling itself. So we had a variable that was only ever being passed in from route_map_apply that had to be carried against and everyone was testing if that variable was for their own stack. Clean up this route_map_object_t from the entire system. We should speed some stuff up. Yes I know not a bunch but this will add up. Signed-off-by: Donald Sharp --- bgpd/rfapi/vnc_export_bgp.c | 13 +++++-------- bgpd/rfapi/vnc_import_bgp.c | 6 +++--- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'bgpd/rfapi') diff --git a/bgpd/rfapi/vnc_export_bgp.c b/bgpd/rfapi/vnc_export_bgp.c index 11f39b2b8..762cd2596 100644 --- a/bgpd/rfapi/vnc_export_bgp.c +++ b/bgpd/rfapi/vnc_export_bgp.c @@ -290,7 +290,7 @@ void vnc_direct_bgp_add_route_ce(struct bgp *bgp, struct agg_node *rn, info.peer = peer; info.attr = &hattr; ret = route_map_apply(bgp->rfapi_cfg->routemap_export_bgp, - prefix, RMAP_BGP, &info); + prefix, &info); if (ret == RMAP_DENYMATCH) { bgp_attr_flush(&hattr); return; @@ -1033,7 +1033,7 @@ void vnc_direct_bgp_add_nve(struct bgp *bgp, struct rfapi_descriptor *rfd) ret = route_map_apply( rfgn->rfg ->routemap_export_bgp, - p, RMAP_BGP, &info); + p, &info); if (ret == RMAP_DENYMATCH) { bgp_attr_flush(&hattr); continue; @@ -1242,8 +1242,7 @@ static void vnc_direct_add_rn_group_rd(struct bgp *bgp, info.peer = irfd->peer; info.attr = &hattr; - ret = route_map_apply(rfg->routemap_export_bgp, p, RMAP_BGP, - &info); + ret = route_map_apply(rfg->routemap_export_bgp, p, &info); if (ret == RMAP_DENYMATCH) { bgp_attr_flush(&hattr); vnc_zlog_debug_verbose( @@ -1691,8 +1690,7 @@ void vnc_direct_bgp_rh_add_route(struct bgp *bgp, afi_t afi, memset(&info, 0, sizeof(info)); info.peer = peer; info.attr = &hattr; - ret = route_map_apply(hc->routemap_export_bgp, prefix, RMAP_BGP, - &info); + ret = route_map_apply(hc->routemap_export_bgp, prefix, &info); if (ret == RMAP_DENYMATCH) { bgp_attr_flush(&hattr); return; @@ -1917,8 +1915,7 @@ void vnc_direct_bgp_rh_vpn_enable(struct bgp *bgp, afi_t afi) info.attr = &hattr; ret = route_map_apply( hc->routemap_export_bgp, - dest_p, RMAP_BGP, - &info); + dest_p, &info); if (ret == RMAP_DENYMATCH) { bgp_attr_flush(&hattr); vnc_zlog_debug_verbose( diff --git a/bgpd/rfapi/vnc_import_bgp.c b/bgpd/rfapi/vnc_import_bgp.c index 0b6b39b96..097e7942c 100644 --- a/bgpd/rfapi/vnc_import_bgp.c +++ b/bgpd/rfapi/vnc_import_bgp.c @@ -357,7 +357,7 @@ static int process_unicast_route(struct bgp *bgp, /* in */ memset(&info, 0, sizeof(info)); info.peer = peer; info.attr = &hattr; - ret = route_map_apply(rmap, prefix, RMAP_BGP, &info); + ret = route_map_apply(rmap, prefix, &info); if (ret == RMAP_DENYMATCH) { bgp_attr_flush(&hattr); vnc_zlog_debug_verbose( @@ -784,7 +784,7 @@ static void vnc_import_bgp_add_route_mode_plain(struct bgp *bgp, memset(&info, 0, sizeof(info)); info.peer = peer; info.attr = &hattr; - ret = route_map_apply(rmap, prefix, RMAP_BGP, &info); + ret = route_map_apply(rmap, prefix, &info); if (ret == RMAP_DENYMATCH) { bgp_attr_flush(&hattr); vnc_zlog_debug_verbose( @@ -977,7 +977,7 @@ static void vnc_import_bgp_add_route_mode_nvegroup( memset(&path, 0, sizeof(path)); path.peer = peer; path.attr = &hattr; - ret = route_map_apply(rmap, prefix, RMAP_BGP, &path); + ret = route_map_apply(rmap, prefix, &path); if (ret == RMAP_DENYMATCH) { bgp_attr_flush(&hattr); vnc_zlog_debug_verbose( -- cgit v1.2.3