Merge pull request #10539 from chiragshah6/evpn_dev1

bgpd: evpn route-map match ead type-1 route-type
This commit is contained in:
Donatas Abraitis 2022-02-19 11:08:29 +02:00 committed by GitHub
commit 13a95e5382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 3 deletions

View File

@ -1039,10 +1039,14 @@ static void *route_match_evpn_route_type_compile(const char *arg)
route_type = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(uint8_t)); route_type = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(uint8_t));
if (strncmp(arg, "ma", 2) == 0) if (strncmp(arg, "ea", 2) == 0)
*route_type = BGP_EVPN_AD_ROUTE;
else if (strncmp(arg, "ma", 2) == 0)
*route_type = BGP_EVPN_MAC_IP_ROUTE; *route_type = BGP_EVPN_MAC_IP_ROUTE;
else if (strncmp(arg, "mu", 2) == 0) else if (strncmp(arg, "mu", 2) == 0)
*route_type = BGP_EVPN_IMET_ROUTE; *route_type = BGP_EVPN_IMET_ROUTE;
else if (strncmp(arg, "es", 2) == 0)
*route_type = BGP_EVPN_ES_ROUTE;
else else
*route_type = BGP_EVPN_IP_PREFIX_ROUTE; *route_type = BGP_EVPN_IP_PREFIX_ROUTE;
@ -4167,14 +4171,18 @@ static const char *parse_evpn_rt_type(const char *num_rt_type)
DEFUN_YANG (match_evpn_route_type, DEFUN_YANG (match_evpn_route_type,
match_evpn_route_type_cmd, match_evpn_route_type_cmd,
"match evpn route-type <macip|2|multicast|3|prefix|5>", "match evpn route-type <ead|1|macip|2|multicast|3|es|4|prefix|5>",
MATCH_STR MATCH_STR
EVPN_HELP_STR EVPN_HELP_STR
EVPN_TYPE_HELP_STR EVPN_TYPE_HELP_STR
EVPN_TYPE_1_HELP_STR
EVPN_TYPE_1_HELP_STR
EVPN_TYPE_2_HELP_STR EVPN_TYPE_2_HELP_STR
EVPN_TYPE_2_HELP_STR EVPN_TYPE_2_HELP_STR
EVPN_TYPE_3_HELP_STR EVPN_TYPE_3_HELP_STR
EVPN_TYPE_3_HELP_STR EVPN_TYPE_3_HELP_STR
EVPN_TYPE_4_HELP_STR
EVPN_TYPE_4_HELP_STR
EVPN_TYPE_5_HELP_STR EVPN_TYPE_5_HELP_STR
EVPN_TYPE_5_HELP_STR) EVPN_TYPE_5_HELP_STR)
{ {
@ -4194,15 +4202,19 @@ DEFUN_YANG (match_evpn_route_type,
DEFUN_YANG (no_match_evpn_route_type, DEFUN_YANG (no_match_evpn_route_type,
no_match_evpn_route_type_cmd, no_match_evpn_route_type_cmd,
"no match evpn route-type <macip|2|multicast|3|prefix|5>", "no match evpn route-type <ead|1|macip|2|multicast|3|es|4|prefix|5>",
NO_STR NO_STR
MATCH_STR MATCH_STR
EVPN_HELP_STR EVPN_HELP_STR
EVPN_TYPE_HELP_STR EVPN_TYPE_HELP_STR
EVPN_TYPE_1_HELP_STR
EVPN_TYPE_1_HELP_STR
EVPN_TYPE_2_HELP_STR EVPN_TYPE_2_HELP_STR
EVPN_TYPE_2_HELP_STR EVPN_TYPE_2_HELP_STR
EVPN_TYPE_3_HELP_STR EVPN_TYPE_3_HELP_STR
EVPN_TYPE_3_HELP_STR EVPN_TYPE_3_HELP_STR
EVPN_TYPE_4_HELP_STR
EVPN_TYPE_4_HELP_STR
EVPN_TYPE_5_HELP_STR EVPN_TYPE_5_HELP_STR
EVPN_TYPE_5_HELP_STR) EVPN_TYPE_5_HELP_STR)
{ {

View File

@ -215,6 +215,18 @@ Route Map Match Command
This is a ZEBRA specific match command. The number is a range from (0-255). This is a ZEBRA specific match command. The number is a range from (0-255).
Matches the originating protocols instance specified. Matches the originating protocols instance specified.
.. clicmd:: match evpn route-type ROUTE_TYPE_NAME
This is a BGP EVPN specific match command. It matches to EVPN route-type
from type-1 (EAD route-type) to type-5 (Prefix route-type).
User can provide in an integral form (1-5) or string form of route-type
(i.e ead, macip, multicast, es, prefix).
.. clicmd:: match evpn vni NUMBER
This is a BGP EVPN specific match command which matches to EVPN VNI id.
The number is a range from (1-6777215).
.. _route-map-set-command: .. _route-map-set-command:
Route Map Set Command Route Map Set Command

View File

@ -532,6 +532,16 @@ module frr-bgp-route-map {
description description
"Prefix route"; "Prefix route";
} }
enum "ead" {
value 3;
description
"Ethernet Auto-Discovery route";
}
enum "es" {
value 4;
description
"Ethernet Segment route";
}
} }
} }
} }