Skip to content

Commit 7bdd0d8

Browse files
authored
[frr]: FRR 8.5.1 integration changes (#15965)
Why I did it Upgrading FRR 8.5.1 to include latest fixes. New patches that were added: Patch FRR Pull request Issue fixed 0012-zebra-Rename-vrf_lookup_by_tableid-to-zebra_vrf_look.patch FRRouting/frr#13396 #14866 0013-zebra-Move-protodown_r_bit-to-a-better-spot.patch FRRouting/frr#13396 #14866 0014-zebra-Remove-unused-dplane_intf_delete.patch FRRouting/frr#13396 #14866 0015-zebra-Remove-unused-add-variable.patch FRRouting/frr#13396 #14866 0016-zebra-Remove-duplicate-function-for-netlink-interfac.patch FRRouting/frr#13396 #14866 0017-zebra-Add-code-to-get-set-interface-to-pass-up-from-.patch FRRouting/frr#13396 #14866 0018-zebra-Use-zebra-dplane-for-RTM-link-and-addr.patch FRRouting/frr#13396 #14866 0019-zebra-Abstract-dplane_ctx_route_init-to-init-route-w.patch FRRouting/frr#13757 FRRouting/frr#13754 00020-zebra-Fix-crash-when-dplane_fpm_nl-fails-to-process-.patch FRRouting/frr#13757 FRRouting/frr#13754 Removed patches: Patch Upstream FRR commit that is present in 8.5.1 0001-Add-support-of-bgp-tcp-DSCP-value.patch FRRouting/frr@425bd64 0010-zebra-Note-when-the-netlink-DUMP-command-is-interrup.patch FRRouting/frr@2f71996 0011-bgpd-enhanced-capability-is-always-turned-on-for-int.patch FRRouting/frr@8e89adc 0012-Ensure-ospf_apiclient_lsa_originate-cannot-accidently-write-into-stack.patch FRRouting/frr@d2aeac3 , FRRouting/frr@49efc80, FRRouting/frr@ff6db10 0013-zebra-fix-dplane-fpm-nl-to-allow-for-fast-configuration.patch FRRouting/frr@551fa8c 0014-bgpd-Allow-network-XXX-to-work-with-bgp-suppress-fib.patch FRRouting/frr@4801fc4 0015-zebra-Return-statements-do-not-use-paranthesis.patch FRRouting/frr@871a16c 0016-zebra-Add-zrouter.asic_notification_nexthop_control.patch FRRouting/frr@06525c4 0017-zebra-Re-arrange-fpm_read-to-reduce-code-duplication.patch FRRouting/frr@7d83e13 0018-zebra-Add-dplane_ctx_get-set_flags.patch FRRouting/frr@10388e9 0019-zebra-Rearrange-dplane_ctx_route_init.patch FRRouting/frr@f935122 0020-zebra-Add-ctx-to-netlink-message-parsing.patch FRRouting/frr@45f0a10 0021-zebra-Read-from-the-dplane_fpm_nl-a-route-update.patch FRRouting/frr@a0e1173 0022-zebra-Fix-code-because-missing-backport.patch FRRouting/frr@07fd1f7 0024-zebra-continue-fpm-read-when-we-decide-a-netlink-message-is-not-needed.patch FRRouting/frr@c0275ab 0025-zebra-Send-nht-resolved-entry-up-to-concerned-protoc.patch FRRouting/frr@8ce0e51 0027-bgpd-Ensure-FRR-has-enough-data-to-read-in-peek_for_as4_capability-and-bgp_open_option_parse.patch FRRouting/frr@3e46b43 0028-bgpd-Ensure-that-bgp-open-message-stream-has-enough-data-to-read.patch FRRouting/frr@766eec1 Realigned patches: Old Patch New patch 0002-Reduce-severity-of-Vty-connected-from-message.patch 0001-Reduce-severity-of-Vty-connected-from-message.patch 0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch 0002-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch 0005-nexthops-compare-vrf-only-if-ip-type.patch 0003-nexthops-compare-vrf-only-if-ip-type.patch 0006-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch 0004-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch 0007-Add-support-of-bgp-l3vni-evpn.patch 0005-Add-support-of-bgp-l3vni-evpn.patch 0008-Link-local-scope-was-not-set-while-binding-socket-for-bgp-ipv6-link-local-neighbors.patch 0006-Link-local-scope-was-not-set-while-binding-socket-for-bgp-ipv6-link-local-neighbors.patch 0009-ignore-route-from-default-table.patch 0007-ignore-route-from-default-table.patch 0009-ignore-route-from-default-table.patch 0007-ignore-route-from-default-table.patch 0023-Use-vrf_id-for-vrf-not-tabled_id.patch 0008-Use-vrf_id-for-vrf-not-tabled_id.patch 0026-bgpd-Ensure-suppress-fib-pending-works-with-network-.patch 0009-bgpd-Ensure-suppress-fib-pending-works-with-network-.patch 0029-bgpd-Change-log-level-for-graceful-restart-events.patch 0010-bgpd-Change-log-level-for-graceful-restart-events.patch 0030-zebra-Static-routes-async-notification-do-not-need-t.patch 0011-zebra-Static-routes-async-notification-do-not-need-t.patch How I did it Upgrade FRR submodule. Align the patches. Integrate new patches to fix issues. How to verify it Run sonic-mgmt regression to verify
1 parent c6d1dae commit 7bdd0d8

File tree

48 files changed

+4243
-2301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+4243
-2301
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
[submodule "src/sonic-frr/frr"]
4747
path = src/sonic-frr/frr
4848
url = https://github.com/sonic-net/sonic-frr.git
49-
branch = frr/8.2
49+
branch = frr/8.5
5050
[submodule "platform/p4/p4-hlir/p4-hlir-v1.1"]
5151
path = platform/p4/p4-hlir/p4-hlir-v1.1
5252
url = https://github.com/p4lang/p4-hlir.git

rules/frr.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# FRRouting (frr) package
22

3-
FRR_VERSION = 8.2.2
3+
FRR_VERSION = 8.5.1
44
FRR_SUBVERSION = 0
5-
FRR_BRANCH = frr/8.2
6-
FRR_TAG = frr-8.2.2
5+
FRR_BRANCH = frr/8.5
6+
FRR_TAG = frr-8.5.1
77
export FRR_VERSION FRR_SUBVERSION FRR_BRANCH FRR_TAG
88

99

src/sonic-frr/frr

Submodule frr updated 2022 files

src/sonic-frr/patch/0001-Add-support-of-bgp-tcp-DSCP-value.patch

Lines changed: 0 additions & 141 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
From 15274a197e4d3b7ac0f11ca63a5274f1168739f5 Mon Sep 17 00:00:00 2001
1+
From 69370e52e94c66e06052a7859dd059dfa34fd61e Mon Sep 17 00:00:00 2001
22
From: Pavel Shirshov <[email protected]>
33
Date: Mon, 16 Nov 2020 18:11:47 -0800
4-
Subject: [PATCH 2/8] Reduce severity of 'Vty connected from' message
4+
Subject: [PATCH] From 15274a197e4d3b7ac0f11ca63a5274f1168739f5 Mon Sep 17
5+
00:00:00 2001 Subject: [PATCH 2/8] Reduce severity of 'Vty connected from'
6+
message
57

6-
---
7-
lib/vty.c | 2 +-
8-
1 file changed, 1 insertion(+), 1 deletion(-)
98

109
diff --git a/lib/vty.c b/lib/vty.c
11-
index 8eaf13619..7edeb5538 100644
10+
index ab98ac14e..c32fc13ba 100644
1211
--- a/lib/vty.c
1312
+++ b/lib/vty.c
14-
@@ -1814,7 +1814,7 @@ static int vty_accept(struct thread *thread)
13+
@@ -1843,7 +1843,7 @@ static void vty_accept(struct thread *thread)
1514
zlog_info("can't set sockopt to vty_sock : %s",
1615
safe_strerror(errno));
1716

1817
- zlog_info("Vty connection from %pSU", &su);
1918
+ zlog_debug("Vty connection from %pSU", &su);
2019

2120
vty_create(vty_sock, &su);
22-
21+
}
2322
--
24-
2.12.2
23+
2.17.1
2524

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 44ed2b0d2a2ca6029238118603264e02e2e965f4 Mon Sep 17 00:00:00 2001
2+
From: Pavel Shirshov <[email protected]>
3+
Date: Mon, 16 Nov 2020 18:33:46 -0800
4+
Subject: [PATCH] From afff474c79e0c177e090d1b45d68c9f816a52e3e Mon Sep 17
5+
00:00:00 2001 Subject: [PATCH 4/8] Allow BGP attr NEXT_HOP to be 0.0.0.0 due
6+
to alleviate
7+
8+
9+
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
10+
index f4dff0d80..f00c54c40 100644
11+
--- a/bgpd/bgp_route.c
12+
+++ b/bgpd/bgp_route.c
13+
@@ -3835,8 +3835,7 @@ bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi,
14+
15+
/* If NEXT_HOP is present, validate it. */
16+
if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP)) {
17+
- if (attr->nexthop.s_addr == INADDR_ANY ||
18+
- !ipv4_unicast_valid(&attr->nexthop) ||
19+
+ if (!ipv4_unicast_valid(&attr->nexthop) ||
20+
bgp_nexthop_self(bgp, afi, type, stype, attr, dest))
21+
return true;
22+
}
23+
--
24+
2.17.1
25+

src/sonic-frr/patch/0005-nexthops-compare-vrf-only-if-ip-type.patch renamed to src/sonic-frr/patch/0003-nexthops-compare-vrf-only-if-ip-type.patch

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
From 786087468520db44c55e3566f77438b41f52763f Mon Sep 17 00:00:00 2001
1+
From 2b778b1984c5f88500625a0e96a5ba1d1fe0316c Mon Sep 17 00:00:00 2001
22
From: Pavel Shirshov <[email protected]>
33
Date: Mon, 16 Nov 2020 18:35:01 -0800
4-
Subject: [PATCH 5/8] nexthops compare vrf only if ip type
4+
Subject: [PATCH] From 786087468520db44c55e3566f77438b41f52763f Mon Sep 17
5+
00:00:00 2001 Subject: [PATCH 5/8] nexthops compare vrf only if ip type
56

6-
---
7-
lib/nexthop.c | 12 ++++++------
8-
lib/zclient.c | 12 ++++++------
9-
2 files changed, 12 insertions(+), 12 deletions(-)
107

118
diff --git a/lib/nexthop.c b/lib/nexthop.c
12-
index e17eeb830..a1ce22e3b 100644
9+
index 248acd270..7ebc4fefb 100644
1310
--- a/lib/nexthop.c
1411
+++ b/lib/nexthop.c
1512
@@ -140,12 +140,6 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
@@ -39,10 +36,10 @@ index e17eeb830..a1ce22e3b 100644
3936
if (ret != 0)
4037
return ret;
4138
diff --git a/lib/zclient.c b/lib/zclient.c
42-
index 445837017..c104623b7 100644
39+
index 07c7e5aea..0082b2148 100644
4340
--- a/lib/zclient.c
4441
+++ b/lib/zclient.c
45-
@@ -864,12 +864,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
42+
@@ -869,12 +869,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
4643
{
4744
int ret = 0;
4845

@@ -55,7 +52,7 @@ index 445837017..c104623b7 100644
5552
if (next1->type < next2->type)
5653
return -1;
5754

58-
@@ -885,6 +879,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
55+
@@ -890,6 +884,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
5956
switch (next1->type) {
6057
case NEXTHOP_TYPE_IPV4:
6158
case NEXTHOP_TYPE_IPV6:
@@ -69,5 +66,5 @@ index 445837017..c104623b7 100644
6966
&next2->gate);
7067
if (ret != 0)
7168
--
72-
2.12.2
69+
2.17.1
7370

src/sonic-frr/patch/0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch

Lines changed: 0 additions & 27 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
From 0417036a3aece862c95111d4646ca7508a028165 Mon Sep 17 00:00:00 2001
1+
From ece5d83bebfe2345edf8e18f5af713bd99cc3739 Mon Sep 17 00:00:00 2001
22
From: Ying Xie <[email protected]>
33
Date: Wed, 25 Nov 2020 22:28:43 +0000
4-
Subject: [PATCH] [PATCH 6/8] [frr] remove frr log outchannel to /var/log/frr.log
5-
SONiC runs frr inside a docker and the logs are sent to base image
6-
via rsyslog and recorded already. There is no need to keep the
7-
frr.log inside the docker. It will grow and take all harddrive
8-
space eventually.
4+
Subject: [PATCH] From 0417036a3aece862c95111d4646ca7508a028165 Mon Sep 17
5+
00:00:00 2001 Subject: [PATCH] [PATCH 6/8] [frr] remove frr log outchannel to
6+
/var/log/frr.log SONiC runs frr inside a docker and the logs are sent to base
7+
image via rsyslog and recorded already. There is no need to keep the frr.log
8+
inside the docker. It will grow and take all harddrive space eventually.
99

10-
---
11-
tools/etc/rsyslog.d/45-frr.conf | 19 -------------------
12-
1 file changed, 19 deletions(-)
1310

1411
diff --git a/tools/etc/rsyslog.d/45-frr.conf b/tools/etc/rsyslog.d/45-frr.conf
15-
index feeeb13f1..fcd23d23a 100644
12+
index 75b20d76b..9cdd55762 100644
1613
--- a/tools/etc/rsyslog.d/45-frr.conf
1714
+++ b/tools/etc/rsyslog.d/45-frr.conf
18-
@@ -2,25 +2,6 @@
15+
@@ -2,29 +2,6 @@
1916
# to /var/log/frr/frr.log, then drops the message so it does
2017
# not also go to /var/log/syslog, so the messages are not duplicated
2118

2219
-$outchannel frr_log,/var/log/frr/frr.log
2320
-if $programname == 'babeld' or
2421
- $programname == 'bgpd' or
22+
- $programname == 'bfdd' or
2523
- $programname == 'eigrpd' or
2624
- $programname == 'frr' or
2725
- $programname == 'isisd' or
@@ -31,6 +29,9 @@ index feeeb13f1..fcd23d23a 100644
3129
- $programname == 'ospf6d' or
3230
- $programname == 'ospfd' or
3331
- $programname == 'pimd' or
32+
- $programname == 'pim6d' or
33+
- $programname == 'pathd' or
34+
- $programname == 'pbrd' or
3435
- $programname == 'ripd' or
3536
- $programname == 'ripngd' or
3637
- $programname == 'vrrpd' or
@@ -40,7 +41,7 @@ index feeeb13f1..fcd23d23a 100644
4041
-
4142
if $programname == 'babeld' or
4243
$programname == 'bgpd' or
43-
$programname == 'eigrpd' or
44+
$programname == 'bfdd' or
4445
--
45-
2.12.2
46+
2.17.1
4647

0 commit comments

Comments
 (0)