]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: correct a few comments for evpn-mh 11012/head
authoranlan_cs <vic.lan@pica8.com>
Tue, 12 Apr 2022 06:11:57 +0000 (02:11 -0400)
committeranlan_cs <vic.lan@pica8.com>
Tue, 12 Apr 2022 13:33:06 +0000 (09:33 -0400)
Correct a few evpn-mh omissions mainly on type-1 and type-4.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
bgpd/bgp_evpn.c
bgpd/bgp_evpn_mh.c
bgpd/bgp_evpn_mh.h

index 9f3f8389ad226f67a921c387b3f5ecb9ca27e271..7982c2ff60a1a079d299cd02f69f2e863818fcdf 100644 (file)
@@ -3370,7 +3370,9 @@ static int bgp_evpn_install_uninstall_table(struct bgp *bgp, afi_t afi,
 
        assert(attr);
 
-       /* Only type-2, type-3, type-4 and type-5 are supported currently */
+       /* Only type-1, type-2, type-3, type-4 and type-5
+        * are supported currently
+        */
        if (!(evp->prefix.route_type == BGP_EVPN_MAC_IP_ROUTE
              || evp->prefix.route_type == BGP_EVPN_IMET_ROUTE
              || evp->prefix.route_type == BGP_EVPN_ES_ROUTE
@@ -3475,7 +3477,7 @@ static int bgp_evpn_install_uninstall_table(struct bgp *bgp, afi_t afi,
                if (evp->prefix.route_type == BGP_EVPN_ES_ROUTE) {
 
                        /* we will match based on the entire esi to avoid
-                        * imoort of an es route for esi2 into esi1
+                        * import of an es route for esi2 into esi1
                         */
                        es = bgp_evpn_es_find(&evp->prefix.es_addr.esi);
                        if (es && bgp_evpn_is_es_local(es))
@@ -6101,8 +6103,9 @@ bool bgp_evpn_is_prefix_nht_supported(const struct prefix *pfx)
         * EVPN routes should be marked as valid only if the nexthop is
         * reachable. Only if this happens, the route should be imported
         * (into VNI or VRF routing tables) and/or advertised.
-        * Note: This is currently applied for EVPN type-2, type-3 and
-        * type-5 routes. It may be tweaked later on for other routes, or
+        * Note: This is currently applied for EVPN type-1, type-2,
+        * type-3, type-4 and type-5 routes.
+        * It may be tweaked later on for other routes, or
         * even removed completely when all routes are handled.
         */
        if (pfx && pfx->family == AF_EVPN
index ed3716f60123f0ba5b1c1d9e9542324f4906d81f..59a958444d02f538207417480e7e857ce74b7b7b 100644 (file)
@@ -287,7 +287,7 @@ static int bgp_evpn_es_route_uninstall(struct bgp *bgp, struct bgp_evpn_es *es,
        return ret;
 }
 
-/* Install or unistall a Tyoe-4 route in the per-ES routing table */
+/* Install or unistall a Type-4 route in the per-ES routing table */
 int bgp_evpn_es_route_install_uninstall(struct bgp *bgp, struct bgp_evpn_es *es,
                afi_t afi, safi_t safi, struct prefix_evpn *evp,
                struct bgp_path_info *pi, int install)
@@ -378,7 +378,7 @@ int bgp_evpn_mh_route_update(struct bgp *bgp, struct bgp_evpn_es *es,
                        remote_pi = tmp_pi;
        }
 
-       /* we don't expect to see a remote_ri at this point as
+       /* we don't expect to see a remote_pi at this point as
         * an ES route has {esi, vtep_ip} as the key in the ES-rt-table
         * in the VNI-rt-table.
         */
index d9e2e72e4f25635f3a1d2fe017616c45926c22e8..d60c7019e62697f40c6bdb2d90e231d6533b5957 100644 (file)
@@ -50,7 +50,9 @@ struct bgp_evpn_es_frag {
        /* RD for this ES fragment */
        struct prefix_rd prd;
 
-       /* Memory used for linking bgp_evpn_es_rd to bgp_evpn_es->rd_list */
+       /* Memory used for linking bgp_evpn_es_frag to
+        * bgp_evpn_es->es_frag_list
+        */
        struct listnode es_listnode;
 
        /* List of ES-EVIs associated with this fragment */
@@ -59,11 +61,11 @@ struct bgp_evpn_es_frag {
 
 /* Ethernet Segment entry -
  * - Local and remote ESs are maintained in a global RB tree,
- * bgp_mh_info->es_rb_tree using ESI as key
+ *   bgp_mh_info->es_rb_tree using ESI as key
  * - Local ESs are received from zebra (BGP_EVPNES_LOCAL)
  * - Remotes ESs are implicitly created (by reference) by a remote ES-EVI
  *   (BGP_EVPNES_REMOTE)
- * - An ES can be simulatenously LOCAL and REMOTE; infact all LOCAL ESs are
+ * - An ES can be simultaneously LOCAL and REMOTE; infact all LOCAL ESs are
  *   expected to have REMOTE ES peers.
  */
 struct bgp_evpn_es {
@@ -101,7 +103,7 @@ struct bgp_evpn_es {
         */
        struct listnode pend_es_listnode;
 
-       /* [EVPNES_LOCAL] List of RDs for this ES (bgp_evpn_es_rd) */
+       /* [EVPNES_LOCAL] List of RDs for this ES (bgp_evpn_es_frag) */
        struct list *es_frag_list;
        struct bgp_evpn_es_frag *es_base_frag;