-
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
[mesh-forwarder] finalize message direct tx on drop or eviction #9682
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
Size Report of OpenThread
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #9682 +/- ##
=======================================
Coverage 85.69% 85.70%
=======================================
Files 555 555
Lines 73753 73765 +12
=======================================
+ Hits 63203 63218 +15
+ Misses 10550 10547 -3
|
This was referenced Dec 4, 2023
jwhui
reviewed
Dec 5, 2023
d1c8bb9
to
9777aa8
Compare
This commit adds `FinalizeMessageDirectTx()`, which clears the `DirectTx` flag on a given message, updates the IPv6 counter, and signals other modules about the transmission status(particularly for `MleDiscoverRequest` and `MleChildIdRequest` messages so their internal state can be updated). This commit ensures `FinalizeMessageDirectTx()` is called in various scenarios: - Successful message delivery (all fragments reach destination). - Any fragment transmission failure (frame tx failure) - Message drop due to address query failure or malformed message. - Message drop by queue management. - Message eviction to prioritize higher-priority messages. This commit also updates `DiscoverScanner` to stop an ongoing discover scan if the "MLE Discover Request" message transmission fails with error other than CSMA error. This is necessary because the `DiscoverScanner` reuses the same `Message` instance for tx on different scan channels. If the `Message` is freed (e.g., evicted), the `Message` cannot be reused. Finally, this commit renames `RemoveMessage()` to `EvictMessage()` to clarify the purpose and usage of this method.
9777aa8
to
9bfdd8b
Compare
jwhui
approved these changes
Dec 5, 2023
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
FinalizeMessageDirectTx()
, which clears theDirectTx
flag on a given message, updates the IPv6 counter, and signals other modules about the transmission status(particularly forMleDiscoverRequest
andMleChildIdRequest
messages so their internal state can be updated).This commit ensures
FinalizeMessageDirectTx()
is called in various scenarios:This commit also updates
DiscoverScanner
to stop an ongoing discover scan if the "MLE Discover Request" message transmission fails (with error other than CSMA error). This is necessary because theDiscoverScanner
reuses the sameMessage
instance for tx on different scan channels. If theMessage
is freed (e.g., evicted), theMessage
cannot be reused.Finally, this commit renames
RemoveMessage()
toEvictMessage()
to clarify the purpose and usage of this method.