Skip to content

Commit

Permalink
[frr]: FRR 8.5.1 integration changes (sonic-net#15965)
Browse files Browse the repository at this point in the history
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	sonic-net#14866
0013-zebra-Move-protodown_r_bit-to-a-better-spot.patch	FRRouting/frr#13396	sonic-net#14866
0014-zebra-Remove-unused-dplane_intf_delete.patch	FRRouting/frr#13396	sonic-net#14866
0015-zebra-Remove-unused-add-variable.patch	FRRouting/frr#13396	sonic-net#14866
0016-zebra-Remove-duplicate-function-for-netlink-interfac.patch	FRRouting/frr#13396	sonic-net#14866
0017-zebra-Add-code-to-get-set-interface-to-pass-up-from-.patch	FRRouting/frr#13396	sonic-net#14866
0018-zebra-Use-zebra-dplane-for-RTM-link-and-addr.patch	FRRouting/frr#13396	sonic-net#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
  • Loading branch information
dgsudharsan authored and sonic-otn committed Sep 20, 2023
1 parent 00abed6 commit 8b188e8
Show file tree
Hide file tree
Showing 48 changed files with 4,243 additions and 2,301 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
[submodule "src/sonic-frr/frr"]
path = src/sonic-frr/frr
url = https://github.com/sonic-net/sonic-frr.git
branch = frr/8.2
branch = frr/8.5
[submodule "platform/p4/p4-hlir/p4-hlir-v1.1"]
path = platform/p4/p4-hlir/p4-hlir-v1.1
url = https://github.com/p4lang/p4-hlir.git
Expand Down
6 changes: 3 additions & 3 deletions rules/frr.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# FRRouting (frr) package

FRR_VERSION = 8.2.2
FRR_VERSION = 8.5.1
FRR_SUBVERSION = 0
FRR_BRANCH = frr/8.2
FRR_TAG = frr-8.2.2
FRR_BRANCH = frr/8.5
FRR_TAG = frr-8.5.1
export FRR_VERSION FRR_SUBVERSION FRR_BRANCH FRR_TAG


Expand Down
2 changes: 1 addition & 1 deletion src/sonic-frr/frr
Submodule frr updated 2022 files
141 changes: 0 additions & 141 deletions src/sonic-frr/patch/0001-Add-support-of-bgp-tcp-DSCP-value.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
From 15274a197e4d3b7ac0f11ca63a5274f1168739f5 Mon Sep 17 00:00:00 2001
From 69370e52e94c66e06052a7859dd059dfa34fd61e Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Mon, 16 Nov 2020 18:11:47 -0800
Subject: [PATCH 2/8] Reduce severity of 'Vty connected from' message
Subject: [PATCH] From 15274a197e4d3b7ac0f11ca63a5274f1168739f5 Mon Sep 17
00:00:00 2001 Subject: [PATCH 2/8] Reduce severity of 'Vty connected from'
message

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

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

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

vty_create(vty_sock, &su);

}
--
2.12.2
2.17.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 44ed2b0d2a2ca6029238118603264e02e2e965f4 Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Mon, 16 Nov 2020 18:33:46 -0800
Subject: [PATCH] From afff474c79e0c177e090d1b45d68c9f816a52e3e Mon Sep 17
00:00:00 2001 Subject: [PATCH 4/8] Allow BGP attr NEXT_HOP to be 0.0.0.0 due
to alleviate


diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index f4dff0d80..f00c54c40 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -3835,8 +3835,7 @@ bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi,

/* If NEXT_HOP is present, validate it. */
if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP)) {
- if (attr->nexthop.s_addr == INADDR_ANY ||
- !ipv4_unicast_valid(&attr->nexthop) ||
+ if (!ipv4_unicast_valid(&attr->nexthop) ||
bgp_nexthop_self(bgp, afi, type, stype, attr, dest))
return true;
}
--
2.17.1

Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
From 786087468520db44c55e3566f77438b41f52763f Mon Sep 17 00:00:00 2001
From 2b778b1984c5f88500625a0e96a5ba1d1fe0316c Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Mon, 16 Nov 2020 18:35:01 -0800
Subject: [PATCH 5/8] nexthops compare vrf only if ip type
Subject: [PATCH] From 786087468520db44c55e3566f77438b41f52763f Mon Sep 17
00:00:00 2001 Subject: [PATCH 5/8] nexthops compare vrf only if ip type

---
lib/nexthop.c | 12 ++++++------
lib/zclient.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/lib/nexthop.c b/lib/nexthop.c
index e17eeb830..a1ce22e3b 100644
index 248acd270..7ebc4fefb 100644
--- a/lib/nexthop.c
+++ b/lib/nexthop.c
@@ -140,12 +140,6 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
Expand Down Expand Up @@ -39,10 +36,10 @@ index e17eeb830..a1ce22e3b 100644
if (ret != 0)
return ret;
diff --git a/lib/zclient.c b/lib/zclient.c
index 445837017..c104623b7 100644
index 07c7e5aea..0082b2148 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -864,12 +864,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
@@ -869,12 +869,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
{
int ret = 0;

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

@@ -885,6 +879,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
@@ -890,6 +884,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
switch (next1->type) {
case NEXTHOP_TYPE_IPV4:
case NEXTHOP_TYPE_IPV6:
Expand All @@ -69,5 +66,5 @@ index 445837017..c104623b7 100644
&next2->gate);
if (ret != 0)
--
2.12.2
2.17.1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
From 0417036a3aece862c95111d4646ca7508a028165 Mon Sep 17 00:00:00 2001
From ece5d83bebfe2345edf8e18f5af713bd99cc3739 Mon Sep 17 00:00:00 2001
From: Ying Xie <ying.xie@microsoft.com>
Date: Wed, 25 Nov 2020 22:28:43 +0000
Subject: [PATCH] [PATCH 6/8] [frr] remove frr log outchannel to /var/log/frr.log
SONiC runs frr inside a docker and the logs are sent to base image
via rsyslog and recorded already. There is no need to keep the
frr.log inside the docker. It will grow and take all harddrive
space eventually.
Subject: [PATCH] From 0417036a3aece862c95111d4646ca7508a028165 Mon Sep 17
00:00:00 2001 Subject: [PATCH] [PATCH 6/8] [frr] remove frr log outchannel to
/var/log/frr.log SONiC runs frr inside a docker and the logs are sent to base
image via rsyslog and recorded already. There is no need to keep the frr.log
inside the docker. It will grow and take all harddrive space eventually.

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

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

-$outchannel frr_log,/var/log/frr/frr.log
-if $programname == 'babeld' or
- $programname == 'bgpd' or
- $programname == 'bfdd' or
- $programname == 'eigrpd' or
- $programname == 'frr' or
- $programname == 'isisd' or
Expand All @@ -31,6 +29,9 @@ index feeeb13f1..fcd23d23a 100644
- $programname == 'ospf6d' or
- $programname == 'ospfd' or
- $programname == 'pimd' or
- $programname == 'pim6d' or
- $programname == 'pathd' or
- $programname == 'pbrd' or
- $programname == 'ripd' or
- $programname == 'ripngd' or
- $programname == 'vrrpd' or
Expand All @@ -40,7 +41,7 @@ index feeeb13f1..fcd23d23a 100644
-
if $programname == 'babeld' or
$programname == 'bgpd' or
$programname == 'eigrpd' or
$programname == 'bfdd' or
--
2.12.2
2.17.1

Loading

0 comments on commit 8b188e8

Please sign in to comment.