Skip to content

Commit 764f6e5

Browse files
authored
Merge pull request #24330 from GaladrielZhao/upgrade/frr-10.4.1
[FRR]: Upgrade FRR to version 10.4.1 #### Why I did it Upgrade FRR to version 10.4.1 #### How I did it - Update FRR version to 10.4.1 and sonic-frr branch to frr-10.4.1 - Port and update patches to frr-10.4.1 ##### [Table 1] Removed Patches |**Patch**|<div style="width: 200pt">FRR Commit / Pull Request| | :---- | :-------- | | 0019-Revert-bgpd-upon-if-event-evaluate-bnc-with-matching.patch| FRRouting/frr@052aea6 | | 0020-staticd-add-cli-to-support-steering-of-ipv4-traffic-over-srv6-sid-list.patch | FRRouting/frr@6f52056 | | 0021-lib-Return-duplicate-prefix-list-entry-test.patch | FRRouting/frr@24ae7cd | | 0023-isisd-lib-add-some-codepoints-usually-shared-with-other-vendors.patch | FRRouting/frr@53263b4 | | 0024-staticd-Add-support-for-SRv6-uA-behavior.patch | FRRouting/frr@feff426 | | 0025-Fpm-problems.patch | FRRouting/frr@b2fc167 | | 0028-zebra-ensure-proper-return-for-failure-for-Sid-allocation.patch | FRRouting/frr@5a63cf4 | | 0029-staticd-Fix-a-crash-that-occurs-when-modifying-an-SRv6-SID.patch | FRRouting/frr@6037ea3 | | 0030-staticd-Avoid-requesting-SRv6-sid-from-zebra-when-loc-and-sid-block-dont-match.patch | FRRouting/frr@dbd9fed | | 0031-isisd-fix-srv6-sid-memory-leak.patch | FRRouting/frr@25c813a | | 0032-show-ipv6-route-json-displays-seg6local-flavors.patch | FRRouting/frr@a95fd3e | | 0033-staticd-Install-known-nexthops-upon-connection-with-zebra.patch | FRRouting/frr@918a1f8 | | 0034-staticd-Fix-an-issue-where-SRv6-SIDs-may-not-be-allocated-on-heavily-loaded-systems.patch | FRRouting/frr@9c011b5 | | 0035-lib-Add-support-for-stream-buffer-to-expand.patch | FRRouting/frr@c0c46ba | | 0036-zebra-zebra-crash-for-zapi-stream.patch | FRRouting/frr@6fe9092 | | 0037-bgpd-Replace-per-peer-connection-error-with-per-bgp.patch | FRRouting/frr@6a5962e | | 0038-bgpd-remove-apis-from-bgp_route.h.patch | FRRouting/frr@020245b | | 0039-bgpd-batch-peer-connection-error-clearing.patch | FRRouting/frr@58f924d | | 0040-zebra-move-peer-conn-error-list-to-connection-struct.patch | FRRouting/frr@6206e7e | | 0041-bgpd-Allow-batch-clear-to-do-partial-work-and-contin.patch | FRRouting/frr@c527882 | | 0042-zebra-V6-RA-not-sent-anymore-after-interface-up-down.patch | FRRouting/frr@deb8476 | | 0043-bgpd-Paths-received-from-shutdown-peer-not-deleted.patch | FRRouting/frr@d2bec7a | | 0044-bgpd-Modify-bgp-to-handle-packet-events-in-a-FIFO.patch | FRRouting/frr@12bf042 | | 0045-zebra-Limit-reading-packets-when-MetaQ-is-full.patch | FRRouting/frr@937a9fb | | 0046-bgpd-Delay-processing-MetaQ-in-some-events.patch | FRRouting/frr@83a92c9 | | 0047-bgpd-Fix-holdtime-not-working-properly-when-busy.patch | FRRouting/frr@9a26a56 | | 0048-bgpd-ensure-that-bgp_generate_updgrp_packets-shares-.patch | FRRouting/frr@681caee | | 0049-zebra-show-command-to-display-metaq-info.patch | FRRouting/frr@751ae76 | | 0050-bgpd-add-total-path-count-for-bgp-net-in-json-output.patch | FRRouting/frr@be3c6d3 | | 0051-lib-Add-nexthop_same_no_ifindex-comparison-function.patch | FRRouting/frr@66f552c | | 0052-zebra-show-nexthop-count-in-nexthop-group-command.patch | FRRouting/frr@da5703e | | 0053-zebra-Allow-nhg-s-to-be-reused-when-multiple-interfa.patch | FRRouting/frr@46044a4 | | 0054-zebra-Prevent-active-setting-if-interface-is-not-ope.patch | FRRouting/frr@e5f4675 | | 0055-zebra-Add-nexthop-group-id-to-route-dump.patch | FRRouting/frr@b732ad2 | | 0056-zebra-Display-interface-name-not-ifindex-in-nh-dump.patch | FRRouting/frr@c891cd2 | | 0057-mgmtd-remove-bogus-hedge-code-which-corrupted-active.patch | FRRouting/frr@b12b4c2 | | 0058-mgmtd-normalize-argument-order-to-copy-dst-src.patch | FRRouting/frr@59d2368 | | 0059-zebra-Ensure-that-the-dplane-can-send-the-full-packe.patch | FRRouting/frr@c89c330 | ##### [Table 2] Realigned Patches | Patch | &ensp;Type&ensp; | Reason | | :---- | :------------ | :---- | | 0001-SONiC-ONLY-Reduce-severity-of-Vty-connected-from-message.patch | Lasting| Diff logic | | 0002-SONiC-ONLY-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch | Lasting | Diff logic | | 0003-SONiC-ONLY-nexthops-compare-vrf-only-if-ip-type.patch | Lasting | Diff logic | | 0004-SONiC-ONLY-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch | Lasting | Diff logic | | 0005-Add-support-of-bgp-l3vni-evpn.patch | Temp&ensp; | As shown in patch | | 0006-SONiC-ONLY-Link-local-scope-was-not-set-while-binding-socket-for-bgp-ipv6-link-local-neighbors.patch | &ensp;Lasting&ensp; | Diff logic | | 0007-SONiC-ONLY-ignore-route-from-default-table.patch | Lasting| Diff logic | | 0008-SONiC-ONLY-Use-vrf_id-for-vrf-not-tabled_id.patch | Lasting| Diff logic | | 0009-SONiC-ONLY-bgpd-Change-log-level-for-graceful-restart-events.patch | Lasting| Diff logic | | 0010-SONiC-ONLY-Disable-ipv6-src-address-test-in-pceplib.patch | Lasting | Diff logic | | 0011-SONiC-ONLY-cross-compile-changes.patch | Lasting| Diff compilation | | 0012-SONiC-ONLY-build-dplane-fpm-sonic-module.patch | Lasting | Diff compilation | | 0013-SONiC-ONLY-zebra-do-not-send-local-routes-to-fpm.patch | Lasting | Diff logic | | 0014-SONiC-ONLY-Adding-changes-to-write-ip-nht-resolve-via-default-c.patch | Lasting | Feature added by SONiC | | 0015-SONiC-ONLY-When-the-file-is-config-replayed-we-cannot-handle-th.patch | Lasting | Diff logic | | 0016-SONiC-ONLY-Set-multipath-to-514-and-disable-bgp-vnc-for-optimiz.patch | Lasting | Diff compilation | | 0017-SONiC-ONLY-Patch-to-send-tag-value-associated-with-route-via-ne.patch | Lasting | Diff logic | | 0018-SONiC-ONLY-SRv6-vpn-route-and-sidlist-install.patch | Lasting | Feature added by SONiC | | 0022-SONiC-ONLY-This-error-happens-when-we-try-to-write-to-a-socket.patch | Lasting | Diff logic | | 0026-SONiC-ONLY-Translate-tableid-for-dplane-route-notify.patch | Lasting | Diff logic | | 0027-Dont-skip-kernel-routes-uninstall.patch | &ensp;Temp&ensp;&ensp; | FRR Open issue:<br>[FRRouting#19637](FRRouting/frr#19637) | | 0060-bgpd-Convert-bmp-path_info-tracking-from-hash-to-rbt.patch | &ensp;Temp&ensp;&ensp; | Merged in FRR<br>tagged frr-10.6.0 | | 0061-bgpd-Fix-JSON-wrapper-brace-consistency-in-neighbor.patch | &ensp;Temp&ensp;&ensp; | Merged in FRR<br>tagged frr-10.6.0 | | 0062-zebra-if-speed-change-check-fix.patch | &ensp;Temp&ensp;&ensp; | Backported to FRR stable/10.4 | ###### Patch 0009 has conflicts when porting patches from 10.3. We apply the same logic as in the previous upgrade to resolve the conflicts. <br> ###### Following a discussion with @cscarpitta , the file dplane_fpm_sonic.c is involved in the following changes during the upgrade from FRR 10.3 to 10.4.1. The relevant commits and their status are shown in the table below. ##### [Table 3] Summary of dplane_fpm_sonic.c Changes | Description Message | FRR Commit | Status in SONiC| | :---------- |:-------- |:--------| | zebra: Fix pass back of data from dplane through fpm pipe | FRRouting/frr@b2fc167 | NOT applicable to SONiC | | zebra: Limit mutex for obuf to when we access obuf | FRRouting/frr@c58da10 | Merged as <br>[1f7896e](1f7896e) | | zebra: change fpm_read to batch the messages | FRRouting/frr@7e8c18d | Committed in this PR | | bgpd,zebra: remove use of the EVENT_OFF macro | FRRouting/frr@e9a756f | Committed in this PR | | zebra: Ensure that the dplane can send the full packet | FRRouting/frr@c89c330 | Merged as <br>[6868762](686876262e5bb5ee672) | | zebra: On dplane failure to write ctx, let zebra know | FRRouting/frr@a1ce6a4 | Committed in this PR | ###### Note ###### Additional patches, if needed, will be added in subsequent commits. ##### [Table 4] New Patches Added | Patch | Type &ensp; | Reason | | :-----------| :-------------------|:--------| | 0064-bgpd-Prevent-unnecessary-re-install-of-routes.patch | Temp | Merged in FRR mainline<br>https://github.com/FRRouting/frr/pull/19788| | 0065-bgpd-fix-DEREF_OF_NULL.EX.COND-in-community_list_dup.patch | Temp | From FRR stable/10.4 | | 0066-zebra-fix-up-memory-leak-in-dplane-shutdown-sequences.patch | Temp | From FRR stable/10.4 | | 0067-bgpd-fix-overflow-when-decoding-zapi-nexthop-for-srv.patch | Temp | From FRR stable/10.4 | | 0068-bgpd-fix-memory-leak-in-evpn-mh.patch | Temp | From FRR stable/10.4 | | 0069-bgpd-Fix-default-vrf-check-while-configuring-md5-password-for-prefix-on-the-bgp-listen-socket.patch | Temp | From FRR stable/10.4 | | 0070-Gr-test-fixup.patch | Temp | From FRR stable/10.4 | | 0071-staticd-Fix-typo-in-SRv6-SIDs-debug-logs-for-interfa.patch | Temp | From FRR stable/10.4 | | 0072-zebra-Reset-encapsulation-source-address-when-no-srv6-is-executed.patch | Temp | From FRR stable/10.4 | | 0073-zebra-Explicitly-print-exit-at-the-end-of-srv6-encap.patch | Temp | From FRR stable/10.4 | | 0074-bgpd-Fix-crash-due-to-dangling-pointer-in-bnc-nht_in.patch | Temp | From FRR stable/10.4 | | 0075-zebra-Add-missing-debug-guard-in-rt-netlink-code.patch | Temp | From FRR stable/10.4 | | 0076-zebra-Add-missing-debug-guard-in-if-netlink-code.patch | Temp | From FRR stable/10.4 | | 0077-lib-remove-zlog-tmp-dirs-by-default-at-exit.patch | Temp | From FRR stable/10.4 | | 0078-staticd-Fix-SRv6-SID-installation-for-default-VRF.patch | Temp | From FRR stable/10.4 | | 0079-bgpd-don-t-use-stale-evpn-pointer-in-bgp_update.patch | Temp | From FRR stable/10.4 | | 0080-lib-Return-a-valid-JSON-if-prefix-list-is-not-found.patch | Temp | From FRR stable/10.4 | | 0081-Allow-notify-callback-on-non-presence-container.patch | Temp | From FRR stable/10.4 | | 0082-bgpd-fix-refcounts-at-termination.patch | Temp | From FRR stable/10.4 | | 0083-bgpd-add-NULL-check-in-evpn-mh-code.patch | Temp | From FRR stable/10.4 | | 0084-Revert-bgpd-Enable-Link-Local-Next-Hop-capability-for-unnumbered-peers-implicitly.patch | Temp | From FRR stable/10.4 | | 0085-zebra-Cleanup-early-route-Q-when-removing-routes.patch | Temp | From FRR stable/10.4 | | 0086-doc-Fix-documentation-regarding-capability-link-loca.patch | Temp | From FRR stable/10.4 | | 0087-zebra-fix-neighbor-table-name-length.patch | Temp | From FRR stable/10.4 | | 0088-bgpd-Do-not-override-a-specified-rd.patch | Temp | From FRR stable/10.4 | | 0089-bgpd-EVPN-fix-auto-derive-rd-when-user-cfg-removed.patch | Temp | From FRR stable/10.4 | | 0090-zebra-EVPN-fix-alignment-of-access-vlan-cli-output.patch | Temp | From FRR stable/10.4 | | 0091-bgpd-EVPN-MH-fix-ES-EVI-memleak-during-shutdown.patch | Temp | From FRR stable/10.4 | | 0092-bgpd-Do-not-complain-in-the-logs-if-we-intentionally.patch | Temp | From FRR stable/10.4 | | 0093-bgpd-Put-local-BGP-ID-when-sending-NNHN-TLV-for-NH-c.patch | Temp | From FRR stable/10.4 | | 0094-zebra-fix-yang-data-for-mcast-group.patch | Temp | From FRR stable/10.4 | | 0095-bgpd-Crash-due-to-usage-of-freed-up-evpn_overlay-att.patch | Temp | From FRR stable/10.4 | | 0096-bgpd-Notify-all-incoming-outgoing-on-peer-group-noti.patch | Temp | From FRR stable/10.4 | #### How to verify it - Build the SONiC VS image using cisco-ngdp-vs platform, based on Q200 - Run test bgp/test_bgp_stress_link_flap.py in the local vms-kvm-ciscovs-5nodes topology (Passed dut and neighbor tests) - CI Sanity tests - Longevity tests
2 parents a7d9344 + b567a3a commit 764f6e5

File tree

100 files changed

+5741
-11375
lines changed

Some content is hidden

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

100 files changed

+5741
-11375
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-10.3
49+
branch = frr-10.4.1
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 = 10.3
3+
FRR_VERSION = 10.4.1
44
FRR_SUBVERSION = 0
5-
FRR_BRANCH = frr-10.3
6-
FRR_TAG = frr-10.3
5+
FRR_BRANCH = frr-10.4.1
6+
FRR_TAG = frr-10.4.1
77
export FRR_VERSION FRR_SUBVERSION FRR_BRANCH FRR_TAG
88

99

src/sonic-frr/dplane_fpm_sonic/dplane_fpm_sonic.c

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,8 @@ static void fpm_reconnect(struct fpm_nl_ctx *fnc)
671671

672672
stream_reset(fnc->ibuf);
673673
stream_reset(fnc->obuf);
674-
EVENT_OFF(fnc->t_read);
675-
EVENT_OFF(fnc->t_write);
674+
event_cancel(&fnc->t_read);
675+
event_cancel(&fnc->t_write);
676676

677677
/* Reset the barrier value */
678678
cleaning_p = true;
@@ -699,6 +699,10 @@ static void fpm_read(struct event *t)
699699
size_t available_bytes;
700700
size_t hdr_available_bytes;
701701
int ival;
702+
struct dplane_ctx_list_head batch_list;
703+
704+
/* Initialize the batch list */
705+
dplane_ctx_q_init(&batch_list);
702706

703707
/* Let's ignore the input at the moment. */
704708
rv = stream_read_try(fnc->ibuf, fnc->socket,
@@ -739,7 +743,7 @@ static void fpm_read(struct event *t)
739743
while (available_bytes) {
740744
if (available_bytes < (ssize_t)FPM_MSG_HDR_LEN) {
741745
stream_pulldown(fnc->ibuf);
742-
return;
746+
goto send_batch;
743747
}
744748

745749
fpm.version = stream_getc(fnc->ibuf);
@@ -754,7 +758,7 @@ static void fpm_read(struct event *t)
754758
__func__, fpm.version, fpm.msg_type);
755759

756760
FPM_RECONNECT(fnc);
757-
return;
761+
goto send_batch;
758762
}
759763

760764
/*
@@ -766,7 +770,7 @@ static void fpm_read(struct event *t)
766770
"%s: Received message length: %u that does not even fill the FPM header",
767771
__func__, fpm.msg_len);
768772
FPM_RECONNECT(fnc);
769-
return;
773+
goto send_batch;
770774
}
771775

772776
/*
@@ -777,7 +781,7 @@ static void fpm_read(struct event *t)
777781
if (fpm.msg_len > available_bytes) {
778782
stream_rewind_getp(fnc->ibuf, FPM_MSG_HDR_LEN);
779783
stream_pulldown(fnc->ibuf);
780-
return;
784+
goto send_batch;
781785
}
782786

783787
available_bytes -= FPM_MSG_HDR_LEN;
@@ -827,8 +831,9 @@ static void fpm_read(struct event *t)
827831
break;
828832
}
829833

830-
/* Parse the route data into a dplane ctx, then
831-
* enqueue it to zebra for processing.
834+
/*
835+
* Parse the route data into a dplane ctx, add to ctx list
836+
* and enqueue the batch of ctx to zebra for processing.
832837
*/
833838
ctx = dplane_ctx_alloc();
834839
dplane_ctx_route_init(ctx, DPLANE_OP_ROUTE_NOTIFY, NULL,
@@ -840,8 +845,9 @@ static void fpm_read(struct event *t)
840845
dplane_ctx_set_vrf(ctx, ival);
841846
dplane_ctx_set_table(ctx,
842847
ZEBRA_ROUTE_TABLE_UNKNOWN);
843-
844-
dplane_provider_enqueue_to_zebra(ctx);
848+
849+
/* Add to the list for batching */
850+
dplane_ctx_enqueue_tail(&batch_list, ctx);
845851
} else {
846852
/*
847853
* Let's continue to read other messages
@@ -861,6 +867,15 @@ static void fpm_read(struct event *t)
861867
}
862868

863869
stream_reset(fnc->ibuf);
870+
871+
send_batch:
872+
/* Send all contexts to zebra in a single batch if we have any */
873+
if (dplane_ctx_queue_count(&batch_list) > 0) {
874+
if (IS_ZEBRA_DEBUG_FPM)
875+
zlog_debug("%s: Sending batch of %u contexts to zebra", __func__,
876+
dplane_ctx_queue_count(&batch_list));
877+
dplane_provider_enqueue_ctx_list_to_zebra(&batch_list);
878+
}
864879
}
865880

866881
static void fpm_write(struct event *t)
@@ -2494,6 +2509,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
24942509
zlog_err(
24952510
"%s: netlink_srv6_msg_encode failed",
24962511
__func__);
2512+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
24972513
return 0;
24982514
}
24992515
} else {
@@ -2504,6 +2520,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
25042520
zlog_err(
25052521
"%s: netlink_route_multipath_msg_encode failed",
25062522
__func__);
2523+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
25072524
return 0;
25082525
}
25092526
}
@@ -2524,6 +2541,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
25242541
zlog_err(
25252542
"%s: netlink_srv6_msg_encode failed",
25262543
__func__);
2544+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
25272545
return 0;
25282546
}
25292547
} else {
@@ -2535,6 +2553,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
25352553
zlog_err(
25362554
"%s: netlink_route_multipath_msg_encode failed",
25372555
__func__);
2556+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
25382557
return 0;
25392558
}
25402559
}
@@ -2549,6 +2568,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
25492568
if (rv <= 0) {
25502569
zlog_err("%s: netlink_macfdb_update_ctx failed",
25512570
__func__);
2571+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
25522572
return 0;
25532573
}
25542574

@@ -2561,6 +2581,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
25612581
if (rv <= 0) {
25622582
zlog_err("%s: netlink_nexthop_msg_encode failed",
25632583
__func__);
2584+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
25642585
return 0;
25652586
}
25662587

@@ -2573,6 +2594,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
25732594
if (rv <= 0) {
25742595
zlog_err("%s: netlink_nexthop_msg_encode failed",
25752596
__func__);
2597+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
25762598
return 0;
25772599
}
25782600

@@ -2585,6 +2607,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
25852607
zlog_err(
25862608
"%s: netlink_srv6_msg_encode failed",
25872609
__func__);
2610+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
25882611
return 0;
25892612
}
25902613
nl_buf_len += (size_t)rv;
@@ -2597,6 +2620,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
25972620
zlog_err(
25982621
"%s: netlink_srv6_msg_encode failed",
25992622
__func__);
2623+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
26002624
return 0;
26012625
}
26022626
nl_buf_len += (size_t)rv;
@@ -2608,6 +2632,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
26082632
if (rv <= 0) {
26092633
zlog_err("%s: netlink_nexthop_msg_encode failed",
26102634
__func__);
2635+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
26112636
return 0;
26122637
}
26132638

@@ -2620,6 +2645,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
26202645
if (rv <= 0) {
26212646
zlog_err("%s: netlink_pic_context_msg_encode failed",
26222647
__func__);
2648+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
26232649
return 0;
26242650
}
26252651

@@ -2632,6 +2658,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
26322658
if (rv <= 0) {
26332659
zlog_err("%s: netlink_lsp_msg_encoder failed",
26342660
__func__);
2661+
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
26352662
return 0;
26362663
}
26372664

@@ -3135,7 +3162,6 @@ static void fpm_process_queue(struct event *t)
31353162
/* Account the processed entries. */
31363163
processed_contexts++;
31373164

3138-
dplane_ctx_set_status(ctx, ZEBRA_DPLANE_REQUEST_SUCCESS);
31393165
dplane_provider_enqueue_out_ctx(fnc->prov, ctx);
31403166
}
31413167

@@ -3154,7 +3180,7 @@ static void fpm_process_queue(struct event *t)
31543180
event_add_timer(fnc->fthread->master, fpm_process_wedged, fnc,
31553181
DPLANE_FPM_NL_WEDGIE_TIME, &fnc->t_wedged);
31563182
} else
3157-
EVENT_OFF(fnc->t_wedged);
3183+
event_cancel(&fnc->t_wedged);
31583184

31593185
/*
31603186
* Let the dataplane thread know if there are items in the
@@ -3267,16 +3293,16 @@ static int fpm_nl_finish_early(struct fpm_nl_ctx *fnc)
32673293
return 0;
32683294

32693295
/* Disable all events and close socket. */
3270-
EVENT_OFF(fnc->t_lspreset);
3271-
EVENT_OFF(fnc->t_lspwalk);
3272-
EVENT_OFF(fnc->t_nhgreset);
3273-
EVENT_OFF(fnc->t_nhgwalk);
3274-
EVENT_OFF(fnc->t_ribreset);
3275-
EVENT_OFF(fnc->t_ribwalk);
3276-
EVENT_OFF(fnc->t_rmacreset);
3277-
EVENT_OFF(fnc->t_rmacwalk);
3278-
EVENT_OFF(fnc->t_event);
3279-
EVENT_OFF(fnc->t_nhg);
3296+
event_cancel(&fnc->t_lspreset);
3297+
event_cancel(&fnc->t_lspwalk);
3298+
event_cancel(&fnc->t_nhgreset);
3299+
event_cancel(&fnc->t_nhgwalk);
3300+
event_cancel(&fnc->t_ribreset);
3301+
event_cancel(&fnc->t_ribwalk);
3302+
event_cancel(&fnc->t_rmacreset);
3303+
event_cancel(&fnc->t_rmacwalk);
3304+
event_cancel(&fnc->t_event);
3305+
event_cancel(&fnc->t_nhg);
32803306
event_cancel_async(fnc->fthread->master, &fnc->t_read, NULL);
32813307
event_cancel_async(fnc->fthread->master, &fnc->t_write, NULL);
32823308
event_cancel_async(fnc->fthread->master, &fnc->t_connect, NULL);

src/sonic-frr/frr

Submodule frr updated 1331 files

src/sonic-frr/patch/0001-Reduce-severity-of-Vty-connected-from-message.patch renamed to src/sonic-frr/patch/0001-SONiC-ONLY-Reduce-severity-of-Vty-connected-from-message.patch

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
From 69370e52e94c66e06052a7859dd059dfa34fd61e Mon Sep 17 00:00:00 2001
1+
[PATCH] From 15274a197e4d3b7ac0f11ca63a5274f1168739f5 Mon Sep 17
2+
23
From: Pavel Shirshov <[email protected]>
34
Date: Mon, 16 Nov 2020 18:11:47 -0800
4-
Subject: [PATCH] From 15274a197e4d3b7ac0f11ca63a5274f1168739f5 Mon Sep 17
55
00:00:00 2001 Subject: [PATCH 2/8] Reduce severity of 'Vty connected from'
66
message
7-
7+
---
8+
lib/vty.c | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
810

911
diff --git a/lib/vty.c b/lib/vty.c
10-
index 1d04e75bf..ecbbd73db 100644
12+
index 43ff964d8..fad2ff991 100644
1113
--- a/lib/vty.c
1214
+++ b/lib/vty.c
13-
@@ -1968,7 +1968,7 @@ static void vty_accept(struct event *thread)
15+
@@ -1959,7 +1959,7 @@ static void vty_accept(struct event *thread)
1416
zlog_info("can't set sockopt to vty_sock : %s",
1517
safe_strerror(errno));
1618

@@ -19,6 +21,3 @@ index 1d04e75bf..ecbbd73db 100644
1921

2022
vty_create(vty_sock, &su);
2123
}
22-
--
23-
2.17.1
24-

src/sonic-frr/patch/0002-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch renamed to src/sonic-frr/patch/0002-SONiC-ONLY-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
From 44ed2b0d2a2ca6029238118603264e02e2e965f4 Mon Sep 17 00:00:00 2001
1+
[PATCH] From afff474c79e0c177e090d1b45d68c9f816a52e3e Mon Sep 17
2+
23
From: Pavel Shirshov <[email protected]>
34
Date: Mon, 16 Nov 2020 18:33:46 -0800
4-
Subject: [PATCH] From afff474c79e0c177e090d1b45d68c9f816a52e3e Mon Sep 17
55
00:00:00 2001 Subject: [PATCH 4/8] Allow BGP attr NEXT_HOP to be 0.0.0.0 due
66
to alleviate
7-
7+
---
8+
bgpd/bgp_route.c | 3 +--
9+
1 file changed, 1 insertion(+), 2 deletions(-)
810

911
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
10-
index 39172cc08..9d96a3e43 100644
12+
index aa6c701ca..a8427bc3b 100644
1113
--- a/bgpd/bgp_route.c
1214
+++ b/bgpd/bgp_route.c
13-
@@ -4719,8 +4719,7 @@ bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi,
15+
@@ -4786,8 +4786,7 @@ bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi,
1416
* E.g.: IPv6 prefix can be with nexthop: 0.0.0.0, and mp_nexthop: fc00::1.
1517
*/
1618
if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP)))
@@ -20,6 +22,3 @@ index 39172cc08..9d96a3e43 100644
2022
bgp_nexthop_self(bgp, afi, type, stype, attr, dest));
2123

2224
/* If MP_NEXTHOP is present, validate it. */
23-
--
24-
2.17.1
25-

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
From 2b778b1984c5f88500625a0e96a5ba1d1fe0316c Mon Sep 17 00:00:00 2001
1+
[PATCH] From 786087468520db44c55e3566f77438b41f52763f Mon Sep 17
2+
23
From: Pavel Shirshov <[email protected]>
34
Date: Mon, 16 Nov 2020 18:35:01 -0800
4-
Subject: [PATCH] From 786087468520db44c55e3566f77438b41f52763f Mon Sep 17
55
00:00:00 2001 Subject: [PATCH 5/8] nexthops compare vrf only if ip type
6-
6+
---
7+
lib/nexthop.c | 12 ++++++------
8+
lib/zclient.c | 12 ++++++------
9+
2 files changed, 12 insertions(+), 12 deletions(-)
710

811
diff --git a/lib/nexthop.c b/lib/nexthop.c
9-
index c377b9cb0..6fe45b2c5 100644
12+
index e8f5ecf17..9381b3a89 100644
1013
--- a/lib/nexthop.c
1114
+++ b/lib/nexthop.c
12-
@@ -143,12 +143,6 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
15+
@@ -149,12 +149,6 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
1316
{
1417
int ret = 0;
1518

@@ -22,7 +25,7 @@ index c377b9cb0..6fe45b2c5 100644
2225
if (next1->type < next2->type)
2326
return -1;
2427

25-
@@ -166,6 +160,12 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
28+
@@ -172,6 +166,12 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
2629
switch (next1->type) {
2730
case NEXTHOP_TYPE_IPV4:
2831
case NEXTHOP_TYPE_IPV6:
@@ -36,10 +39,10 @@ index c377b9cb0..6fe45b2c5 100644
3639
if (ret != 0)
3740
return ret;
3841
diff --git a/lib/zclient.c b/lib/zclient.c
39-
index 5deea8f0c..28e9da721 100644
42+
index 558626fa3..3ab7bc040 100644
4043
--- a/lib/zclient.c
4144
+++ b/lib/zclient.c
42-
@@ -976,12 +976,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
45+
@@ -982,12 +982,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
4346
{
4447
int ret = 0;
4548

@@ -52,7 +55,7 @@ index 5deea8f0c..28e9da721 100644
5255
if (next1->type < next2->type)
5356
return -1;
5457

55-
@@ -997,6 +991,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
58+
@@ -1003,6 +997,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
5659
switch (next1->type) {
5760
case NEXTHOP_TYPE_IPV4:
5861
case NEXTHOP_TYPE_IPV6:
@@ -65,6 +68,3 @@ index 5deea8f0c..28e9da721 100644
6568
ret = nexthop_g_addr_cmp(next1->type, &next1->gate,
6669
&next2->gate);
6770
if (ret != 0)
68-
--
69-
2.17.1
70-

0 commit comments

Comments
 (0)