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

[SED] Review switching between polling modes #14418

Merged
merged 2 commits into from
Feb 3, 2022

Conversation

Damian-Nordic
Copy link
Contributor

Problem

Sleepy End Device polling mode switching behaves incorrectly in some scenarios.

Change overview

  • Request fast-polling mode when commissioning window over IP (not BLE) is open only.
  • Refactor the switching code in ExchangeContext to make sure that a single exchange can request fast-polling mode only
    once and that the request is always withdrawn. Also, request the fast-polling while waiting for ACK.

Testing

Tested on nRF Connect-based SED (AFAIK there's currently no way to test SED on Linux).

@github-actions
Copy link

github-actions bot commented Jan 27, 2022

PR #14418: Size comparison from 63d0c37 to 87721b2

Increases (1 build for k32w)
platform target config section 63d0c37 87721b2 change % change
k32w lock k32w061+release (read/write) 666668 666844 176 0.0
.text 580988 581164 176 0.0
Full report (23 builds for cyw30739, efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
platform target config section 63d0c37 87721b2 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 580918 580918 0 0.0
.app_xip_area 485716 485716 0 0.0
.bss 77948 77948 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock-app CYW30739 (read/write) 538922 538922 0 0.0
.app_xip_area 445264 445264 0 0.0
.bss 76444 76444 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
efr32 lighting-app BRD4161A (read only) 844508 844508 0 0.0
(read/write) 127492 127492 0 0.0
.bss 125592 125592 0 0.0
.data 1900 1900 0 0.0
.text 844500 844500 0 0.0
BRD4161A+rpc (read only) 831880 831880 0 0.0
(read/write) 144152 144152 0 0.0
.bss 142152 142152 0 0.0
.data 2000 2000 0 0.0
.text 831872 831872 0 0.0
window-app BRD4161A (read only) 817124 817124 0 0.0
(read/write) 126148 126148 0 0.0
.bss 124292 124292 0 0.0
.data 1856 1856 0 0.0
.text 817116 817116 0 0.0
esp32 all-clusters-app c3devkit (read only) 934132 934132 0 0.0
(read/write) 1398698 1398698 0 0.0
.dram0.bss 70984 70984 0 0.0
.dram0.data 14236 14236 0 0.0
.flash.rodata 194552 194552 0 0.0
.flash.text 934132 934132 0 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 981551 981551 0 0.0
(read/write) 465528 465528 0 0.0
.dram0.bss 75728 75728 0 0.0
.dram0.data 34024 34024 0 0.0
.flash.rodata 223648 223648 0 0.0
.flash.text 976167 976167 0 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 665716 665716 0 0.0
.bss 77724 77724 0 0.0
.data 1868 1868 0 0.0
.text 580324 580324 0 0.0
lock k32w061+release (read/write) 666668 666844 176 0.0
.bss 77988 77988 0 0.0
.data 1892 1892 0 0.0
.text 580988 581164 176 0.0
linux chip-tool-ipv6only arm64 (read only) 6744396 6744396 0 0.0
(read/write) 279025 279025 0 0.0
.bss 55537 55537 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 175864 175864 0 0.0
.dynamic 560 560 0 0.0
.got 42744 42744 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 387684 387684 0 0.0
.text 5785492 5785492 0 0.0
thermostat-no-ble arm64 (read only) 2084468 2084468 0 0.0
(read/write) 152097 152097 0 0.0
.bss 69761 69761 0 0.0
.data 960 960 0 0.0
.data.rel.ro 74256 74256 0 0.0
.dynamic 560 560 0 0.0
.got 4144 4144 0 0.0
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 131940 131940 0 0.0
.text 1735136 1735136 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2383920 2383920 0 0.0
.bss 189692 189692 0 0.0
.data 5288 5288 0 0.0
.text 1346520 1346520 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2341488 2341488 0 0.0
.bss 181200 181200 0 0.0
.data 5584 5584 0 0.0
.text 1304088 1304088 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2308240 2308240 0 0.0
.bss 181096 181096 0 0.0
.data 5568 5568 0 0.0
.text 1270840 1270840 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2294436 2294436 0 0.0
.bss 177828 177828 0 0.0
.data 5384 5384 0 0.0
.text 1257008 1257008 0 0.0
p6 all-clusters-app default (read/write) 2443448 2443448 0 0.0
.bss 118036 118036 0 0.0
.data 2584 2584 0 0.0
.text 1401712 1401712 0 0.0
light-app default (read/write) 2340096 2340096 0 0.0
.bss 105780 105780 0 0.0
.data 2408 2408 0 0.0
.text 1298360 1298360 0 0.0
lock-app default (read/write) 2305600 2305600 0 0.0
.bss 105524 105524 0 0.0
.data 2360 2360 0 0.0
.text 1263864 1263864 0 0.0
qpg lighting-app qpg6105+debug (read only) 572424 572424 0 0.0
(read/write) 146936 146936 0 0.0
.bss 89936 89936 0 0.0
.data 1060 1060 0 0.0
.text 567104 567104 0 0.0
lock-app qpg6105+debug (read only) 518552 518552 0 0.0
(read/write) 146940 146940 0 0.0
.bss 89408 89408 0 0.0
.data 992 992 0 0.0
.text 513232 513232 0 0.0
persistent-storage-app qpg6105+debug (read only) 107140 107140 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101820 101820 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 848690 848690 0 0.0
bss 87736 87736 0 0.0
noinit 37160 37160 0 0.0
text 593356 593356 0 0.0

Sleepy End Device polling mode switching behaves incorrectly
in some scenarios.

Request fast-polling mode when commissioning window over
IP (not BLE) is open.

Refactor the switching code in ExchangeContext to make sure
that a single exchange can request fast-polling mode only
once and that the request is always withdrawn. Also, request
the fast-polling while waiting for ACK.
@github-actions
Copy link

github-actions bot commented Jan 28, 2022

PR #14418: Size comparison from 865aab9 to 70efe52

Increases (1 build for k32w)
platform target config section 865aab9 70efe52 change % change
k32w lock k32w061+release (read/write) 663844 664020 176 0.0
.text 579460 579636 176 0.0
Full report (33 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 865aab9 70efe52 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 578130 578130 0 0.0
.app_xip_area 484224 484224 0 0.0
.bss 76652 76652 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock-app CYW30739 (read/write) 536142 536142 0 0.0
.app_xip_area 443780 443780 0 0.0
.bss 75148 75148 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
efr32 lighting-app BRD4161A (read only) 842984 842984 0 0.0
(read/write) 126200 126200 0 0.0
.bss 124296 124296 0 0.0
.data 1900 1900 0 0.0
.text 842976 842976 0 0.0
BRD4161A+rpc (read only) 830336 830336 0 0.0
(read/write) 142856 142856 0 0.0
.bss 140856 140856 0 0.0
.data 2000 2000 0 0.0
.text 830328 830328 0 0.0
window-app BRD4161A (read only) 815560 815560 0 0.0
(read/write) 124852 124852 0 0.0
.bss 122996 122996 0 0.0
.data 1856 1856 0 0.0
.text 815552 815552 0 0.0
esp32 all-clusters-app c3devkit (read only) 932934 932934 0 0.0
(read/write) 1397322 1397322 0 0.0
.dram0.bss 69688 69688 0 0.0
.dram0.data 14244 14244 0 0.0
.flash.rodata 194480 194480 0 0.0
.flash.text 932934 932934 0 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 980835 980835 0 0.0
(read/write) 461692 461692 0 0.0
.dram0.bss 74432 74432 0 0.0
.dram0.data 34024 34024 0 0.0
.flash.rodata 221108 221108 0 0.0
.flash.text 975451 975451 0 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 662940 662940 0 0.0
.bss 76428 76428 0 0.0
.data 1868 1868 0 0.0
.text 578844 578844 0 0.0
lock k32w061+release (read/write) 663844 664020 176 0.0
.bss 76692 76692 0 0.0
.data 1892 1892 0 0.0
.text 579460 579636 176 0.0
linux chip-tool-ipv6only arm64 (read only) 6767748 6767748 0 0.0
(read/write) 279201 279201 0 0.0
.bss 55537 55537 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 175984 175984 0 0.0
.dynamic 560 560 0 0.0
.got 42784 42784 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 386892 386892 0 0.0
.text 5808756 5808756 0 0.0
thermostat-no-ble arm64 (read only) 2080748 2080748 0 0.0
(read/write) 149537 149537 0 0.0
.bss 67169 67169 0 0.0
.data 960 960 0 0.0
.data.rel.ro 74288 74288 0 0.0
.dynamic 560 560 0 0.0
.got 4144 4144 0 0.0
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 129932 129932 0 0.0
.text 1733472 1733472 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2382472 2382472 0 0.0
.bss 188588 188588 0 0.0
.data 5288 5288 0 0.0
.text 1345072 1345072 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2338200 2338200 0 0.0
.bss 179304 179304 0 0.0
.data 5584 5584 0 0.0
.text 1300800 1300800 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2302240 2302240 0 0.0
.bss 179208 179208 0 0.0
.data 5552 5552 0 0.0
.text 1264840 1264840 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2292980 2292980 0 0.0
.bss 176532 176532 0 0.0
.data 5384 5384 0 0.0
.text 1255552 1255552 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 981375 981375 0 0.0
bss 119660 119660 0 0.0
rodata 115684 115684 0 0.0
text 668232 668232 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 966923 966923 0 0.0
bss 116704 116704 0 0.0
rodata 107160 107160 0 0.0
text 664676 664676 0 0.0
nrf52840dongle_nrf52840 (read/write) 997459 997459 0 0.0
bss 120832 120832 0 0.0
rodata 114516 114516 0 0.0
text 673656 673656 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 890562 890562 0 0.0
bss 116448 116448 0 0.0
rodata 108964 108964 0 0.0
text 584420 584420 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 913955 913955 0 0.0
bss 118040 118040 0 0.0
rodata 104320 104320 0 0.0
text 614212 614212 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 824006 824006 0 0.0
bss 114856 114856 0 0.0
rodata 97528 97528 0 0.0
text 531172 531172 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541779 541779 0 0.0
bss 52588 52588 0 0.0
rodata 50048 50048 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 916819 916819 0 0.0
bss 117792 117792 0 0.0
rodata 104832 104832 0 0.0
text 616748 616748 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 912003 912003 0 0.0
bss 117816 117816 0 0.0
rodata 103936 103936 0 0.0
text 612788 612788 0 0.0
shell nrf52840dk_nrf52840 (read/write) 798203 798203 0 0.0
bss 109776 109776 0 0.0
rodata 78288 78288 0 0.0
text 533640 533640 0 0.0
p6 all-clusters-app default (read/write) 2441752 2441752 0 0.0
.bss 116740 116740 0 0.0
.data 2584 2584 0 0.0
.text 1400016 1400016 0 0.0
light-app default (read/write) 2338568 2338568 0 0.0
.bss 104484 104484 0 0.0
.data 2408 2408 0 0.0
.text 1296832 1296832 0 0.0
lock-app default (read/write) 2304080 2304080 0 0.0
.bss 104228 104228 0 0.0
.data 2360 2360 0 0.0
.text 1262344 1262344 0 0.0
qpg lighting-app qpg6105+debug (read only) 570884 570884 0 0.0
(read/write) 146936 146936 0 0.0
.bss 88640 88640 0 0.0
.data 1060 1060 0 0.0
.text 565564 565564 0 0.0
lock-app qpg6105+debug (read only) 517004 517004 0 0.0
(read/write) 146940 146940 0 0.0
.bss 88112 88112 0 0.0
.data 992 992 0 0.0
.text 511684 511684 0 0.0
persistent-storage-app qpg6105+debug (read only) 107140 107140 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101820 101820 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 845786 845786 0 0.0
bss 86440 86440 0 0.0
noinit 37160 37160 0 0.0
text 592522 592522 0 0.0

@pullapprove pullapprove bot requested a review from isiu-apple January 29, 2022 06:51
@Damian-Nordic Damian-Nordic merged commit 73e3c83 into project-chip:master Feb 3, 2022
@Damian-Nordic Damian-Nordic deleted the sed-switching branch February 3, 2022 13:24
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