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

OTA: Fix linux BlockEOF with data length zero #22314

Merged

Conversation

woody-apple
Copy link
Contributor

Problem

Fixes issue #22308 where linux currently doesn't support BlockEOF of data length zero.

Change overview

Remove this check, it is checked immediately after in SetBlock: https://github.com/project-chip/connectedhomeip/blob/master/src/platform/Linux/OTAImageProcessorImpl.cpp#L244
But at this point the block is released correctly and it does not return an error.

Testing

Did an ota which finished with a BlockEOF with data length zero and confirmed it finished.

Spec indicates BlockEOF May have data length zero.
@github-actions
Copy link

github-actions bot commented Aug 31, 2022

PR #22314: Size comparison from e32aa19 to d714448

Increases (3 builds for bl602, cc13x2_26x2, telink)
platform target config section e32aa19 d714448 change % change
bl602 lighting-app bl602 (read/write) 1383914 1383922 8 0.0
.text 1051068 1051072 4 0.0
cc13x2_26x2 pump-app LP_CC2652R7 (read only) 684727 684735 8 0.0
.text 594284 594292 8 0.0
telink light-switch-app tlsr9518adk80d (read/write) 808800 808808 8 0.0
text 571348 571350 2 0.0
Decreases (2 builds for cc13x2_26x2, nrfconnect)
platform target config section e32aa19 d714448 change % change
cc13x2_26x2 pump-app LP_CC2652R7 (read/write) 157808 157800 -8 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1180099 1180083 -16 -0.0
text 814116 814112 -4 -0.0
Full report (32 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section e32aa19 d714448 change % change
bl602 lighting-app bl602 (read/write) 1383914 1383922 8 0.0
.bss 120290 120290 0 0.0
.data 4480 4480 0 0.0
.text 1051068 1051072 4 0.0
bl602+rpc (read/write) 1429426 1429426 0 0.0
.bss 127730 127730 0 0.0
.data 4600 4600 0 0.0
.text 1082828 1082828 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 672371 672371 0 0.0
(read/write) 179140 179140 0 0.0
.bss 74404 74404 0 0.0
.data 3372 3372 0 0.0
.rodata 88747 88747 0 0.0
.text 583308 583308 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 637747 637747 0 0.0
(read/write) 157980 157980 0 0.0
.bss 73692 73692 0 0.0
.data 3372 3372 0 0.0
.rodata 77979 77979 0 0.0
.text 559444 559444 0 0.0
lock-ftd LP_CC2652R7 (read only) 674063 674063 0 0.0
(read/write) 167664 167664 0 0.0
.bss 71508 71508 0 0.0
.data 3296 3296 0 0.0
.rodata 76671 76671 0 0.0
.text 596912 596912 0 0.0
lock-mtd LP_CC2652R7 (read only) 656807 656807 0 0.0
(read/write) 180608 180608 0 0.0
.bss 67196 67196 0 0.0
.data 3296 3296 0 0.0
.rodata 101759 101759 0 0.0
.text 554568 554568 0 0.0
pump-app LP_CC2652R7 (read only) 684727 684735 8 0.0
(read/write) 157808 157800 -8 -0.0
.bss 71548 71548 0 0.0
.data 3296 3296 0 0.0
.rodata 89959 89959 0 0.0
.text 594284 594292 8 0.0
pump-controller-app LP_CC2652R7 (read only) 669227 669227 0 0.0
(read/write) 173428 173428 0 0.0
.bss 71668 71668 0 0.0
.data 3292 3292 0 0.0
.rodata 85515 85515 0 0.0
.text 583232 583232 0 0.0
shell LP_CC2652R7 (read only) 665070 665070 0 0.0
(read/write) 181960 181960 0 0.0
.bss 76724 76724 0 0.0
.data 3376 3376 0 0.0
.rodata 85694 85694 0 0.0
.text 579060 579060 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 586102 586102 0 0.0
.app_xip_area 462736 462736 0 0.0
.bss 65800 65800 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 591886 591886 0 0.0
.app_xip_area 463736 463736 0 0.0
.bss 70584 70584 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 599026 599026 0 0.0
.app_xip_area 476380 476380 0 0.0
.bss 65112 65112 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1103996 1103996 0 0.0
.bss 136148 136148 0 0.0
.data 2068 2068 0 0.0
.text 965756 965756 0 0.0
BRD4161A+rpc (read/write) 1158248 1158248 0 0.0
.bss 152836 152836 0 0.0
.data 2280 2280 0 0.0
.text 1003112 1003112 0 0.0
BRD4161A+rs911x (read/write) 996656 996656 0 0.0
.bss 168912 168912 0 0.0
.data 2056 2056 0 0.0
.text 825668 825668 0 0.0
lock-app BRD4161A+wf200 (read/write) 1145900 1145900 0 0.0
.bss 151992 151992 0 0.0
.data 2064 2064 0 0.0
.text 991824 991824 0 0.0
window-app BRD4161A (read/write) 1095404 1095404 0 0.0
.bss 137588 137588 0 0.0
.data 2096 2096 0 0.0
.text 955700 955700 0 0.0
esp32 all-clusters-app c3devkit (read only) 1030020 1030020 0 0.0
(read/write) 1488674 1488674 0 0.0
.dram0.bss 70864 70864 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 217776 217776 0 0.0
.flash.text 1030020 1030020 0 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1083371 1083371 0 0.0
(read/write) 490632 490632 0 0.0
.dram0.bss 76376 76376 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 248116 248116 0 0.0
.flash.text 1077987 1077987 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 645508 645508 0 0.0
.bss 70232 70232 0 0.0
.data 2044 2044 0 0.0
.text 570504 570504 0 0.0
lock k32w0+release (read/write) 703028 703028 0 0.0
.bss 70704 70704 0 0.0
.data 2052 2052 0 0.0
.text 627544 627544 0 0.0
linux chip-tool-ipv6only arm64 (read only) 10266028 10266028 0 0.0
(read/write) 704593 704593 0 0.0
.bss 33297 33297 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 649248 649248 0 0.0
.dynamic 560 560 0 0.0
.got 13816 13816 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492956 492956 0 0.0
.text 8122004 8122004 0 0.0
thermostat-no-ble arm64 (read only) 2356996 2356996 0 0.0
(read/write) 141825 141825 0 0.0
.bss 55345 55345 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75984 75984 0 0.0
.dynamic 560 560 0 0.0
.got 5048 5048 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 140524 140524 0 0.0
.text 1978752 1978752 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2454328 2454328 0 0.0
.bss 215076 215076 0 0.0
.data 5872 5872 0 0.0
.text 1416972 1416972 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1180099 1180083 -16 -0.0
bss 143759 143759 0 0.0
rodata 143268 143268 0 0.0
text 814116 814112 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1159959 1159959 0 0.0
bss 142996 142996 0 0.0
rodata 134944 134944 0 0.0
text 803104 803104 0 0.0
p6 all-clusters-app default (read only) 842104 842104 0 0.0
(read/write) 1739028 1739028 0 0.0
.bss 188584 188584 0 0.0
.data 2656 2656 0 0.0
.text 1539400 1539400 0 0.0
all-clusters-minimal-app default (read only) 842824 842824 0 0.0
(read/write) 1683036 1683036 0 0.0
.bss 187864 187864 0 0.0
.data 2656 2656 0 0.0
.text 1484128 1484128 0 0.0
light-app default (read only) 851168 851168 0 0.0
(read/write) 1600324 1600324 0 0.0
.bss 179728 179728 0 0.0
.data 2448 2448 0 0.0
.text 1409760 1409760 0 0.0
lock-app default (read only) 846136 846136 0 0.0
(read/write) 1638044 1638044 0 0.0
.bss 184744 184744 0 0.0
.data 2464 2464 0 0.0
.text 1442448 1442448 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 808800 808808 8 0.0
bss 71480 71480 0 0.0
noinit 43488 43488 0 0.0
text 571348 571350 2 0.0
lighting-app tlsr9518adk80d (read/write) 830776 830776 0 0.0
bss 72336 72336 0 0.0
noinit 43488 43488 0 0.0
text 589472 589472 0 0.0

@andy31415 andy31415 merged commit c35aad2 into sve-2 Aug 31, 2022
@andy31415 andy31415 deleted the cherry-pick-1af4af09319fea47816936a2ee8649c1e4a7913b branch August 31, 2022 18:58
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.

2 participants