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

Improve ProcessStatusResponse #21331

Conversation

yunhanw-google
Copy link
Contributor

@yunhanw-google yunhanw-google commented Jul 28, 2022

Problem

Improve ProcessStatusResponse signature so that we can tell if the
error is caused by malformed status response or the error is from stored
value inside status response.
This PR is cut from #19356.

Change overview

See above

Testing

no logic change, the existing test covers.

@yunhanw-google yunhanw-google changed the title Improve StatusResponse Improve ProcessStatusResponse Jul 28, 2022
-- Improve ProcessStatusResponse signature so that we can tell if the
error is caused by malformed status response or the error is from stored
value inside status response.
@yunhanw-google yunhanw-google force-pushed the feature/improve_ProcessStatusResponse branch from 7980942 to e51b359 Compare July 28, 2022 04:26
src/app/CommandSender.cpp Show resolved Hide resolved
src/app/WriteClient.cpp Show resolved Hide resolved
src/app/CommandSender.cpp Outdated Show resolved Hide resolved
src/app/WriteClient.cpp Outdated Show resolved Hide resolved
src/app/CommandSender.cpp Outdated Show resolved Hide resolved
src/app/WriteClient.cpp Outdated Show resolved Hide resolved
@yunhanw-google yunhanw-google enabled auto-merge (squash) July 28, 2022 04:41
@bzbarsky-apple bzbarsky-apple force-pushed the feature/improve_ProcessStatusResponse branch from 1b90288 to 9213ea7 Compare July 28, 2022 13:08
@github-actions
Copy link

github-actions bot commented Jul 28, 2022

PR #21331: Size comparison from 8fe4727 to 9213ea7

Increases (31 builds for cc13x2_26x2, cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 8fe4727 9213ea7 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668291 668315 24 0.0
.text 579780 579804 24 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633875 633891 16 0.0
.text 556140 556156 16 0.0
lock-ftd LP_CC2652R7 (read only) 671455 671463 8 0.0
.text 594712 594720 8 0.0
lock-mtd LP_CC2652R7 (read only) 653555 653563 8 0.0
.text 552200 552208 8 0.0
pump-controller-app LP_CC2652R7 (read only) 666479 666487 8 0.0
.text 581320 581328 8 0.0
shell LP_CC2652R7 (read only) 661006 661014 8 0.0
.text 575524 575532 8 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583206 583214 8 0.0
.app_xip_area 460016 460024 8 0.0
lock cyw930739m2evb_01 (read/write) 589126 589134 8 0.0
.app_xip_area 461208 461216 8 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 588938 588946 8 0.0
.app_xip_area 466564 466572 8 0.0
k32w lock k32w0+release (read/write) 699832 699848 16 0.0
.text 624892 624908 16 0.0
linux all-clusters-app debug (read only) 2989849 2990057 208 0.0
.text 2542210 2542418 208 0.0
all-clusters-minimal-app debug (read only) 2832889 2833081 192 0.0
.text 2387698 2387890 192 0.0
bridge-app debug+rpc (read only) 2351177 2351321 144 0.0
.text 1987026 1987170 144 0.0
chip-tool debug (read only) 10412065 10412641 576 0.0
.text 8431556 8432132 576 0.0
chip-tool-ipv6only arm64 (read only) 9829588 9830420 832 0.0
(read/write) 675729 675873 144 0.0
.data.rel.ro 621080 621224 144 0.0
.text 7786516 7787204 688 0.0
lighting-app debug+rpc (read only) 2574169 2574313 144 0.0
.text 2186210 2186354 144 0.0
lock-app debug (read only) 2539185 2539313 128 0.0
.text 2141122 2141250 128 0.0
ota-provider-app debug (read only) 2343545 2343673 128 0.0
.text 1972306 1972434 128 0.0
ota-requestor-app debug (read only) 2464553 2464761 208 0.0
.text 2081138 2081346 208 0.0
shell debug (read only) 2573377 2573521 144 0.0
.text 2184066 2184210 144 0.0
thermostat-no-ble arm64 (read only) 2343388 2343516 128 0.0
(read/write) 141601 141633 32 0.0
.data.rel.ro 75856 75880 24 0.0
.text 1967200 1967312 112 0.0
tv-app debug (read only) 3123553 3124129 576 0.0
.text 2681138 2681714 576 0.0
tv-casting-app debug (read only) 5378297 5378873 576 0.0
.text 4772706 4773282 576 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2450384 2450544 160 0.0
.text 1413028 1413188 160 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 text 808808 808816 8 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 text 798120 798124 4 0.0
p6 all-clusters-app default (read/write) 1686700 1686716 16 0.0
.text 1526528 1526544 16 0.0
all-clusters-minimal-app default (read/write) 1630796 1630812 16 0.0
.text 1471344 1471360 16 0.0
light-app default (read/write) 1552220 1552236 16 0.0
.text 1401072 1401088 16 0.0
lock-app default (read/write) 1589828 1589844 16 0.0
.text 1434208 1434224 16 0.0
telink lighting-app tlsr9518adk80d (read/write) 819708 819716 8 0.0
text 583812 583818 6 0.0
Decreases (10 builds for bl602, cc13x2_26x2, esp32, telink)
platform target config section 8fe4727 9213ea7 change % change
bl602 lighting-app bl602 (read/write) 1381330 1381314 -16 -0.0
.text 1051628 1051608 -20 -0.0
bl602+rpc (read/write) 1426746 1426730 -16 -0.0
.text 1083292 1083276 -16 -0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 183076 183052 -24 -0.0
lock-ftd LP_CC2652R7 (read/write) 170104 170096 -8 -0.0
lock-mtd LP_CC2652R7 (read/write) 183692 183684 -8 -0.0
pump-controller-app LP_CC2652R7 (read/write) 176048 176040 -8 -0.0
shell LP_CC2652R7 (read/write) 185880 185872 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1022462 1022440 -22 -0.0
.flash.text 1022462 1022440 -22 -0.0
m5stack (read only) 1076107 1076099 -8 -0.0
.flash.text 1070723 1070715 -8 -0.0
telink light-switch-app tlsr9518adk80d (read/write) 799600 799576 -24 -0.0
text 567238 567216 -22 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 8fe4727 9213ea7 change % change
bl602 lighting-app bl602 (read/write) 1381330 1381314 -16 -0.0
.bss 117618 117618 0 0.0
.data 4480 4480 0 0.0
.text 1051628 1051608 -20 -0.0
bl602+rpc (read/write) 1426746 1426730 -16 -0.0
.bss 125058 125058 0 0.0
.data 4600 4600 0 0.0
.text 1083292 1083276 -16 -0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668291 668315 24 0.0
(read/write) 183076 183052 -24 -0.0
.bss 74260 74260 0 0.0
.data 3356 3356 0 0.0
.rodata 88195 88195 0 0.0
.text 579780 579804 24 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633875 633891 16 0.0
(read/write) 157828 157828 0 0.0
.bss 73556 73556 0 0.0
.data 3356 3356 0 0.0
.rodata 77411 77411 0 0.0
.text 556140 556156 16 0.0
lock-ftd LP_CC2652R7 (read only) 671455 671463 8 0.0
(read/write) 170104 170096 -8 -0.0
.bss 71340 71340 0 0.0
.data 3280 3280 0 0.0
.rodata 76263 76263 0 0.0
.text 594712 594720 8 0.0
lock-mtd LP_CC2652R7 (read only) 653555 653563 8 0.0
(read/write) 183692 183684 -8 -0.0
.bss 67028 67028 0 0.0
.data 3280 3280 0 0.0
.rodata 100875 100875 0 0.0
.text 552200 552208 8 0.0
pump-app LP_CC2652R7 (read only) 680743 680743 0 0.0
(read/write) 161648 161648 0 0.0
.bss 71404 71404 0 0.0
.data 3280 3280 0 0.0
.rodata 88863 88863 0 0.0
.text 591396 591396 0 0.0
pump-controller-app LP_CC2652R7 (read only) 666479 666487 8 0.0
(read/write) 176048 176040 -8 -0.0
.bss 71540 71540 0 0.0
.data 3276 3276 0 0.0
.rodata 84679 84679 0 0.0
.text 581320 581328 8 0.0
shell LP_CC2652R7 (read only) 661006 661014 8 0.0
(read/write) 185880 185872 -8 -0.0
.bss 76580 76580 0 0.0
.data 3360 3360 0 0.0
.rodata 85166 85166 0 0.0
.text 575524 575532 8 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583206 583214 8 0.0
.app_xip_area 460016 460024 8 0.0
.bss 65648 65648 0 0.0
.data 728 728 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 589126 589134 8 0.0
.app_xip_area 461208 461216 8 0.0
.bss 70376 70376 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 588938 588946 8 0.0
.app_xip_area 466564 466572 8 0.0
.bss 64888 64888 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1087832 1087832 0 0.0
.bss 133284 133284 0 0.0
.data 2048 2048 0 0.0
.text 952480 952480 0 0.0
BRD4161A+rpc (read/write) 1142124 1142124 0 0.0
.bss 149964 149964 0 0.0
.data 2260 2260 0 0.0
.text 989880 989880 0 0.0
BRD4161A+rs911x (read/write) 973656 973656 0 0.0
.bss 161736 161736 0 0.0
.data 2048 2048 0 0.0
.text 809852 809852 0 0.0
lock-app BRD4161A+wf200 (read/write) 1128328 1128328 0 0.0
.bss 144368 144368 0 0.0
.data 2056 2056 0 0.0
.text 981884 981884 0 0.0
window-app BRD4161A (read/write) 1081308 1081308 0 0.0
.bss 134756 134756 0 0.0
.data 2076 2076 0 0.0
.text 944452 944452 0 0.0
esp32 all-clusters-app c3devkit (read only) 1022462 1022440 -22 -0.0
(read/write) 1486274 1486274 0 0.0
.dram0.bss 70296 70296 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 215936 215936 0 0.0
.flash.text 1022462 1022440 -22 -0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1076107 1076099 -8 -0.0
(read/write) 488312 488312 0 0.0
.dram0.bss 75808 75808 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246364 246364 0 0.0
.flash.text 1070723 1070715 -8 -0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 642600 642600 0 0.0
.bss 69736 69736 0 0.0
.data 2028 2028 0 0.0
.text 568108 568108 0 0.0
lock k32w0+release (read/write) 699832 699848 16 0.0
.bss 70176 70176 0 0.0
.data 2036 2036 0 0.0
.text 624892 624908 16 0.0
linux all-clusters-app debug (read only) 2989849 2990057 208 0.0
(read/write) 155584 155584 0 0.0
.bss 61888 61888 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 85272 85272 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 269067 269067 0 0.0
.text 2542210 2542418 208 0.0
all-clusters-minimal-app debug (read only) 2832889 2833081 192 0.0
(read/write) 147288 147288 0 0.0
.bss 61088 61088 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77864 77864 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1136 1136 0 0.0
.rodata 269227 269227 0 0.0
.text 2387698 2387890 192 0.0
bridge-app debug+rpc (read only) 2351177 2351321 144 0.0
(read/write) 127160 127160 0 0.0
.bss 50176 50176 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 67304 67304 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 201384 201384 0 0.0
.text 1987026 1987170 144 0.0
chip-tool debug (read only) 10412065 10412641 576 0.0
(read/write) 628376 628376 0 0.0
.bss 24856 24856 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 593744 593744 0 0.0
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 760 760 0 0.0
.rodata 535317 535317 0 0.0
.text 8431556 8432132 576 0.0
chip-tool-ipv6only arm64 (read only) 9829588 9830420 832 0.0
(read/write) 675729 675873 144 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 621080 621224 144 0.0
.dynamic 560 560 0 0.0
.got 13528 13528 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 467492 467492 0 0.0
.text 7786516 7787204 688 0.0
lighting-app debug+rpc (read only) 2574169 2574313 144 0.0
(read/write) 130096 130096 0 0.0
.bss 49728 49728 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72344 72344 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 217104 217104 0 0.0
.text 2186210 2186354 144 0.0
lock-app debug (read only) 2539185 2539313 128 0.0
(read/write) 125176 125176 0 0.0
.bss 48160 48160 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69352 69352 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 231984 231984 0 0.0
.text 2141122 2141250 128 0.0
ota-provider-app debug (read only) 2343545 2343673 128 0.0
(read/write) 118944 118944 0 0.0
.bss 47776 47776 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63336 63336 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 760 760 0 0.0
.rodata 207576 207576 0 0.0
.text 1972306 1972434 128 0.0
ota-requestor-app debug (read only) 2464553 2464761 208 0.0
(read/write) 126304 126304 0 0.0
.bss 50144 50144 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 67992 67992 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 211136 211136 0 0.0
.text 2081138 2081346 208 0.0
shell debug (read only) 2573377 2573521 144 0.0
(read/write) 141736 141736 0 0.0
.bss 57736 57736 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 76944 76944 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 1016 1016 0 0.0
.rodata 231250 231250 0 0.0
.text 2184066 2184210 144 0.0
thermostat-no-ble arm64 (read only) 2343388 2343516 128 0.0
(read/write) 141601 141633 32 0.0
.bss 55313 55313 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75856 75880 24 0.0
.dynamic 560 560 0 0.0
.got 4992 4992 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 138964 138964 0 0.0
.text 1967200 1967312 112 0.0
tv-app debug (read only) 3123553 3124129 576 0.0
(read/write) 257416 257416 0 0.0
.bss 167256 167256 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 78888 78888 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 253416 253416 0 0.0
.text 2681138 2681714 576 0.0
tv-casting-app debug (read only) 5378297 5378873 576 0.0
(read/write) 158592 158592 0 0.0
.bss 51352 51352 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98432 98432 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 1024 1024 0 0.0
.rodata 338513 338513 0 0.0
.text 4772706 4773282 576 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2450384 2450544 160 0.0
.bss 214516 214516 0 0.0
.data 5872 5872 0 0.0
.text 1413028 1413188 160 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1172691 1172691 0 0.0
bss 143140 143140 0 0.0
rodata 141828 141828 0 0.0
text 808808 808816 8 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1152743 1152743 0 0.0
bss 142376 142376 0 0.0
rodata 133360 133360 0 0.0
text 798120 798124 4 0.0
p6 all-clusters-app default (read only) 881560 881560 0 0.0
(read/write) 1686700 1686716 16 0.0
.bss 149136 149136 0 0.0
.data 2648 2648 0 0.0
.text 1526528 1526544 16 0.0
all-clusters-minimal-app default (read only) 882280 882280 0 0.0
(read/write) 1630796 1630812 16 0.0
.bss 148416 148416 0 0.0
.data 2648 2648 0 0.0
.text 1471344 1471360 16 0.0
light-app default (read only) 890584 890584 0 0.0
(read/write) 1552220 1552236 16 0.0
.bss 140320 140320 0 0.0
.data 2440 2440 0 0.0
.text 1401072 1401088 16 0.0
lock-app default (read only) 886112 886112 0 0.0
(read/write) 1589828 1589844 16 0.0
.bss 144776 144776 0 0.0
.data 2456 2456 0 0.0
.text 1434208 1434224 16 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799600 799576 -24 -0.0
bss 70816 70816 0 0.0
noinit 40416 40416 0 0.0
text 567238 567216 -22 -0.0
lighting-app tlsr9518adk80d (read/write) 819708 819716 8 0.0
bss 71660 71660 0 0.0
noinit 40416 40416 0 0.0
text 583812 583818 6 0.0

@yunhanw-google yunhanw-google merged commit 73d0fae into project-chip:master Jul 28, 2022
github-actions bot pushed a commit that referenced this pull request Jul 28, 2022
* Improve ProcessStatusResponse

-- Improve ProcessStatusResponse signature so that we can tell if the
error is caused by malformed status response or the error is from stored
value inside status response.

* address comments

* Fix unexpected non-StatusResponse handling.

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
woody-apple added a commit that referenced this pull request Jul 28, 2022
* Improve ProcessStatusResponse

-- Improve ProcessStatusResponse signature so that we can tell if the
error is caused by malformed status response or the error is from stored
value inside status response.

* address comments

* Fix unexpected non-StatusResponse handling.

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

Co-authored-by: yunhanw-google <yunhanw@google.com>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
* Improve ProcessStatusResponse

-- Improve ProcessStatusResponse signature so that we can tell if the
error is caused by malformed status response or the error is from stored
value inside status response.

* address comments

* Fix unexpected non-StatusResponse handling.

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
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.

3 participants