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

Fix subscription liveness timeout computation to include MRP backoff. #25593

Conversation

bzbarsky-apple
Copy link
Contributor

Right now the amount of time we allow for receiving a subscription report, after the max-interval has elapsed, is computed by just multiplying our active liveness timeout by the number of MRP retries. For a typical always-active client (hence 300ms active interval) that means 1500ms.

But an actual sender would do backoff in between the MRP messages, so would not actually give up within 1500ms. We should be taking that backoff into account when computing the time we allow to receive the message.

@github-actions
Copy link

github-actions bot commented Mar 9, 2023

PR #25593: Size comparison from 82da16f to ad7dc23

Increases (1 build for cc32xx)
platform target config section 82da16f ad7dc23 change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 644425 644465 40 0.0
.debug_abbrev 930235 930280 45 0.0
.debug_frame 300044 300048 4 0.0
.debug_info 20267469 20268456 987 0.0
.debug_line 2659770 2659914 144 0.0
.debug_loc 2802853 2802993 140 0.0
.text 536372 536412 40 0.0
Decreases (1 build for cc32xx)
platform target config section 82da16f ad7dc23 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_ranges 282960 282936 -24 -0.0
.debug_str 3024079 3023875 -204 -0.0
Full report (2 builds for cc32xx, mbed)
platform target config section 82da16f ad7dc23 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 644425 644465 40 0.0
(read/write) 203688 203688 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197088 197088 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930235 930280 45 0.0
.debug_aranges 87344 87344 0 0.0
.debug_frame 300044 300048 4 0.0
.debug_info 20267469 20268456 987 0.0
.debug_line 2659770 2659914 144 0.0
.debug_loc 2802853 2802993 140 0.0
.debug_ranges 282960 282936 -24 -0.0
.debug_str 3024079 3023875 -204 -0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105929 105929 0 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 378571 0 0.0
.symtab 256624 256624 0 0.0
.text 536372 536412 40 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2467664 2467664 0 0.0
.bss 215804 215804 0 0.0
.data 5880 5880 0 0.0
.text 1430308 1430308 0 0.0

Right now the amount of time we allow for receiving a subscription report, after
the max-interval has elapsed, is computed by just multiplying our active
liveness timeout by the number of MRP retries.  For a typical always-active
client (hence 300ms active interval) that means 1500ms.

But an actual sender would do backoff in between the MRP messages, so would not
actually give up within 1500ms.  We should be taking that backoff into account
when computing the time we allow to receive the message.
@bzbarsky-apple bzbarsky-apple force-pushed the fix-subscription-liveness-timeout-computation branch from ad7dc23 to c058f43 Compare March 9, 2023 15:44
@github-actions
Copy link

github-actions bot commented Mar 9, 2023

PR #25593: Size comparison from 82da16f to c058f43

Increases (1 build for cc32xx)
platform target config section 82da16f c058f43 change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 644425 644465 40 0.0
.debug_abbrev 930235 930280 45 0.0
.debug_frame 300044 300048 4 0.0
.debug_info 20267469 20268456 987 0.0
.debug_line 2659770 2659914 144 0.0
.debug_loc 2802853 2802993 140 0.0
.text 536372 536412 40 0.0
Decreases (1 build for cc32xx)
platform target config section 82da16f c058f43 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_ranges 282960 282936 -24 -0.0
.debug_str 3024079 3023875 -204 -0.0
Full report (1 build for cc32xx)
platform target config section 82da16f c058f43 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 644425 644465 40 0.0
(read/write) 203688 203688 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197088 197088 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930235 930280 45 0.0
.debug_aranges 87344 87344 0 0.0
.debug_frame 300044 300048 4 0.0
.debug_info 20267469 20268456 987 0.0
.debug_line 2659770 2659914 144 0.0
.debug_loc 2802853 2802993 140 0.0
.debug_ranges 282960 282936 -24 -0.0
.debug_str 3024079 3023875 -204 -0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105929 105929 0 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 378571 0 0.0
.symtab 256624 256624 0 0.0
.text 536372 536412 40 0.0

@bzbarsky-apple bzbarsky-apple merged commit 99cbba0 into project-chip:master Mar 9, 2023
@bzbarsky-apple bzbarsky-apple deleted the fix-subscription-liveness-timeout-computation branch March 9, 2023 18:15
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
…project-chip#25593)

Right now the amount of time we allow for receiving a subscription report, after
the max-interval has elapsed, is computed by just multiplying our active
liveness timeout by the number of MRP retries.  For a typical always-active
client (hence 300ms active interval) that means 1500ms.

But an actual sender would do backoff in between the MRP messages, so would not
actually give up within 1500ms.  We should be taking that backoff into account
when computing the time we allow to receive the message.
mwswartwout pushed a commit to mwswartwout/connectedhomeip that referenced this pull request Mar 27, 2023
…project-chip#25593)

Right now the amount of time we allow for receiving a subscription report, after
the max-interval has elapsed, is computed by just multiplying our active
liveness timeout by the number of MRP retries.  For a typical always-active
client (hence 300ms active interval) that means 1500ms.

But an actual sender would do backoff in between the MRP messages, so would not
actually give up within 1500ms.  We should be taking that backoff into account
when computing the time we allow to receive the message.
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