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

ExchangeCtx: Fix issue with response timer cancellation #26215

Merged
merged 2 commits into from
May 5, 2023

Conversation

wqx6
Copy link
Contributor

@wqx6 wqx6 commented Apr 24, 2023

When an ExchangeContext sends a message that requires a response, a response timer is started. If it subsequently fails to send another message that does not require a response, the previously-started response timer will be cancelled. However, this timer should not be cancelled, as we need to wait for the response to the previous message.

In this PR, we have modified the condition for cancelling the response timer to messageStartResponseTimer. This means that the response timer will only be cancelled if the exchangeContext fails to send the message that starts the response timer.

Additionally, this PR restricts the conditions under which CancelResponseTimer() is called in other parts of the code.

@github-actions
Copy link

PR #26215: Size comparison from de0dfcf to 1d13c0b

Increases (1 build for cc32xx)
platform target config section de0dfcf 1d13c0b change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 643249 643281 32 0.0
.debug_info 20330829 20330902 73 0.0
.debug_line 2687904 2687933 29 0.0
.debug_loc 2838960 2839004 44 0.0
.text 536728 536760 32 0.0
Full report (1 build for cc32xx)
platform target config section de0dfcf 1d13c0b change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643281 32 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20330829 20330902 73 0.0
.debug_line 2687904 2687933 29 0.0
.debug_loc 2838960 2839004 44 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042335 3042335 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 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 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536760 32 0.0

src/messaging/ExchangeContext.cpp Outdated Show resolved Hide resolved
src/messaging/ExchangeContext.cpp Show resolved Hide resolved
src/messaging/ExchangeContext.cpp Show resolved Hide resolved
@wqx6 wqx6 force-pushed the fix_cancel_response_timer_issue branch from 1d13c0b to 69d020d Compare April 25, 2023 04:37
@github-actions
Copy link

PR #26215: Size comparison from fe07225 to 69d020d

Increases (1 build for cc32xx)
platform target config section fe07225 69d020d change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 601114 601146 32 0.0
.debug_info 19489250 19489343 93 0.0
.debug_line 2678035 2678080 45 0.0
.debug_loclists 1501882 1501906 24 0.0
.text 494824 494856 32 0.0
Full report (1 build for cc32xx)
platform target config section fe07225 69d020d change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 601114 601146 32 0.0
(read/write) 204132 204132 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197544 197544 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956756 956756 0 0.0
.debug_aranges 103416 103416 0 0.0
.debug_frame 349704 349704 0 0.0
.debug_info 19489250 19489343 93 0.0
.debug_line 2678035 2678080 45 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1501882 1501906 24 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96008 96008 0 0.0
.debug_str 3024877 3024877 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104170 104170 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 477531 477531 0 0.0
.symtab 285936 285936 0 0.0
.text 494824 494856 32 0.0

src/messaging/ExchangeContext.cpp Outdated Show resolved Hide resolved
@wqx6 wqx6 force-pushed the fix_cancel_response_timer_issue branch from 85459f7 to 732ef22 Compare April 26, 2023 03:13
@github-actions
Copy link

PR #26215: Size comparison from c2a28c8 to 732ef22

Increases (1 build for cc32xx)
platform target config section c2a28c8 732ef22 change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 601114 601146 32 0.0
.debug_info 19489250 19489293 43 0.0
.debug_line 2678035 2678061 26 0.0
.debug_loclists 1501882 1501942 60 0.0
.debug_str 3024877 3024898 21 0.0
.text 494824 494856 32 0.0
Full report (1 build for cc32xx)
platform target config section c2a28c8 732ef22 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 601114 601146 32 0.0
(read/write) 204132 204132 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197544 197544 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956756 956756 0 0.0
.debug_aranges 103416 103416 0 0.0
.debug_frame 349704 349704 0 0.0
.debug_info 19489250 19489293 43 0.0
.debug_line 2678035 2678061 26 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1501882 1501942 60 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96008 96008 0 0.0
.debug_str 3024877 3024898 21 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104170 104170 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 477531 477531 0 0.0
.symtab 285936 285936 0 0.0
.text 494824 494856 32 0.0

src/messaging/ExchangeContext.cpp Show resolved Hide resolved
src/messaging/ExchangeContext.cpp Show resolved Hide resolved
src/messaging/ExchangeContext.cpp Show resolved Hide resolved
@andy31415 andy31415 merged commit 98ead72 into project-chip:master May 5, 2023
Damian-Nordic pushed a commit to Damian-Nordic/connectedhomeip that referenced this pull request Jun 1, 2023
project-chip#26215)

* ExchangeCtx: Fix issue with response timer cancellation

* Add a boolean to record whether the message starts the reponse timer

Cherry-picked from: 98ead72
hawkhan pushed a commit to Ayla-Professional-Service/csa_matter that referenced this pull request Dec 20, 2023
…#26215)

* ExchangeCtx: Fix issue with response timer cancellation

* Add a boolean to record whether the message starts the reponse timer
maciejbaczmanski pushed a commit to maciejbaczmanski/connectedhomeip that referenced this pull request Jul 15, 2024
project-chip#26215)

* ExchangeCtx: Fix issue with response timer cancellation

* Add a boolean to record whether the message starts the reponse timer

Cherry-picked from: 98ead72
maciejbaczmanski pushed a commit to maciejbaczmanski/connectedhomeip that referenced this pull request Jul 15, 2024
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