-
Notifications
You must be signed in to change notification settings - Fork 1.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
[netdata-publisher] optimize route prefixes #8901
Closed
Closed
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
This commit adds a new mechanism in `NetworkData::Publisher` to optimize published route prefixes. If three or more route prefixes (excluding NAT64 prefixes) share a common sub-prefix of length 7, they are marked as optimized and replaced with the compact sub-prefix. For example, three or more ULA prefixes will be replaced with the `fc00::/7` route prefix. If the number of prefixes drops below three, the compact prefix is removed and the original prefixes are again published. The compact prefix is added using the highest preference level among all prefixes that it replaces. `OPENTHREAD_CONFIG_NETDATA_PUBLISHER_OPTIMIZE_ROUTES` enables this feature and is enabled by default. This commit also adds `CompactFlag` in `HasRouteEntry` flags. This flag is used to indicate that a route prefix is compact. `test-020-network-data-publisher-compact-routes.py` is added testing the behavior of the new feature. In particular, when many route prefixes are published together or separately and we go over or below the threshold of 3 prefixes. Also the case where the compact prefix itself happens to be a published route is validated.
Size Report of OpenThread
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8901 +/- ##
==========================================
- Coverage 82.55% 82.46% -0.10%
==========================================
Files 536 535 -1
Lines 73260 73169 -91
==========================================
- Hits 60482 60336 -146
- Misses 12778 12833 +55
|
This was referenced Mar 28, 2023
23 tasks
Closing this PR as discussion in SPEC-1130 moves to a different approach. |
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.
This commit adds a new mechanism in
NetworkData::Publisher
to optimize published route prefixes.If three or more route prefixes (excluding NAT64 prefixes) share a common sub-prefix of length 7, they are marked as optimized and replaced with the compact sub-prefix. For example, three or more ULA prefixes will be replaced with the
fc00::/7
route prefix. If the number of prefixes drops below three, the compact prefix is removed and the original prefixes are again published. The compact prefix is added using the highest preference level among all prefixes that it replaces.OPENTHREAD_CONFIG_NETDATA_PUBLISHER_OPTIMIZE_ROUTES
enables this feature and is enabled by default.This commit also adds
CompactFlag
inHasRouteEntry
flags. This flag is used to indicate that a route prefix is compact.test-020-network-data-publisher-compact-routes.py
is added testing the behavior of the new feature. In particular, when many route prefixes are published together or separately and we go over or below the threshold of 3 prefixes. Also the case where the compact prefix itself happens to be a published route is validated.This is related to SPEC-1130.