summaryrefslogtreecommitdiff
path: root/bgpd/bgp_evpn_mh.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2021-10-26 17:55:54 -0400
committerStephen Worley <sworley@nvidia.com>2022-10-11 16:18:21 -0400
commit852d9f97570045dc4186940d424c856995999fbb (patch)
treef00c5fd3f0777aaa1e5e8a0ccf55707fee671e23 /bgpd/bgp_evpn_mh.c
parent36bac85c7f7b059818a8bc60c08e383369453750 (diff)
bgpd,zebra,lib: bgp evpn vni macip into two tables
Re-work the bgp vni table to use separately keyed tables for type2 routes. So, with type2 routes, we have the main table keyed off of the IP and a new MAC table keyed off of MACs. By separating out the two, we are able to run path selection separately for the neigh and mac. Keeping the two separate is also more in-line with what happens in zebra (they are managed comptletely seperate). With this change type2 routes go into each table like so: ``` Remote MAC-IP -> IP Table & MAC Table Remote MAC -> MAC Table Local MAC-IP -> IP Table Local MAC -> MAC Table ``` The difference for local is necessary because we should not ever allow multiple paths for a local MAC. Also cleaned up the commands for querying the vni tables: ``` show bgp vni all type ... show bgp vni VNI type ... ``` Old commands will be deprecated in a separate commit. Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'bgpd/bgp_evpn_mh.c')
-rw-r--r--bgpd/bgp_evpn_mh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_evpn_mh.c b/bgpd/bgp_evpn_mh.c
index a0ab0881e7..2a5c5d7ec4 100644
--- a/bgpd/bgp_evpn_mh.c
+++ b/bgpd/bgp_evpn_mh.c
@@ -471,7 +471,7 @@ static int bgp_evpn_mh_route_delete(struct bgp *bgp, struct bgp_evpn_es *es,
struct prefix_rd *prd;
if (vpn) {
- rt_table = vpn->route_table;
+ rt_table = vpn->ip_table;
prd = &vpn->prd;
} else {
rt_table = es->route_table;
@@ -960,7 +960,7 @@ static int bgp_evpn_type1_route_update(struct bgp *bgp, struct bgp_evpn_es *es,
bgp_evpn_type1_evi_route_extcomm_build(es, vpn, &attr);
/* First, create (or fetch) route node within the VNI. */
- dest = bgp_node_get(vpn->route_table, (struct prefix *)p);
+ dest = bgp_node_get(vpn->ip_table, (struct prefix *)p);
/* Create or update route entry. */
ret = bgp_evpn_mh_route_update(bgp, es, vpn, afi, safi, dest,