-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[OpenThread] Do not re-add existing services #19803
Merged
Merged
Conversation
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
Currently, when a single DNS-SD service is updated, all services are removed and re-added. This approach is acceptable in the case of mDNS-based implementations, but in the case of SRP it generates unnecessary traffic to the SRP server. Also, it may generate SRP updates bigger than MTU which has only been addressed in OpenThread recently and may result in SRP update parsing errors when using older OpenThread versions.
pullapprove
bot
requested review from
andy31415,
anush-apple,
arkq,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple and
chrisdecenzo
June 21, 2022 10:27
pullapprove
bot
requested review from
yufengwangca,
woody-apple,
yunhanw-google and
xylophone21
June 21, 2022 10:27
PR #19803: Size comparison from 2ac3ee7 to 2b10cad Increases (22 builds for cc13x2_26x2, cyw30739, k32w, nrfconnect, telink)
Decreases (22 builds for cc13x2_26x2, cyw30739, k32w, mbed, nrfconnect, telink)
Full report (42 builds for cc13x2_26x2, cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
|
jmeg-sfy
reviewed
Jun 21, 2022
jmeg-sfy
reviewed
Jun 21, 2022
src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp
Outdated
Show resolved
Hide resolved
jmeg-sfy
approved these changes
Jun 21, 2022
jmeg-sfy
reviewed
Jun 21, 2022
Co-authored-by: Jonathan Mégevand <[email protected]>
PR #19803: Size comparison from 2ac3ee7 to a257ca4 Increases (22 builds for cc13x2_26x2, cyw30739, k32w, nrfconnect, telink)
Decreases (21 builds for cc13x2_26x2, cyw30739, k32w, nrfconnect, telink)
Full report (42 builds for cc13x2_26x2, cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
|
andy31415
approved these changes
Jun 21, 2022
msandstedt
approved these changes
Jun 21, 2022
saurabhst
approved these changes
Jun 21, 2022
woody-apple
approved these changes
Jun 21, 2022
LuDuda
approved these changes
Jun 21, 2022
tcarmelveilleux
approved these changes
Jun 22, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Currently, when a single DNS-SD service is updated, all services are removed and re-added. This approach is
acceptable in the case of mDNS-based implementations, but in the case of SRP it generates unnecessary traffic to the
SRP server. Also, it may generate SRP updates bigger than MTU which has only been addressed in OpenThread recently and
may result in SRP update parsing errors when using older OpenThread versions and the SRP server does not support IPv6 reassembly.
Change overview
Detect if a service is re-added with the same port, subtypes and TXT entries and do nothing in such a case.
Reduce the size of SRP debug logs to compensate flash increase in debug builds.
Testing
Tested on nRF Connect Lock that adding 5 fabrics and opening a commissionable window succeeds.
Verified using nRF sniffer for 15.4 that only modified services are sent in an SRP update.