summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@nvidia.com>2021-06-04 02:28:43 +0200
committerDonald Sharp <sharpd@nvidia.com>2022-03-18 12:37:06 +0100
commit7b0db0e43fd470e2d386c36722069c0f8730f6c8 (patch)
tree45d772eb740c08fd8e797832bf8a531801a19c10 /lib
parentbgpd: evpn mh changes to advertise EAD routes with user configured export-rt (diff)
downloadfrr-7b0db0e43fd470e2d386c36722069c0f8730f6c8.tar.xz
frr-7b0db0e43fd470e2d386c36722069c0f8730f6c8.zip
lib, bgpd: changes for EAD-per-ES fragmentation
The EAD-per-ES route carries ECs for all the ES-EVI RTs. As the number of VNIs increase all RTs do not fit into a standard BGP UPDATE (4K) so the route needs to be fragmented. Each fragment is associated with a separate RD and frag-id - 1. Local ES-per-EAD - ES route table - {ES-frag-ID, ESI, ET=0xffffffff, VTEP-IP} global route table - {RD-=ES-frag-RD, ESI, ET=0xffffffff} 2. Remote ES-per-EAD - VNI route table - {ESI, ET=0xffffffff, VTEP-IP} global route table - {RD-=ES-frag-RD, ESI, ET=0xffffffff} Note: The fragment ID is abandoned in the per-VNI routing table. At this point that is acceptable as we dont expect more than one-ES-per-EAD fragment to be imported into the per-VNI routing table. But that may need to be re-worked at a later point. CLI changes (sample with 4 VNIs per-fragment for experimental pruposes) - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> root@torm-11:mgmt:~# vtysh -c "show bgp l2vpn evpn es 03:44:38:39:ff:ff:01:00:00:01" ESI: 03:44:38:39:ff:ff:01:00:00:01 Type: LR RD: 27.0.0.21:3 Originator-IP: 27.0.0.21 Local ES DF preference: 50000 VNI Count: 10 Remote VNI Count: 10 VRF Count: 3 MACIP EVI Path Count: 33 MACIP Global Path Count: 198 Inconsistent VNI VTEP Count: 0 Inconsistencies: - Fragments: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 27.0.0.21:3 EVIs: 4 27.0.0.21:13 EVIs: 4 27.0.0.21:22 EVIs: 2 VTEPs: 27.0.0.22 flags: EA df_alg: preference df_pref: 32767 27.0.0.23 flags: EA df_alg: preference df_pref: 32767 root@torm-11:mgmt:~# vtysh -c "show bgp l2vpn evpn es-evi vni 1002 detail" VNI: 1002 ESI: 03:44:38:39:ff:ff:01:00:00:01 Type: LR ES fragment RD: 27.0.0.21:13 >>>>>>>>>>>>>>>>>>>>>>>>> Inconsistencies: - VTEPs: 27.0.0.22(EV),27.0.0.23(EV) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PS: The number of EVIs per-fragment has been set to 128 and may need further tuning. Ticket: #2632967 Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Diffstat (limited to '')
-rw-r--r--lib/prefix.c7
-rw-r--r--lib/prefix.h1
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/prefix.c b/lib/prefix.c
index 89c5be8f3..4db0c2478 100644
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -915,12 +915,13 @@ static const char *prefixevpn_ead2str(const struct prefix_evpn *p, char *str,
char buf1[INET6_ADDRSTRLEN];
family = IS_IPADDR_V4(&p->prefix.ead_addr.ip) ? AF_INET : AF_INET6;
- snprintf(str, size, "[%d]:[%u]:[%s]:[%d]:[%s]", p->prefix.route_type,
- p->prefix.ead_addr.eth_tag,
+ snprintf(str, size, "[%d]:[%u]:[%s]:[%d]:[%s]:[%u]",
+ p->prefix.route_type, p->prefix.ead_addr.eth_tag,
esi_to_str(&p->prefix.ead_addr.esi, buf, sizeof(buf)),
(family == AF_INET) ? IPV4_MAX_BITLEN : IPV6_MAX_BITLEN,
inet_ntop(family, &p->prefix.ead_addr.ip.ipaddr_v4, buf1,
- sizeof(buf1)));
+ sizeof(buf1)),
+ p->prefix.ead_addr.frag_id);
return str;
}
diff --git a/lib/prefix.h b/lib/prefix.h
index b3545a72b..816a1517e 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -95,6 +95,7 @@ struct evpn_ead_addr {
esi_t esi;
uint32_t eth_tag;
struct ipaddr ip;
+ uint16_t frag_id;
};
struct evpn_macip_addr {