-
Notifications
You must be signed in to change notification settings - Fork 239
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
[thread-host] implement join for rcp host #2631
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2631 +/- ##
==========================================
- Coverage 55.77% 46.21% -9.57%
==========================================
Files 87 106 +19
Lines 6890 12984 +6094
Branches 0 933 +933
==========================================
+ Hits 3843 6000 +2157
- Misses 3047 6658 +3611
- Partials 0 326 +326 ☔ View full report in Codecov by Sentry. |
54d9772
to
2f13cbe
Compare
2f13cbe
to
437dcd5
Compare
b5ad095
to
d446fab
Compare
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.
LGTM 👍
d446fab
to
b0d3f6c
Compare
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.
Looks good. Couple of questions below. Thanks
// unnecessary connectivity and topology disruption and save the time for re-joining. It's more useful for use | ||
// cases where Thread networks are dynamically brought up and torn down (e.g. Thread on mobile phones). | ||
SuccessOrExit(error = otDatasetSetActiveTlvs(mInstance, &aActiveOpDatasetTlvs), | ||
errorMsg = "Failed to set Active Operational Dataset"); |
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.
If already joined to same network, do we need to set the active dataset again?
This can trigger registration/resync of dataset with leader? Is this desired/interntional?
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.
Yes, this is out of consideration for unknown TLVs in the dataset. It's very difficult to check if two datasets are completely the same with the existence of unknown TLVs (because of the order). So we simply set the active dataset again. But we want to avoid rejoin as possible. Thoughts?
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.
I think it sounds okay to do so. The leader should combine them. This may add some extra traffic/exchanges when the parameters fully match, but I expect it should be harmless otherwise.
b0d3f6c
to
59d2a90
Compare
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.
👍
This PR implements the RcpHost::Join method.
The implementation is exactly the same as Android binder API's implementation. This PR also adds a unit test to check the Join method.