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

When retrying CASE during commissioning, extend the fail-safe. #25595

Conversation

bzbarsky-apple
Copy link
Contributor

If we don't do this, we can get into a situation where our retries take longer than the fail-safe timer, so we are still retrying by the other side is not even listening anymore.

The changes here are as follows:

  1. Expose various bits on CASEClient and CASESession to allow us to compute how
    long it will take before we know whether the next CASE retry has succeeded or
    failed.
  2. Add a way for OperationalSessionSetup to notify its consumers that it's going
    to retry, and how long it expects it to take before it knows whether the
    retry has succeeded.
  3. Change DeviceCommissioner to extend the fail-safe when it's told that
    OperationalSessionSetup will retry.

Fixes #25581

@github-actions
Copy link

github-actions bot commented Mar 9, 2023

PR #25595: Size comparison from 68082bd to 1d50469

Increases (1 build for cc32xx)
platform target config section 68082bd 1d50469 change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 644425 644905 480 0.1
(read/write) 203688 203848 160 0.1
.bss 197088 197248 160 0.1
.debug_abbrev 930235 930248 13 0.0
.debug_aranges 87344 87376 32 0.0
.debug_frame 300044 300232 188 0.1
.debug_info 20267474 20274042 6568 0.0
.debug_line 2659773 2660770 997 0.0
.debug_loc 2802853 2804534 1681 0.1
.debug_ranges 282960 283272 312 0.1
.debug_str 3024079 3026281 2202 0.1
.strtab 378571 379152 581 0.2
.symtab 256624 256848 224 0.1
.text 536372 536864 492 0.1
Decreases (1 build for cc32xx)
platform target config section 68082bd 1d50469 change % change
cc32xx lock CC3235SF_LAUNCHXL .rodata 105929 105921 -8 -0.0
Full report (1 build for cc32xx)
platform target config section 68082bd 1d50469 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 644425 644905 480 0.1
(read/write) 203688 203848 160 0.1
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197088 197248 160 0.1
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930235 930248 13 0.0
.debug_aranges 87344 87376 32 0.0
.debug_frame 300044 300232 188 0.1
.debug_info 20267474 20274042 6568 0.0
.debug_line 2659773 2660770 997 0.0
.debug_loc 2802853 2804534 1681 0.1
.debug_ranges 282960 283272 312 0.1
.debug_str 3024079 3026281 2202 0.1
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105929 105921 -8 -0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 378571 379152 581 0.2
.symtab 256624 256848 224 0.1
.text 536372 536864 492 0.1

If we don't do this, we can get into a situation where our retries take longer
than the fail-safe timer, so we are still retrying by the other side is not even
listening anymore.

The changes here are as follows:

1) Expose various bits on CASEClient and CASESession to allow us to compute how
   long it will take before we know whether the next CASE retry has succeeded or
   failed.
2) Add a way for OperationalSessionSetup to notify its consumers that it's going
   to retry, and how long it expects it to take before it knows whether the
   retry has succeeded.
3) Change DeviceCommissioner to extend the fail-safe when it's told that
   OperationalSessionSetup will retry.
@bzbarsky-apple bzbarsky-apple force-pushed the extend-failsafe-on-CASE-retries branch from 0a28980 to b67f169 Compare March 9, 2023 18:22
@github-actions
Copy link

github-actions bot commented Mar 9, 2023

PR #25595: Size comparison from 99cbba0 to b67f169

Increases (1 build for cc32xx)
platform target config section 99cbba0 b67f169 change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 644465 644945 480 0.1
(read/write) 203688 203848 160 0.1
.bss 197088 197248 160 0.1
.debug_abbrev 930280 930293 13 0.0
.debug_aranges 87344 87376 32 0.0
.debug_frame 300048 300236 188 0.1
.debug_info 20268460 20275028 6568 0.0
.debug_line 2659917 2660914 997 0.0
.debug_loc 2802993 2804674 1681 0.1
.debug_ranges 282936 283248 312 0.1
.debug_str 3023875 3026077 2202 0.1
.strtab 378571 379152 581 0.2
.symtab 256624 256848 224 0.1
.text 536412 536904 492 0.1
Decreases (1 build for cc32xx)
platform target config section 99cbba0 b67f169 change % change
cc32xx lock CC3235SF_LAUNCHXL .rodata 105929 105921 -8 -0.0
Full report (1 build for cc32xx)
platform target config section 99cbba0 b67f169 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 644465 644945 480 0.1
(read/write) 203688 203848 160 0.1
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197088 197248 160 0.1
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930280 930293 13 0.0
.debug_aranges 87344 87376 32 0.0
.debug_frame 300048 300236 188 0.1
.debug_info 20268460 20275028 6568 0.0
.debug_line 2659917 2660914 997 0.0
.debug_loc 2802993 2804674 1681 0.1
.debug_ranges 282936 283248 312 0.1
.debug_str 3023875 3026077 2202 0.1
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105929 105921 -8 -0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 378571 379152 581 0.2
.symtab 256624 256848 224 0.1
.text 536412 536904 492 0.1

Copy link
Contributor

@tcarmelveilleux tcarmelveilleux left a comment

Choose a reason for hiding this comment

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

Suggest making the API unconditional and just having the bodies of implementation #if conditionals.

@bzbarsky-apple
Copy link
Contributor Author

Suggest making the API unconditional and just having the bodies of implementation #if conditionals.

Filed #25601

@bzbarsky-apple bzbarsky-apple merged commit 8afc1f5 into project-chip:master Mar 10, 2023
@bzbarsky-apple bzbarsky-apple deleted the extend-failsafe-on-CASE-retries branch March 10, 2023 04:59
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
…ct-chip#25595)

If we don't do this, we can get into a situation where our retries take longer
than the fail-safe timer, so we are still retrying by the other side is not even
listening anymore.

The changes here are as follows:

1) Expose various bits on CASEClient and CASESession to allow us to compute how
   long it will take before we know whether the next CASE retry has succeeded or
   failed.
2) Add a way for OperationalSessionSetup to notify its consumers that it's going
   to retry, and how long it expects it to take before it knows whether the
   retry has succeeded.
3) Change DeviceCommissioner to extend the fail-safe when it's told that
   OperationalSessionSetup will retry.
mwswartwout pushed a commit to mwswartwout/connectedhomeip that referenced this pull request Mar 27, 2023
…ct-chip#25595)

If we don't do this, we can get into a situation where our retries take longer
than the fail-safe timer, so we are still retrying by the other side is not even
listening anymore.

The changes here are as follows:

1) Expose various bits on CASEClient and CASESession to allow us to compute how
   long it will take before we know whether the next CASE retry has succeeded or
   failed.
2) Add a way for OperationalSessionSetup to notify its consumers that it's going
   to retry, and how long it expects it to take before it knows whether the
   retry has succeeded.
3) Change DeviceCommissioner to extend the fail-safe when it's told that
   OperationalSessionSetup will retry.
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.

Re-arm the fail-safe for a longer period to deal with CASE retries
3 participants