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 fromtree] Clear srp implementation #399

Closed

Conversation

LipinskiPNordicSemi
Copy link
Contributor

This commit implements the host srp clear, using a cherry-picked upstream solution.

Cherry-picked commit 6350333 content:

“This PR brings project-chip/connectedhomeip#31606 feature to The GenericThreadStackManagerImpl.
The functionality remains the same (with the addition of deleting the client key lease also).

However, this requires each platform that uses it, to provide a synchronization mechanism.

I created the Templates _WaitOnSrpClearAllComplete and _NotifySrpClearAllComplete and I provided an implementation for all platforms using the GenericThreadStackManagerImpl. (It is left unimplemented for others)

The synchronization mechanism I chose for Zephyr platforms (nordic/telink) and Infineon might not be optional so suggestions are welcome.

The functionality was only tested on the Silabs platform and is currently only used on it also. I am confident it works for all FreeRTOS-based platforms.

I suggest all other thread platform owners take some time to test and use ClearAllSrpHostAndServices during their factory-reset sequence.”

@LipinskiPNordicSemi LipinskiPNordicSemi changed the title Srp clear [nrf fromtree] Clear srp implementation. Mar 1, 2024
@LipinskiPNordicSemi LipinskiPNordicSemi changed the title [nrf fromtree] Clear srp implementation. [nrf fromtree] Clear srp implementation Mar 1, 2024
@@ -181,6 +181,12 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg)
{
ChipLogProgress(DeviceLayer, "Performing factory reset");

#if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
ThreadStackMgr().WaitOnSrpClearAllComplete();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isn't ThreadStackMgr().ClearAllSrpHostAndServices() enough? The other functions are called under the hood.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't check that, my bad

@LuDuda
Copy link
Collaborator

LuDuda commented Mar 4, 2024

Thanks. What about manifest update?

…to the GenericThreadStackManagerImpl (#32215)

* Bring the functionality to clear all Srp Client host and Services to the GenericThreadStackManagerImpl

* Fix Tizen build

* Update src/platform/Tizen/ThreadStackManagerImpl.cpp

Co-authored-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>

* Add method documentation and address comments

* Restyled by whitespace

---------

Commit: 6350333

Co-authored-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
Co-authored-by: Restyled.io <commits@restyled.io>
This commit implements the host srp clear,
using cherry-picked upstream solution.

Signed-off-by: Patryk Lipinski <patryk.lipinski@nordicsemi.no>
@markaj-nordic
Copy link
Contributor

This patch did not land in NCS 2.6.0. I will be pulled in by the next connectedhomeip upmerge. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants