forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Why I did it Upgrade FRR to version 8.2.2. Build libyang2 required by FRR. How I did it Update FRR version and tag. How to verify it Following tests were performed on sonic-vs: BGP docker status check BGP configuration and session establishment Route redistribution and ping Issued show commands to check the bgp neighbor and routes Checked app-db to ensure bgp routes are installed with correct interface and nexthop. Create VRF and check FRR knows the VRF Check VRF routes are installed in app-db with correct Vrf name and next-hop Establish BGP Evpn session and check if Evpn routes (multicast, mac, prefix) are exchanged and installed correctly in app-db.
- Loading branch information
1 parent
2ead3aa
commit a477dbb
Showing
24 changed files
with
281 additions
and
596 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
SPATH := $($(LIBYANG2)_SRC_PATH) | ||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/libyang2.mk rules/libyang2.dep | ||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) | ||
DEP_FILES += $(shell git ls-files $(SPATH)) | ||
|
||
$(LIBYANG2)_CACHE_MODE := GIT_CONTENT_SHA | ||
$(LIBYANG2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) | ||
$(LIBYANG2)_DEP_FILES := $(DEP_FILES) | ||
|
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,43 @@ | ||
# libyang2 | ||
|
||
LIBYANG2_VERSION_BASE = 2.0 | ||
LIBYANG2_VERSION = $(LIBYANG2_VERSION_BASE).112 | ||
LIBYANG2_SUBVERSION = 6 | ||
LIBYANG2_FULLVERSION = $(LIBYANG2_VERSION)-$(LIBYANG2_SUBVERSION) | ||
|
||
export LIBYANG2_VERSION_BASE | ||
export LIBYANG2_VERSION | ||
export LIBYANG2_SUBVERSION | ||
export LIBYANG2_FULLVERSION | ||
|
||
LIBYANG2 = libyang2_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(LIBYANG2)_SRC_PATH = $(SRC_PATH)/libyang2 | ||
SONIC_MAKE_DEBS += $(LIBYANG2) | ||
|
||
LIBYANG2_DEV = libyang2-dev_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_DEV))) | ||
|
||
LIBYANG2_DBG = libyang2-dbgsym_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_DBG))) | ||
|
||
LIBYANG2_CPP = libyang2-cpp1_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(LIBYANG2_CPP)_DEPENDS += $(LIBYANG2) | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_CPP))) | ||
|
||
LIBYANG2_CPP_DEV = libyang2-cpp-dev_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_CPP_DEV))) | ||
|
||
LIBYANG2_CPP_DBG = libyang2-cpp1-dbgsym_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_CPP_DBG))) | ||
|
||
YANG_TOOLS = yang-tools_$(LIBYANG2_FULLVERSION)_all.deb | ||
$(YANG_TOOLS)_DEPENDS += $(LIBYANG2) | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(YANG_TOOLS))) | ||
|
||
LIBYANG2_TOOLS = libyang2-tools_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_TOOLS))) | ||
|
||
LIBYANG2_TOOLS_DBG = libyang2-tools-dbgsym_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_TOOLS_DBG))) | ||
|
||
export LIBYANG2 LIBYANG2_DBG LIBYANG2_DEV LIBYANG2_CPP LIBYANG2_CPP_DEV LIBYANG2_CPP_DBG YANG_TOOLS LIBYANG2_TOOLS LIBYANG2_TOOLS_DBG |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!.gitignore | ||
!Makefile |
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,40 @@ | ||
.ONESHELL: | ||
SHELL = /bin/bash | ||
.SHELLFLAGS += -e | ||
|
||
LIBYANG_URL = https://sonicstorage.blob.core.windows.net/debian/pool/main/liby/libyang | ||
|
||
DSC_FILE = libyang2_$(LIBYANG2_FULLVERSION).dsc | ||
ORIG_FILE = libyang2_$(LIBYANG2_VERSION).orig.tar.gz | ||
DEBIAN_FILE = libyang2_$(LIBYANG2_FULLVERSION).debian.tar.xz | ||
|
||
DSC_FILE_URL = $(LIBYANG_URL)/$(DSC_FILE) | ||
ORIG_FILE_URL = $(LIBYANG_URL)/$(ORIG_FILE) | ||
DEBIAN_FILE_URL = $(LIBYANG_URL)/$(DEBIAN_FILE) | ||
|
||
MAIN_TARGET = $(LIBYANG2) | ||
DERIVED_TARGETS = $(LIBYANG2_DEV) $(LIBYANG2_DBG) $(LIBYANG2_TOOLS) $(LIBYANG2_TOOLS_DBG) | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
# Obtaining the libyang | ||
rm -fr ./libyang2-$(LIBYANG2_VERSION) | ||
|
||
# download debian libyang | ||
wget -NO "$(DSC_FILE)" $(DSC_FILE_URL) | ||
wget -NO "$(ORIG_FILE)" $(ORIG_FILE_URL) | ||
wget -NO "$(DEBIAN_FILE)" $(DEBIAN_FILE_URL) | ||
dpkg-source -x libyang2_$(LIBYANG2_FULLVERSION).dsc | ||
|
||
pushd libyang2-$(LIBYANG2_VERSION) | ||
#sed -i 's/set(LIBYANG_MAJOR_SOVERSION 1)/set(LIBYANG_MAJOR_SOVERSION 2)/' CMakeLists.txt | ||
#sed -i 's/libyang2/libyang2/' debian/libyang2.install | ||
# Enable large file support for 32-bit arch | ||
echo 'add_definitions(-D_FILE_OFFSET_BITS=64)' >> CMakeLists.txt | ||
|
||
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) | ||
popd | ||
|
||
# Move the newly-built .deb packages to the destination directory | ||
mv $* $(DERIVED_TARGETS) $(DEST)/ | ||
|
||
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET) |
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
16 changes: 8 additions & 8 deletions
16
src/sonic-frr/patch/0002-Reduce-severity-of-Vty-connected-from-message.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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
From a81d37fc1558c33426a4fb59ff25c6d73a20f210 Mon Sep 17 00:00:00 2001 | ||
From 15274a197e4d3b7ac0f11ca63a5274f1168739f5 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/5] Reduce severity of 'Vty connected from' message | ||
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 077c6f621..3204948b8 100644 | ||
index 8eaf13619..7edeb5538 100644 | ||
--- a/lib/vty.c | ||
+++ b/lib/vty.c | ||
@@ -1859,7 +1859,7 @@ static int vty_accept(struct thread *thread) | ||
@@ -1814,7 +1814,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 %s", | ||
+ zlog_debug("Vty connection from %s", | ||
sockunion2str(&su, buf, SU_ADDRSTRLEN)); | ||
- zlog_info("Vty connection from %pSU", &su); | ||
+ zlog_debug("Vty connection from %pSU", &su); | ||
|
||
vty_create(vty_sock, &su); | ||
|
||
-- | ||
2.29.2.windows.2 | ||
2.12.2 | ||
|
14 changes: 7 additions & 7 deletions
14
src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
From ecc9aa458a34f49744a2b90d3a7ebcce951a8478 Mon Sep 17 00:00:00 2001 | ||
From 39bb40dc4bad4462e4ae9c98580d75fa2c92e032 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/5] Use vrf_id for vrf, not tabled_id | ||
Subject: [PATCH 3/8] 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 2c0741363..0ab92398f 100644 | ||
index ec22c5dd4..aad0156b3 100644 | ||
--- a/zebra/zebra_fpm_netlink.c | ||
+++ b/zebra/zebra_fpm_netlink.c | ||
@@ -286,7 +286,7 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd, | ||
ri->af = rib_dest_af(dest); | ||
@@ -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; | ||
|
||
ri->nlmsg_type = cmd; | ||
- ri->rtm_table = rib_table_info(rib_dest_table(dest))->table_id; | ||
- ri->rtm_table = table_info->table_id; | ||
+ ri->rtm_table = zvrf_id(rib_dest_vrf(dest)); | ||
ri->rtm_protocol = RTPROT_UNSPEC; | ||
|
||
/* | ||
-- | ||
2.29.2.windows.2 | ||
2.12.2 | ||
|
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
Oops, something went wrong.