From e23bb25508cb0a2b7a34013ee9111e3958e151ea Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Thu, 19 Mar 2020 14:55:38 -0700 Subject: [PATCH 1/4] [FRR]: Update frr to latest 7.2.1 --- rules/frr.mk | 2 +- src/sonic-frr/frr | 2 +- ...nexthops-compare-vrf-only-if-ip-type.patch | 73 ------------------- src/sonic-frr/patch/series | 1 - 4 files changed, 2 insertions(+), 76 deletions(-) delete mode 100644 src/sonic-frr/patch/0005-nexthops-compare-vrf-only-if-ip-type.patch diff --git a/rules/frr.mk b/rules/frr.mk index 6b2e92fcbd2e..df924c8af711 100644 --- a/rules/frr.mk +++ b/rules/frr.mk @@ -3,7 +3,7 @@ FRR_VERSION = 7.2.1 FRR_SUBVERSION = 0 FRR_BRANCH = frr/7.2 -FRR_TAG = frr-7.2.1-s1 +FRR_TAG = frr-7.2.1-s3 export FRR_VERSION FRR_SUBVERSION FRR_BRANCH FRR_TAG diff --git a/src/sonic-frr/frr b/src/sonic-frr/frr index 90446e3c3310..2f3f691f44ea 160000 --- a/src/sonic-frr/frr +++ b/src/sonic-frr/frr @@ -1 +1 @@ -Subproject commit 90446e3c3310001a7b84017fa4b237ea7914f45e +Subproject commit 2f3f691f44ea0194a145aed59606fdd0f33ecdb4 diff --git a/src/sonic-frr/patch/0005-nexthops-compare-vrf-only-if-ip-type.patch b/src/sonic-frr/patch/0005-nexthops-compare-vrf-only-if-ip-type.patch deleted file mode 100644 index 343f1b3262d9..000000000000 --- a/src/sonic-frr/patch/0005-nexthops-compare-vrf-only-if-ip-type.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 2f0b5aef66316b47d2cc8ac18453600621a6a317 Mon Sep 17 00:00:00 2001 -From: Tyler Li -Date: Thu, 14 Nov 2019 23:46:52 -0800 -Subject: [PATCH] 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 cf5bed3d6..7d9f646c9 100644 ---- a/lib/nexthop.c -+++ b/lib/nexthop.c -@@ -105,12 +105,6 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1, - { - int ret = 0; - -- if (next1->vrf_id < next2->vrf_id) -- return -1; -- -- if (next1->vrf_id > next2->vrf_id) -- return 1; -- - if (next1->type < next2->type) - return -1; - -@@ -120,6 +114,12 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1, - switch (next1->type) { - case NEXTHOP_TYPE_IPV4: - case NEXTHOP_TYPE_IPV6: -+ if (next1->vrf_id < next2->vrf_id) -+ return -1; -+ -+ if (next1->vrf_id > next2->vrf_id) -+ return 1; -+ - ret = _nexthop_gateway_cmp(next1, next2); - if (ret != 0) - return ret; -diff --git a/lib/zclient.c b/lib/zclient.c -index c739af043..0d37c46d1 100644 ---- a/lib/zclient.c -+++ b/lib/zclient.c -@@ -783,12 +783,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1, - { - int ret = 0; - -- if (next1->vrf_id < next2->vrf_id) -- return -1; -- -- if (next1->vrf_id > next2->vrf_id) -- return 1; -- - if (next1->type < next2->type) - return -1; - -@@ -798,6 +792,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1, - switch (next1->type) { - case NEXTHOP_TYPE_IPV4: - case NEXTHOP_TYPE_IPV6: -+ if (next1->vrf_id < next2->vrf_id) -+ return -1; -+ -+ if (next1->vrf_id > next2->vrf_id) -+ return 1; -+ - ret = nexthop_g_addr_cmp(next1->type, &next1->gate, - &next2->gate); - if (ret != 0) --- -2.11.0 - diff --git a/src/sonic-frr/patch/series b/src/sonic-frr/patch/series index 13619c87ff65..233021ace50b 100644 --- a/src/sonic-frr/patch/series +++ b/src/sonic-frr/patch/series @@ -2,5 +2,4 @@ 0002-Reduce-severity-of-Vty-connected-from-message.patch 0003-Use-vrf_id-for-vrf-not-tabled_id.patch 0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch -0005-nexthops-compare-vrf-only-if-ip-type.patch 0006-changes-for-making-snmp-socket-non-blocking.patch From e0d0e90b06b95111a8b3160c9d6abba1576c90fd Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Mon, 23 Mar 2020 14:33:51 -0700 Subject: [PATCH 2/4] Remove one more patch --- ...003-Use-vrf_id-for-vrf-not-tabled_id.patch | 35 ------------------- src/sonic-frr/patch/series | 1 - 2 files changed, 36 deletions(-) delete mode 100644 src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.patch diff --git a/src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.patch b/src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.patch deleted file mode 100644 index c9a8c0081994..000000000000 --- a/src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9e7f1de3b79ca6ada8a3124f4cdc35530284832e Mon Sep 17 00:00:00 2001 -From: Pavel Shirshov -Date: Tue, 5 Nov 2019 06:16:51 -0800 -Subject: [PATCH 1/1] Use vrf_id for vrf, not tabled_id - ---- - zebra/zebra_fpm_netlink.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c -index f347d3955..74aab8228 100644 ---- a/zebra/zebra_fpm_netlink.c -+++ b/zebra/zebra_fpm_netlink.c -@@ -284,7 +284,6 @@ static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd, - rib_dest_t *dest, struct route_entry *re) - { - struct nexthop *nexthop; -- struct zebra_vrf *zvrf; - - memset(ri, 0, sizeof(*ri)); - -@@ -292,9 +291,7 @@ static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd, - ri->af = rib_dest_af(dest); - - ri->nlmsg_type = cmd; -- zvrf = rib_dest_vrf(dest); -- if (zvrf) -- ri->rtm_table = zvrf->table_id; -+ ri->rtm_table = zvrf_id(rib_dest_vrf(dest)); - ri->rtm_protocol = RTPROT_UNSPEC; - - /* --- -2.17.1.windows.2 - diff --git a/src/sonic-frr/patch/series b/src/sonic-frr/patch/series index 233021ace50b..45ba556e8d9a 100644 --- a/src/sonic-frr/patch/series +++ b/src/sonic-frr/patch/series @@ -1,5 +1,4 @@ 0001-Add-support-of-bgp-tcp-DSCP-value.patch 0002-Reduce-severity-of-Vty-connected-from-message.patch -0003-Use-vrf_id-for-vrf-not-tabled_id.patch 0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch 0006-changes-for-making-snmp-socket-non-blocking.patch From c88abdab25f618675d80f50aecc98c2ccc8721e3 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Tue, 24 Mar 2020 13:01:56 -0700 Subject: [PATCH 3/4] Revert "Remove one more patch" This reverts commit e0d0e90b06b95111a8b3160c9d6abba1576c90fd. --- ...003-Use-vrf_id-for-vrf-not-tabled_id.patch | 35 +++++++++++++++++++ src/sonic-frr/patch/series | 1 + 2 files changed, 36 insertions(+) create mode 100644 src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.patch diff --git a/src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.patch b/src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.patch new file mode 100644 index 000000000000..c9a8c0081994 --- /dev/null +++ b/src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.patch @@ -0,0 +1,35 @@ +From 9e7f1de3b79ca6ada8a3124f4cdc35530284832e Mon Sep 17 00:00:00 2001 +From: Pavel Shirshov +Date: Tue, 5 Nov 2019 06:16:51 -0800 +Subject: [PATCH 1/1] Use vrf_id for vrf, not tabled_id + +--- + zebra/zebra_fpm_netlink.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c +index f347d3955..74aab8228 100644 +--- a/zebra/zebra_fpm_netlink.c ++++ b/zebra/zebra_fpm_netlink.c +@@ -284,7 +284,6 @@ static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd, + rib_dest_t *dest, struct route_entry *re) + { + struct nexthop *nexthop; +- struct zebra_vrf *zvrf; + + memset(ri, 0, sizeof(*ri)); + +@@ -292,9 +291,7 @@ static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd, + ri->af = rib_dest_af(dest); + + ri->nlmsg_type = cmd; +- zvrf = rib_dest_vrf(dest); +- if (zvrf) +- ri->rtm_table = zvrf->table_id; ++ ri->rtm_table = zvrf_id(rib_dest_vrf(dest)); + ri->rtm_protocol = RTPROT_UNSPEC; + + /* +-- +2.17.1.windows.2 + diff --git a/src/sonic-frr/patch/series b/src/sonic-frr/patch/series index 45ba556e8d9a..233021ace50b 100644 --- a/src/sonic-frr/patch/series +++ b/src/sonic-frr/patch/series @@ -1,4 +1,5 @@ 0001-Add-support-of-bgp-tcp-DSCP-value.patch 0002-Reduce-severity-of-Vty-connected-from-message.patch +0003-Use-vrf_id-for-vrf-not-tabled_id.patch 0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch 0006-changes-for-making-snmp-socket-non-blocking.patch From 738692eff706f0980ede35869e7cedec27f118ae Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Tue, 24 Mar 2020 13:04:40 -0700 Subject: [PATCH 4/4] Restore patches --- ...nexthops-compare-vrf-only-if-ip-type.patch | 73 +++++++++++++++++++ src/sonic-frr/patch/series | 1 + 2 files changed, 74 insertions(+) create mode 100644 src/sonic-frr/patch/0005-nexthops-compare-vrf-only-if-ip-type.patch diff --git a/src/sonic-frr/patch/0005-nexthops-compare-vrf-only-if-ip-type.patch b/src/sonic-frr/patch/0005-nexthops-compare-vrf-only-if-ip-type.patch new file mode 100644 index 000000000000..343f1b3262d9 --- /dev/null +++ b/src/sonic-frr/patch/0005-nexthops-compare-vrf-only-if-ip-type.patch @@ -0,0 +1,73 @@ +From 2f0b5aef66316b47d2cc8ac18453600621a6a317 Mon Sep 17 00:00:00 2001 +From: Tyler Li +Date: Thu, 14 Nov 2019 23:46:52 -0800 +Subject: [PATCH] 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 cf5bed3d6..7d9f646c9 100644 +--- a/lib/nexthop.c ++++ b/lib/nexthop.c +@@ -105,12 +105,6 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1, + { + int ret = 0; + +- if (next1->vrf_id < next2->vrf_id) +- return -1; +- +- if (next1->vrf_id > next2->vrf_id) +- return 1; +- + if (next1->type < next2->type) + return -1; + +@@ -120,6 +114,12 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1, + switch (next1->type) { + case NEXTHOP_TYPE_IPV4: + case NEXTHOP_TYPE_IPV6: ++ if (next1->vrf_id < next2->vrf_id) ++ return -1; ++ ++ if (next1->vrf_id > next2->vrf_id) ++ return 1; ++ + ret = _nexthop_gateway_cmp(next1, next2); + if (ret != 0) + return ret; +diff --git a/lib/zclient.c b/lib/zclient.c +index c739af043..0d37c46d1 100644 +--- a/lib/zclient.c ++++ b/lib/zclient.c +@@ -783,12 +783,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1, + { + int ret = 0; + +- if (next1->vrf_id < next2->vrf_id) +- return -1; +- +- if (next1->vrf_id > next2->vrf_id) +- return 1; +- + if (next1->type < next2->type) + return -1; + +@@ -798,6 +792,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1, + switch (next1->type) { + case NEXTHOP_TYPE_IPV4: + case NEXTHOP_TYPE_IPV6: ++ if (next1->vrf_id < next2->vrf_id) ++ return -1; ++ ++ if (next1->vrf_id > next2->vrf_id) ++ return 1; ++ + ret = nexthop_g_addr_cmp(next1->type, &next1->gate, + &next2->gate); + if (ret != 0) +-- +2.11.0 + diff --git a/src/sonic-frr/patch/series b/src/sonic-frr/patch/series index 233021ace50b..13619c87ff65 100644 --- a/src/sonic-frr/patch/series +++ b/src/sonic-frr/patch/series @@ -2,4 +2,5 @@ 0002-Reduce-severity-of-Vty-connected-from-message.patch 0003-Use-vrf_id-for-vrf-not-tabled_id.patch 0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch +0005-nexthops-compare-vrf-only-if-ip-type.patch 0006-changes-for-making-snmp-socket-non-blocking.patch