-
Notifications
You must be signed in to change notification settings - Fork 1.4k
zebra: V6 RA not sent anymore after interface up-down-up #18451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
so ... please add a meaningful title and description? |
2ec3ae2
to
fb482ba
Compare
f4eedc5
to
7095a84
Compare
Added now |
7095a84
to
fe352cb
Compare
fe352cb
to
0e7d05c
Compare
0e7d05c
to
568f5fe
Compare
lib/wheel.c
Outdated
list_isempty(wheel->wheel_slot_lists[curr_slot])) { | ||
/* Came to back to same slot and that is empty | ||
* so the wheel is empty, puase it | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix the comment indentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1)This comment is indented w.r.t if (!wheel->run_forever) {. before running git clang-format >>
((((curr_slot + slots_to_skip) % wheel->slots) == curr_slot) &&
-
list_isempty(wheel->wheel_slot_lists[curr_slot])) {<<<This line is tab indented
-
/* Came to back to same slot and that is empty
-
* so the wheel is empty, stop it
-
*/
-
if (!wheel->run_forever) {
-
wheel_stop(wheel);
-
if (debug_timer_wheel)
-
zlog_debug("Stopped an empty wheel %p", wheel);
-
return;
-
}
-
}
2)After git clang-format >>
if ((((curr_slot + slots_to_skip) % wheel->slots) == curr_slot) &&
-
list_isempty(wheel->wheel_slot_lists[curr_slot])) {
-
list_isempty(wheel->wheel_slot_lists[curr_slot])) {<<<<<This line gets space indented /* Came to back to same slot and that is empty * so the wheel is empty, stop it */
- If I dont do step 2) I get style suggestion error curl https://gist.githubusercontent.com/polychaeta/13d7c1b3f9c07b87352be22b5f29ad01/raw/55bb8b7724008c107d333a05c8db9a785a2db0f7/style.diff | git apply -. So restoring back to 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no: line 56 is not correct. it looks like it's missing a space to align the comment block
Can we have a bit of the context when fast/regular wheels are used? |
c13b1c3
to
3a9feb0
Compare
Added more context |
Thanks, makes sense now, but please put it inside the commit (not in PR). |
3a9feb0
to
11dd5a0
Compare
d352211
to
5347e31
Compare
|
||
_, result = topotest.run_and_expect(_check_interface_down, True, count=10, wait=1) | ||
if result is not True: | ||
sys.stderr.write("Interface did not go down after shutdown command\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this stderr print if we assert below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.
output = tgen.gears["r1"].vtysh_cmd("show interface r1-eth200 json") | ||
return True if '"administrativeStatus":"down"' in output else False | ||
|
||
_, result = topotest.run_and_expect(_check_interface_down, True, count=10, wait=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set at least 15 seconds (this is a minimum)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
# Verify RA state didn't change when interface is down | ||
if rtadv_output1 != rtadv_output2: | ||
sys.stderr.write( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we assert here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed code.
877175a
to
c82cc62
Compare
79ef09a
to
f842a11
Compare
Why do you close and reopen all the time? |
Issue: Once interface is shutdown, the interface is removed from wheel timer. Now when the interface is up again, current code won't add the interface to wheel timer again, so it won't send RA anymore for that interface Fix: Moved wheel_add for interface inside rtadv_start_interface_events This is more common function which gets triggered for both RA enable and interface up event Also on any kind of interface activation event, we try to send RA as soon as possible. This is to satisfy requirement where quick RA is needed, especially for some convergence, dependent on RA. Testing: Did ineterface up to down to up Added debug log for RA, checked it is getting advertised preodically after when up at up state show bgp summary for 512 bgp peers for bgp bgp unnumbered works fine. Signed-off-by: Soumya Roy <[email protected]>
Added test cases with interface down/up/shutdown to verify RA state of an interface Signed-off-by: Soumya Roy <[email protected]>
f842a11
to
cc4fffa
Compare
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md ** Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it **Add support for 512 BGP sessions** #### How I did it | Patch | Upstream Commit | |-------|----------------| | 0035-lib-Add-support-for-stream-buffer-to-expand.patch | [65b3ee4e](FRRouting/frr@c0c46ba) | | 0036-zebra-zebra-crash-for-zapi-stream.patch | [c122afdb](FRRouting/frr@6fe9092) | | 0037-bgpd-Replace-per-peer-connection-error-with-per-bgp.patch | [10c127bc](FRRouting/frr@6a5962e) | | 0038-bgpd-remove-apis-from-bgp_route.h.patch | [1d5a8a20](FRRouting/frr@020245b) | | 0039-bgpd-batch-peer-connection-error-clearing.patch | [4baa9f2d](FRRouting/frr@58f924d) | | 0040-zebra-move-peer-conn-error-list-to-connection-struct.patch | [411abd6b](FRRouting/frr@6206e7e) | | 0041-bgpd-Allow-batch-clear-to-do-partial-work-and-contin.patch | [b68be906](FRRouting/frr@c527882) | | 0042-zebra-send-v6-fast-RA-at-faster-interval.patch | [sonic-net#18451](FRRouting/frr#18451) | | 0043-bgpd-Paths-received-from-shutdown-peer-not-deleted.patch | [2cbfc7ec](FRRouting/frr@d2bec7a) | | 0044-bgpd-Modify-bgp-to-handle-packet-events-in-a-FIFO.patch | [12bf042](FRRouting/frr@12bf042c68) | | 0045-zebra-Limit-reading-packets-when-MetaQ-is-full.patch | [937a9fb](FRRouting/frr@937a9fb) | | 0046-bgpd-Delay-processing-MetaQ-in-some-events.patch | [83a92c9](FRRouting/frr@83a92c9) | | 0047-bgpd-Fix-holdtime-not-working-properly-when-busy.patch | [9a26a56](FRRouting/frr@9a26a56) | | 0048-bgpd-ensure-that-bgp_generate_updgrp_packets-shares-.patch | [681caee](FRRouting/frr@681caee) | | 0049-zebra-show-command-to-display-metaq-info.patch | [751ae76](FRRouting/frr@751ae76) | | 0050-bgpd-add-total-path-count-for-bgp-net-in-json-output.patch | [be3c6d3](FRRouting/frr@be3c6d3) | | 0051-lib-Add-nexthop_same_no_ifindex-comparison-function.patch | [66f552c](FRRouting/frr@66f552c) | | 0052-zebra-show-nexthop-count-in-nexthop-group-command.patch | [da5703e](FRRouting/frr@da5703e) | | 0053-zebra-Allow-nhg-s-to-be-reused-when-multiple-interfa.patch | [46044a4](FRRouting/frr@46044a4) | | 0054-zebra-Prevent-active-setting-if-interface-is-not-ope.patch | [e5f4675](FRRouting/frr@e5f4675) | | 0055-zebra-Add-nexthop-group-id-to-route-dump.patch | [b732ad2](FRRouting/frr@b732ad2) | | 0056-zebra-Display-interface-name-not-ifindex-in-nh-dump.patch | [c891cd2](FRRouting/frr@c891cd2) | #### How to verify it Verified the changes on topology with scaled BGP tests and standard test suite <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md failure_prs.log Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it **Add support for 512 BGP sessions** #### How I did it | Patch | Upstream Commit | |-------|----------------| | 0035-lib-Add-support-for-stream-buffer-to-expand.patch | [65b3ee4e](FRRouting/frr@c0c46ba) | | 0036-zebra-zebra-crash-for-zapi-stream.patch | [c122afdb](FRRouting/frr@6fe9092) | | 0037-bgpd-Replace-per-peer-connection-error-with-per-bgp.patch | [10c127bc](FRRouting/frr@6a5962e) | | 0038-bgpd-remove-apis-from-bgp_route.h.patch | [1d5a8a20](FRRouting/frr@020245b) | | 0039-bgpd-batch-peer-connection-error-clearing.patch | [4baa9f2d](FRRouting/frr@58f924d) | | 0040-zebra-move-peer-conn-error-list-to-connection-struct.patch | [411abd6b](FRRouting/frr@6206e7e) | | 0041-bgpd-Allow-batch-clear-to-do-partial-work-and-contin.patch | [b68be906](FRRouting/frr@c527882) | | 0042-zebra-send-v6-fast-RA-at-faster-interval.patch | [#18451](FRRouting/frr#18451) | | 0043-bgpd-Paths-received-from-shutdown-peer-not-deleted.patch | [2cbfc7ec](FRRouting/frr@d2bec7a) | | 0044-bgpd-Modify-bgp-to-handle-packet-events-in-a-FIFO.patch | [12bf042](FRRouting/frr@12bf042c68) | | 0045-zebra-Limit-reading-packets-when-MetaQ-is-full.patch | [937a9fb](FRRouting/frr@937a9fb) | | 0046-bgpd-Delay-processing-MetaQ-in-some-events.patch | [83a92c9](FRRouting/frr@83a92c9) | | 0047-bgpd-Fix-holdtime-not-working-properly-when-busy.patch | [9a26a56](FRRouting/frr@9a26a56) | | 0048-bgpd-ensure-that-bgp_generate_updgrp_packets-shares-.patch | [681caee](FRRouting/frr@681caee) | | 0049-zebra-show-command-to-display-metaq-info.patch | [751ae76](FRRouting/frr@751ae76) | | 0050-bgpd-add-total-path-count-for-bgp-net-in-json-output.patch | [be3c6d3](FRRouting/frr@be3c6d3) | | 0051-lib-Add-nexthop_same_no_ifindex-comparison-function.patch | [66f552c](FRRouting/frr@66f552c) | | 0052-zebra-show-nexthop-count-in-nexthop-group-command.patch | [da5703e](FRRouting/frr@da5703e) | | 0053-zebra-Allow-nhg-s-to-be-reused-when-multiple-interfa.patch | [46044a4](FRRouting/frr@46044a4) | | 0054-zebra-Prevent-active-setting-if-interface-is-not-ope.patch | [e5f4675](FRRouting/frr@e5f4675) | | 0055-zebra-Add-nexthop-group-id-to-route-dump.patch | [b732ad2](FRRouting/frr@b732ad2) | | 0056-zebra-Display-interface-name-not-ifindex-in-nh-dump.patch | [c891cd2](FRRouting/frr@c891cd2) | #### How to verify it Verified the changes on topology with scaled BGP tests and standard test suite <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
zebra: V6 RA not sent anymore after interface up-down-up
Issue:
Once interface is shutdown, the interface is removed from
wheel timer. Now when the interface is up again, current code
won't add the interface to wheel timer again, so it won't send RA
anymore for that interface
Fix:
Moved wheel_add for interface inside rtadv_start_interface_events
This is more common function which gets triggered for both
RA enable and interface up event
Also on any kind of interface activation event, we try to send
RA as soon as possible. This is to satisfy requirement where
quick RA is needed, especially for some convergence, dependent on
RA.
Testing:
Did ineterface up to down to up
Added debug log for RA, checked it is getting advertised preodically
after when up at up state
show bgp summary for 512 bgp peers for bgp bgp unnumbered works fine.
Signed-off-by: Soumya Roy [email protected]