-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[202311] Revert bgp suppress fib pending" (#17882)
- Loading branch information
Showing
36 changed files
with
375 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
src/sonic-frr/patch/0005-Add-support-of-bgp-l3vni-evpn.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
From f5f0018266c98ad96cdbe69ae60d501de21e5600 Mon Sep 17 00:00:00 2001 | ||
From: Stepan Blyschak <stepanb@nvidia.com> | ||
Date: Thu, 20 Oct 2022 13:19:31 +0000 | ||
Subject: [PATCH] From 369bbb4d62aa47d5a6d5157ca6ea819c4cb80f15 Mon Sep 17 | ||
00:00:00 2001 Subject: [PATCH 07/13] Added support of L3VNI EVPN | ||
|
||
This is temp patch till Prefix to ARP indirection is add in neighorch | ||
|
||
Signed-off-by: Kishore Kunal <kishore.kunal@broadcom.com> | ||
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com> | ||
|
||
diff --git a/lib/nexthop.c b/lib/nexthop.c | ||
index 7ebc4fefb..2f7bb0e7b 100644 | ||
--- a/lib/nexthop.c | ||
+++ b/lib/nexthop.c | ||
@@ -813,6 +813,7 @@ void nexthop_copy_no_recurse(struct nexthop *copy, | ||
memcpy(©->src, &nexthop->src, sizeof(nexthop->src)); | ||
memcpy(©->rmap_src, &nexthop->rmap_src, sizeof(nexthop->rmap_src)); | ||
copy->rparent = rparent; | ||
+ memcpy(©->nh_encap.encap_data.rmac, &nexthop->nh_encap.encap_data.rmac, ETH_ALEN); | ||
if (nexthop->nh_label) | ||
nexthop_add_labels(copy, nexthop->nh_label_type, | ||
nexthop->nh_label->num_labels, | ||
diff --git a/lib/nexthop.h b/lib/nexthop.h | ||
index f1309aa52..7b4bbbafd 100644 | ||
--- a/lib/nexthop.h | ||
+++ b/lib/nexthop.h | ||
@@ -66,6 +66,11 @@ enum nh_encap_type { | ||
/* Backup index value is limited */ | ||
#define NEXTHOP_BACKUP_IDX_MAX 255 | ||
|
||
+struct vxlan_nh_encap { | ||
+ vni_t vni; | ||
+ struct ethaddr rmac; | ||
+}; | ||
+ | ||
/* Nexthop structure. */ | ||
struct nexthop { | ||
struct nexthop *next; | ||
@@ -137,7 +142,7 @@ struct nexthop { | ||
/* Encapsulation information. */ | ||
enum nh_encap_type nh_encap_type; | ||
union { | ||
- vni_t vni; | ||
+ struct vxlan_nh_encap encap_data; | ||
} nh_encap; | ||
|
||
/* SR-TE color used for matching SR-TE policies */ | ||
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c | ||
index 79d79d74b..325199eff 100644 | ||
--- a/zebra/rt_netlink.c | ||
+++ b/zebra/rt_netlink.c | ||
@@ -1969,6 +1969,7 @@ static int netlink_route_nexthop_encap(struct nlmsghdr *n, size_t nlen, | ||
struct nexthop *nh) | ||
{ | ||
struct rtattr *nest; | ||
+ struct vxlan_nh_encap* encap_data; | ||
|
||
switch (nh->nh_encap_type) { | ||
case NET_VXLAN: | ||
@@ -1979,9 +1980,21 @@ static int netlink_route_nexthop_encap(struct nlmsghdr *n, size_t nlen, | ||
if (!nest) | ||
return false; | ||
|
||
+ encap_data = &nh->nh_encap.encap_data; | ||
+ | ||
if (!nl_attr_put32(n, nlen, 0 /* VXLAN_VNI */, | ||
- nh->nh_encap.vni)) | ||
+ encap_data->vni)) | ||
+ return false; | ||
+ | ||
+ if (ZEBRA_DEBUG_KERNEL) | ||
+ zlog_debug( | ||
+ "%s: VNI:%d RMAC:%pEA", __func__, encap_data->vni, | ||
+ &encap_data->rmac); | ||
+ | ||
+ if (!nl_attr_put(n, nlen, 1 /* VXLAN_RMAC */, | ||
+ &encap_data->rmac, sizeof(encap_data->rmac))) | ||
return false; | ||
+ | ||
nl_attr_nest_end(n, nest); | ||
break; | ||
} | ||
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c | ||
index c0945eae2..157c33ced 100644 | ||
--- a/zebra/zapi_msg.c | ||
+++ b/zebra/zapi_msg.c | ||
@@ -1605,6 +1605,8 @@ static struct nexthop *nexthop_from_zapi(const struct zapi_nexthop *api_nh, | ||
vtep_ip.ipa_type = IPADDR_V4; | ||
memcpy(&(vtep_ip.ipaddr_v4), &(api_nh->gate.ipv4), | ||
sizeof(struct in_addr)); | ||
+ memcpy(&(nexthop->nh_encap.encap_data.rmac), | ||
+ &api_nh->rmac, ETH_ALEN); | ||
zebra_rib_queue_evpn_route_add( | ||
api_nh->vrf_id, &api_nh->rmac, &vtep_ip, p); | ||
SET_FLAG(nexthop->flags, NEXTHOP_FLAG_EVPN); | ||
@@ -1639,6 +1641,8 @@ static struct nexthop *nexthop_from_zapi(const struct zapi_nexthop *api_nh, | ||
vtep_ip.ipa_type = IPADDR_V6; | ||
memcpy(&vtep_ip.ipaddr_v6, &(api_nh->gate.ipv6), | ||
sizeof(struct in6_addr)); | ||
+ memcpy(&(nexthop->nh_encap.encap_data.rmac), | ||
+ &api_nh->rmac, ETH_ALEN); | ||
zebra_rib_queue_evpn_route_add( | ||
api_nh->vrf_id, &api_nh->rmac, &vtep_ip, p); | ||
SET_FLAG(nexthop->flags, NEXTHOP_FLAG_EVPN); | ||
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c | ||
index f6f436f39..c8511bd28 100644 | ||
--- a/zebra/zebra_dplane.c | ||
+++ b/zebra/zebra_dplane.c | ||
@@ -2917,7 +2917,7 @@ int dplane_ctx_route_init(struct zebra_dplane_ctx *ctx, enum dplane_op_e op, | ||
zl3vni = zl3vni_from_vrf(nexthop->vrf_id); | ||
if (zl3vni && is_l3vni_oper_up(zl3vni)) { | ||
nexthop->nh_encap_type = NET_VXLAN; | ||
- nexthop->nh_encap.vni = zl3vni->vni; | ||
+ nexthop->nh_encap.encap_data.vni = zl3vni->vni; | ||
} | ||
} | ||
|
||
-- | ||
2.17.1 | ||
|
31 changes: 31 additions & 0 deletions
31
src/sonic-frr/patch/0007-ignore-route-from-default-table.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From 1a639f2dcd400997345dab424a2adbc091752661 Mon Sep 17 00:00:00 2001 | ||
From: Stepan Blyschak <stepanb@nvidia.com> | ||
Date: Thu, 20 Oct 2022 13:07:18 +0000 | ||
Subject: [PATCH] From ca66350aecf7db3354019480d11754fabae3a97c Mon Sep 17 | ||
00:00:00 2001 Subject: [PATCH 09/13] ignore route from default table | ||
|
||
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com> | ||
|
||
diff --git a/zebra/dplane_fpm_nl.c b/zebra/dplane_fpm_nl.c | ||
index 0a9fecc9d..b18a96353 100644 | ||
--- a/zebra/dplane_fpm_nl.c | ||
+++ b/zebra/dplane_fpm_nl.c | ||
@@ -814,6 +814,15 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx) | ||
|| op == DPLANE_OP_NH_UPDATE)) | ||
return 0; | ||
|
||
+ /* | ||
+ * Ignore route from default table, because when mgmt port goes down, | ||
+ * zebra will remove the default route and causing ASIC to blackhole IO. | ||
+ */ | ||
+ if (dplane_ctx_get_table(ctx) == RT_TABLE_DEFAULT) { | ||
+ zlog_debug("%s: discard default table route", __func__); | ||
+ return 0; | ||
+ } | ||
+ | ||
nl_buf_len = 0; | ||
|
||
frr_mutex_lock_autounlock(&fnc->obuf_mutex); | ||
-- | ||
2.17.1 | ||
|
Oops, something went wrong.