Skip to content
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

[nrf fromlist] Clear endpoint bitmask before reporting the PartList attribute #335

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

ArekBalysNordic
Copy link
Contributor

When we set a low value to the minimum subscription interval for subscription for the PartList attribute of the Description cluster, and then remove a dynamic endpoint the related bitmask may change after reporting it to a controller.
The controller receives the old number of endpoints and does not update it within the following subscriptions until the next change of the PartList attribute occurs.

To resolve the issue the endpoint bitmask should be cleared before reporting the PartList attribute of the Descriptor cluster to avoid race conditions.

[nrf] -> There is an old API and there is a bitmask operation instead of the method Clear!

…ttribute

When we set a low value to the minimum subscription interval for
subscription for the PartList attribute of the Description cluster,
and then remove a dynamic endpoint the related bitmask may change
after reporting it to a controller.
The controller receives the old number of endpoints and does not
update it within the following subscriptions until the next change
of the PartList attribute occurs.

To resolve the issue the endpoint bitmask should be cleared before
reporting the PartList attribute of the Descriptor cluster to avoid
race conditions.

[nrf] -> There is an old API and there is bitmask operation instead of
the method Clear!
Copy link
Contributor

@kkasperczyk-no kkasperczyk-no left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but could you explicitly comment in the code the part that is a workaround, as "TODO: remove this workaround after upmerge to Matter 1.2" or something like that? I would like to just be sure we will not forget to do that.

Currently, in the Matter 1.1.0.1 revision, there is a problem in
the reporting engine that causes wrong logic with marking mutated
change paths to send the report later. In the SetDirty method, we
called handler->setDirty before calling the InsertPathIntoDirtySet
method which caused the report not to be sent properly because
there was no new attribute to be sent on the DirtySet and the
generation version was forgotten, so the next data report did not
contain an update. It occurs when the controller sets too low value
for a minimal subscription interval and the device tries to send
a report scheduled to be sent immediately after the event occurs
without waiting to Inserting a path to the DirtySet.

This issue seems to be repaired in the Matter 1.2 revision, so we
can provide a workaround, and then revert/remove that PR during the
next synchronization with Matter SDK.
@ArekBalysNordic ArekBalysNordic merged commit 802f525 into nrfconnect:master Oct 12, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants