Skip to content

Commit 6cf5b79

Browse files
bgpd: backpressure - log error for evpn when route install to zebra fails.
log error for evpn in case route install to zebra fails. Ticket :#3992392 Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
1 parent c4bbb5b commit 6cf5b79

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

bgpd/bgp_zebra.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,7 @@ static void bgp_handle_route_announcements_to_zebra(struct event *e)
17851785
struct bgp_table *table = NULL;
17861786
enum zclient_send_status status = ZCLIENT_SEND_SUCCESS;
17871787
bool install;
1788+
const struct prefix_evpn *evp = NULL;
17881789

17891790
while (count < ZEBRA_ANNOUNCEMENTS_LIMIT) {
17901791
is_evpn = false;
@@ -1796,8 +1797,11 @@ static void bgp_handle_route_announcements_to_zebra(struct event *e)
17961797

17971798
table = bgp_dest_table(dest);
17981799
install = CHECK_FLAG(dest->flags, BGP_NODE_SCHEDULE_FOR_INSTALL);
1799-
if (table->afi == AFI_L2VPN && table->safi == SAFI_EVPN)
1800+
if (table->afi == AFI_L2VPN && table->safi == SAFI_EVPN) {
18001801
is_evpn = true;
1802+
evp = (const struct prefix_evpn *)bgp_dest_get_prefix(
1803+
dest);
1804+
}
18011805

18021806
if (BGP_DEBUG(zebra, ZEBRA))
18031807
zlog_debug("BGP %s%s route %pBD(%s) with dest %p and flags 0x%x to zebra",
@@ -1835,6 +1839,17 @@ static void bgp_handle_route_announcements_to_zebra(struct event *e)
18351839
UNSET_FLAG(dest->flags, BGP_NODE_SCHEDULE_FOR_DELETE);
18361840
}
18371841

1842+
if (is_evpn && status == ZCLIENT_SEND_FAILURE)
1843+
flog_err(EC_BGP_EVPN_FAIL,
1844+
"%s (%u): Failed to %s EVPN %pFX %s route in VNI %u",
1845+
vrf_id_to_name(table->bgp->vrf_id),
1846+
table->bgp->vrf_id,
1847+
install ? "install" : "uninstall", evp,
1848+
evp->prefix.route_type == BGP_EVPN_MAC_IP_ROUTE
1849+
? "MACIP"
1850+
: "IMET",
1851+
dest->za_vpn->vni);
1852+
18381853
bgp_path_info_unlock(dest->za_bgp_pi);
18391854
dest->za_bgp_pi = NULL;
18401855
dest->za_vpn = NULL;

0 commit comments

Comments
 (0)