Skip to content

Commit

Permalink
Revert "Frr 8.2 upgrade (sonic-net#10691)"
Browse files Browse the repository at this point in the history
This reverts commit a477dbb.
  • Loading branch information
yozhao101 committed Jun 14, 2022
1 parent add2fbf commit 28a1071
Show file tree
Hide file tree
Showing 24 changed files with 596 additions and 281 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/Azure/sonic-frr.git
branch = frr/8.2
branch = frr/7.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
4 changes: 2 additions & 2 deletions rules/docker-fpm-frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ DOCKER_FPM_FRR_DBG = $(DOCKER_FPM_FRR_STEM)-$(DBG_IMAGE_MARK).gz
$(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/$(DOCKER_FPM_FRR_STEM)
$(DOCKER_FPM_FRR)_PYTHON_WHEELS += $(SONIC_BGPCFGD) $(SONIC_FRR_MGMT_FRAMEWORK)

$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(FRR_SNMP) $(SWSS) $(LIBYANG2)
$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(FRR_SNMP) $(SWSS) $(LIBYANG1)
$(DOCKER_FPM_FRR)_DBG_DEPENDS = $($(DOCKER_SWSS_LAYER_BUSTER)_DBG_DEPENDS)
$(DOCKER_FPM_FRR)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) \
$(FRR_DBG) $(FRR_SNMP_DBG) $(LIBYANG2_DBG)
$(FRR_DBG) $(FRR_SNMP_DBG) $(LIBYANG1_DBG)

$(DOCKER_FPM_FRR)_DBG_IMAGE_PACKAGES = $($(DOCKER_SWSS_LAYER_BUSTER)_DBG_IMAGE_PACKAGES)

Expand Down
12 changes: 6 additions & 6 deletions rules/frr.mk
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# FRRouting (frr) package

FRR_VERSION = 8.2.2
FRR_VERSION = 7.5.1
FRR_SUBVERSION = 0
FRR_BRANCH = frr/8.2
FRR_TAG = frr-8.2.2
FRR_BRANCH = frr/7.5
FRR_TAG = frr-7.5.1-s1
export FRR_VERSION FRR_SUBVERSION FRR_BRANCH FRR_TAG


FRR = frr_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_$(CONFIGURED_ARCH).deb
$(FRR)_DEPENDS += $(LIBSNMP_DEV) $(LIBYANG2) $(LIBYANG2_DEV)
$(FRR)_RDEPENDS += $(LIBYANG2)
$(FRR)_UNINSTALLS = $(LIBYANG2_DEV) $(LIBYANG2)
$(FRR)_DEPENDS += $(LIBSNMP_DEV) $(LIBYANG1) $(LIBYANG1_DEV)
$(FRR)_RDEPENDS += $(LIBYANG1)
$(FRR)_UNINSTALLS = $(LIBYANG1_DEV) $(LIBYANG1)
$(FRR)_SRC_PATH = $(SRC_PATH)/sonic-frr
SONIC_MAKE_DEBS += $(FRR)

Expand Down
4 changes: 2 additions & 2 deletions rules/libyang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ LIBYANG_PY3 = python3-yang_$(LIBYANG_VERSION)_$(CONFIGURED_ARCH).deb
$(LIBYANG_PY3)_DEPENDS += $(LIBYANG) $(LIBYANG_CPP)
$(eval $(call add_derived_package,$(LIBYANG),$(LIBYANG_PY3)))

$(eval $(call add_conflict_package,$(LIBYANG),$(LIBYANG1),$(LIBYANG2)))
$(eval $(call add_conflict_package,$(LIBYANG_DEV),$(LIBYANG1_DEV),$(LIBYANG2_DEV)))
$(eval $(call add_conflict_package,$(LIBYANG),$(LIBYANG1)))
$(eval $(call add_conflict_package,$(LIBYANG_DEV),$(LIBYANG1_DEV)))

export LIBYANG LIBYANG_DBG LIBYANG_DEV LIBYANG_CPP LIBYANG_PY3
10 changes: 0 additions & 10 deletions rules/libyang2.dep

This file was deleted.

43 changes: 0 additions & 43 deletions rules/libyang2.mk

This file was deleted.

2 changes: 1 addition & 1 deletion sonic-slave-buster/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ RUN apt-get update && apt-get install -y \
imagemagick \
ghostscript \
groff \
libpcre2-dev \
libpcre3-dev \
gawk \
chrpath \
# For frr build
Expand Down
3 changes: 0 additions & 3 deletions src/libyang2/.gitignore

This file was deleted.

40 changes: 0 additions & 40 deletions src/libyang2/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion src/sonic-frr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
git checkout -b $(FRR_BRANCH) origin/$(FRR_BRANCH) || git checkout $(FRR_BRANCH)
stg branch --create $(STG_BRANCH) $(FRR_TAG)
stg import -s ../patch/series
gbp dch --ignore-branch --new-version=$(FRR_VERSION)-sonic-$(FRR_SUBVERSION) --dch-opt="--force-bad-version" --commit --git-author
tools/tarsource.sh -V -e '-sonic'
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
stg undo || true
git clean -xfdf
Expand Down
47 changes: 24 additions & 23 deletions src/sonic-frr/patch/0001-Add-support-of-bgp-tcp-DSCP-value.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
From 4ab192df23362e64d1a11441fae82329388f103e Mon Sep 17 00:00:00 2001
From 71415ae851357025a99b8ead7edf5755a55b6fbb Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Mon, 16 Nov 2020 18:00:12 -0800
Subject: [PATCH 1/8] Add support of bgp tcp DSCP value
Subject: [PATCH 1/5] Add support of bgp tcp DSCP value

---
bgpd/bgp_network.c | 11 ++++-------
bgpd/bgp_vty.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
bgpd/bgpd.c | 1 +
bgpd/bgpd.c | 2 +-
bgpd/bgpd.h | 3 +++
4 files changed, 52 insertions(+), 7 deletions(-)
4 files changed, 52 insertions(+), 8 deletions(-)

diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 3fb7619ed..70c771683 100644
index cae11ae7b..f1d96664d 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -743,11 +743,9 @@ int bgp_connect(struct peer *peer)
@@ -721,11 +721,9 @@ int bgp_connect(struct peer *peer)
#ifdef IPTOS_PREC_INTERNETCONTROL
frr_with_privs(&bgpd_privs) {
if (sockunion_family(&peer->su) == AF_INET)
Expand All @@ -28,7 +28,7 @@ index 3fb7619ed..70c771683 100644
}
#endif

@@ -824,10 +822,9 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen,
@@ -801,10 +799,9 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen,

#ifdef IPTOS_PREC_INTERNETCONTROL
if (sa->sa_family == AF_INET)
Expand All @@ -42,10 +42,10 @@ index 3fb7619ed..70c771683 100644

sockopt_v6only(sa->sa_family, sock);
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 4df2abef8..950d1d25c 100644
index bb2f89f9e..33662b08e 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -1558,6 +1558,42 @@ DEFUN (no_router_bgp,
@@ -1330,6 +1330,42 @@ DEFUN (no_router_bgp,
return CMD_SUCCESS;
}

Expand Down Expand Up @@ -88,7 +88,7 @@ index 4df2abef8..950d1d25c 100644

/* BGP router-id. */

@@ -17053,6 +17089,10 @@ int bgp_config_write(struct vty *vty)
@@ -15549,6 +15585,10 @@ int bgp_config_write(struct vty *vty)
if (CHECK_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER))
vty_out(vty, " no bgp fast-external-failover\n");

Expand All @@ -97,9 +97,9 @@ index 4df2abef8..950d1d25c 100644
+ vty_out(vty, " bgp session-dscp %02X\n", bgp->tcp_dscp >> 2);
+
/* BGP router ID. */
if (bgp->router_id_static.s_addr != INADDR_ANY)
vty_out(vty, " bgp router-id %pI4\n",
@@ -17662,6 +17702,10 @@ void bgp_vty_init(void)
if (bgp->router_id_static.s_addr != 0)
vty_out(vty, " bgp router-id %s\n",
@@ -16057,6 +16097,10 @@ void bgp_vty_init(void)
/* "no router bgp" commands. */
install_element(CONFIG_NODE, &no_router_bgp_cmd);

Expand All @@ -111,31 +111,32 @@ index 4df2abef8..950d1d25c 100644
install_element(BGP_NODE, &bgp_router_id_cmd);
install_element(BGP_NODE, &no_bgp_router_id_cmd);
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 7e528b219..005523544 100644
index cf9ff038d..0e8579843 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -3229,6 +3229,7 @@ static struct bgp *bgp_create(as_t *as, const char *name,
@@ -3069,7 +3069,7 @@ static struct bgp *bgp_create(as_t *as, const char *name,

bgp->evpn_info = XCALLOC(MTYPE_BGP_EVPN_INFO,
sizeof(struct bgp_evpn_info));
-
+ bgp->tcp_dscp = IPTOS_PREC_INTERNETCONTROL;
bgp_evpn_init(bgp);
bgp_evpn_vrf_es_init(bgp);
bgp_pbr_init(bgp);

diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 8b93c450e..e780d8a03 100644
index 2aa069002..914f296e5 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -743,6 +743,9 @@ struct bgp {
@@ -678,6 +678,9 @@ struct bgp {
/* Weighted ECMP related config. */
enum bgp_link_bw_handling lb_handling;

+ /* dscp value for tcp sessions */
+ uint8_t tcp_dscp;
+
/* Process Queue for handling routes */
struct work_queue *process_queue;

QOBJ_FIELDS
};
DECLARE_QOBJ_TYPE(bgp)
--
2.12.2
2.29.2.windows.2

Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
From 15274a197e4d3b7ac0f11ca63a5274f1168739f5 Mon Sep 17 00:00:00 2001
From a81d37fc1558c33426a4fb59ff25c6d73a20f210 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 2/5] 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 077c6f621..3204948b8 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1814,7 +1814,7 @@ static int vty_accept(struct thread *thread)
@@ -1859,7 +1859,7 @@ static int 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);
- zlog_info("Vty connection from %s",
+ zlog_debug("Vty connection from %s",
sockunion2str(&su, buf, SU_ADDRSTRLEN));

vty_create(vty_sock, &su);

--
2.12.2
2.29.2.windows.2

14 changes: 7 additions & 7 deletions src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
From 39bb40dc4bad4462e4ae9c98580d75fa2c92e032 Mon Sep 17 00:00:00 2001
From ecc9aa458a34f49744a2b90d3a7ebcce951a8478 Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Mon, 16 Nov 2020 18:29:46 -0800
Subject: [PATCH 3/8] Use vrf_id for vrf, not tabled_id
Subject: [PATCH 3/5] Use vrf_id for vrf, not tabled_id

---
zebra/zebra_fpm_netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c
index ec22c5dd4..aad0156b3 100644
index 2c0741363..0ab92398f 100644
--- a/zebra/zebra_fpm_netlink.c
+++ b/zebra/zebra_fpm_netlink.c
@@ -287,7 +287,7 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd,
ri->nlmsg_pid = zvrf->zns->netlink_dplane_out.snl.nl_pid;
@@ -286,7 +286,7 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd,
ri->af = rib_dest_af(dest);

ri->nlmsg_type = cmd;
- ri->rtm_table = table_info->table_id;
- ri->rtm_table = rib_table_info(rib_dest_table(dest))->table_id;
+ ri->rtm_table = zvrf_id(rib_dest_vrf(dest));
ri->rtm_protocol = RTPROT_UNSPEC;

/*
--
2.12.2
2.29.2.windows.2

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

Subject: [PATCH 4/5] Allow BGP attr NEXT_HOP to be 0.0.0.0 due to alleviate
the vendor bug
---
bgpd/bgp_route.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index b297ca006..d4b5066c6 100644
index 1c646c03e..df2aa1b4c 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -3625,8 +3625,7 @@ bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi,
@@ -3354,8 +3354,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)) {
Expand All @@ -23,5 +22,5 @@ index b297ca006..d4b5066c6 100644
return true;
}
--
2.12.2
2.29.2.windows.2

Loading

0 comments on commit 28a1071

Please sign in to comment.