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

Get rid of the non-spec EMBER_ZCL_STATUS_INVALID_ARGUMENT value. #12192

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

@bzbarsky-apple bzbarsky-apple commented Nov 24, 2021

It used to be in the spec, but was then removed in favor of
INVALID_COMMAND or CONSTRAINT_ERROR. The value we are using for it
collides with the spec-defined NEEDS_TIMED_INTERACTION value.

Problem

See above.

Change overview

See above.

Testing

No behavior changes intended other than which error status is returned in some cases. I'm trying to stand up a way to test that via YAML right now, which is how I ran into this.

@github-actions
Copy link

github-actions bot commented Nov 24, 2021

PR #12192: Size comparison from 2e85d48 to 5f2a580

Increases (3 builds for linux)
platform target config section 2e85d48 5f2a580 change % change
linux chip-tool debug (read only) 5939053 5939149 96 0.0
.rodata 283922 283986 64 0.0
.text 5272773 5272805 32 0.0
ota-requestor-app debug .rodata 126240 126272 32 0.0
tv-app debug (read only) 1901081 1901209 128 0.0
.rodata 159317 159413 96 0.1
.text 1593874 1593906 32 0.0
Decreases (4 builds for efr32, linux, mbed)
platform target config section 2e85d48 5f2a580 change % change
efr32 lighting-app BRD4161A+rpc (read only) 742292 742116 -176 -0.0
.text 742284 742108 -176 -0.0
linux lighting-app debug+rpc (read only) 1602017 1601985 -32 -0.0
.text 1333202 1333170 -32 -0.0
ota-requestor-app debug (read only) 1392673 1392657 -16 -0.0
.text 1163602 1163554 -48 -0.0
mbed lighting-app CY8CPROTO_062_4343W+release (read/write) 2277344 2277280 -64 -0.0
.text 1239944 1239880 -64 -0.0
Full report (28 builds for efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
platform target config section 2e85d48 5f2a580 change % change
efr32 lighting-app BRD4161A (read only) 754832 754832 0 0.0
(read/write) 119796 119796 0 0.0
.bss 117980 117980 0 0.0
.data 1812 1812 0 0.0
.text 754824 754824 0 0.0
BRD4161A+rpc (read only) 742292 742116 -176 -0.0
(read/write) 136420 136420 0 0.0
.bss 134484 134484 0 0.0
.data 1936 1936 0 0.0
.text 742284 742108 -176 -0.0
lock-app BRD4161A (read only) 730688 730688 0 0.0
(read/write) 117508 117508 0 0.0
.bss 115740 115740 0 0.0
.data 1768 1768 0 0.0
.text 730680 730680 0 0.0
window-app BRD4161A (read only) 734136 734136 0 0.0
(read/write) 117868 117868 0 0.0
.bss 116092 116092 0 0.0
.data 1776 1776 0 0.0
.text 734128 734128 0 0.0
esp32 all-clusters-app c3devkit (read only) 834242 834242 0 0.0
(read/write) 1222658 1222658 0 0.0
.dram0.bss 57832 57832 0 0.0
.dram0.data 14100 14100 0 0.0
.flash.rodata 165464 165464 0 0.0
.flash.text 834242 834242 0 0.0
.iram0.text 61394 61394 0 0.0
m5stack (read only) 905103 905103 0 0.0
(read/write) 421956 421956 0 0.0
.dram0.bss 63224 63224 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 193388 193388 0 0.0
.flash.text 899719 899719 0 0.0
.iram0.text 122943 122943 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 710268 710268 0 0.0
.bss 77316 77316 0 0.0
.data 1924 1924 0 0.0
.text 625228 625228 0 0.0
lock-app k32w061+debug (read/write) 600480 600480 0 0.0
.bss 67756 67756 0 0.0
.data 1892 1892 0 0.0
.text 525032 525032 0 0.0
shell k32w061+debug (read/write) 665960 665960 0 0.0
.bss 78916 78916 0 0.0
.data 1860 1860 0 0.0
.text 579384 579384 0 0.0
linux all-clusters-app debug (read only) 1752673 1752673 0 0.0
(read/write) 129432 129432 0 0.0
.bss 58576 58576 0 0.0
.data 1138 1138 0 0.0
.data.rel.ro 64400 64400 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 576 576 0 0.0
.rodata 138485 138485 0 0.0
.text 1476178 1476178 0 0.0
bridge-app debug+rpc (read only) 1331405 1331405 0 0.0
(read/write) 77408 77408 0 0.0
.bss 41488 41488 0 0.0
.data 1680 1680 0 0.0
.data.rel.ro 29200 29200 0 0.0
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 424 424 0 0.0
.rodata 113044 113044 0 0.0
.text 1118581 1118581 0 0.0
chip-tool debug (read only) 5939053 5939149 96 0.0
(read/write) 196776 196776 0 0.0
.bss 39896 39896 0 0.0
.data 2384 2384 0 0.0
.data.rel.ro 148936 148936 0 0.0
.dynamic 592 592 0 0.0
.got 4456 4456 0 0.0
.init 27 27 0 0.0
.init_array 488 488 0 0.0
.rodata 283922 283986 64 0.0
.text 5272773 5272805 32 0.0
lighting-app debug+rpc (read only) 1602017 1601985 -32 -0.0
(read/write) 110688 110688 0 0.0
.bss 47216 47216 0 0.0
.data 1330 1330 0 0.0
.data.rel.ro 56800 56800 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 131409 131409 0 0.0
.text 1333202 1333170 -32 -0.0
ota-provider-app debug (read only) 1296153 1296153 0 0.0
(read/write) 75928 75928 0 0.0
.bss 44128 44128 0 0.0
.data 880 880 0 0.0
.data.rel.ro 25784 25784 0 0.0
.dynamic 592 592 0 0.0
.got 4048 4048 0 0.0
.init 27 27 0 0.0
.init_array 464 464 0 0.0
.rodata 114831 114831 0 0.0
.text 1081282 1081282 0 0.0
ota-requestor-app debug (read only) 1392673 1392657 -16 -0.0
(read/write) 79792 79792 0 0.0
.bss 46592 46592 0 0.0
.data 944 944 0 0.0
.data.rel.ro 27112 27112 0 0.0
.dynamic 592 592 0 0.0
.got 4032 4032 0 0.0
.init 27 27 0 0.0
.init_array 488 488 0 0.0
.rodata 126240 126272 32 0.0
.text 1163602 1163554 -48 -0.0
shell debug (read only) 820313 820313 0 0.0
(read/write) 66584 66584 0 0.0
.bss 23272 23272 0 0.0
.data 338 338 0 0.0
.data.rel.ro 38440 38440 0 0.0
.dynamic 592 592 0 0.0
.got 3560 3560 0 0.0
.init 27 27 0 0.0
.init_array 360 360 0 0.0
.rodata 79119 79119 0 0.0
.text 634770 634770 0 0.0
tv-app debug (read only) 1901081 1901209 128 0.0
(read/write) 319704 319704 0 0.0
.bss 249976 249976 0 0.0
.data 2880 2880 0 0.0
.data.rel.ro 61184 61184 0 0.0
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 632 632 0 0.0
.rodata 159317 159413 96 0.1
.text 1593874 1593906 32 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2293064 2293064 0 0.0
.bss 180388 180388 0 0.0
.data 5240 5240 0 0.0
.heap 850816 850816 0 0.0
.text 1255664 1255664 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2277344 2277280 -64 -0.0
.bss 172292 172292 0 0.0
.data 5592 5592 0 0.0
.heap 858560 858560 0 0.0
.text 1239944 1239880 -64 -0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2251664 2251664 0 0.0
.bss 171108 171108 0 0.0
.data 5576 5576 0 0.0
.heap 859760 859760 0 0.0
.text 1214264 1214264 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2051224 2051224 0 0.0
.bss 156320 156320 0 0.0
.data 4984 4984 0 0.0
.heap 875144 875144 0 0.0
.text 1013824 1013824 0 0.0
p6 all-clusters-app default (read/write) 2306904 2306904 0 0.0
.bss 113376 113376 0 0.0
.data 2536 2536 0 0.0
.heap 917432 917432 0 0.0
.text 1265168 1265168 0 0.0
lock-app default (read/write) 2218904 2218904 0 0.0
.bss 100968 100968 0 0.0
.data 2416 2416 0 0.0
.heap 929960 929960 0 0.0
.text 1177168 1177168 0 0.0
qpg lighting-app qpg6100+debug (read only) 497012 497012 0 0.0
(read/write) 114140 114140 0 0.0
.bss 50360 50360 0 0.0
.data 1020 1020 0 0.0
.text 491692 491692 0 0.0
lock-app qpg6100+debug (read only) 470916 470916 0 0.0
(read/write) 114144 114144 0 0.0
.bss 49232 49232 0 0.0
.data 976 976 0 0.0
.text 465596 465596 0 0.0
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8986 8986 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 771514 771514 0 0.0
bss 79216 79216 0 0.0
noinit 37160 37160 0 0.0
text 535570 535570 0 0.0

@tcarmelveilleux
Copy link
Contributor

It was added without checking the spec (which typically uses
INVALID_COMMAND or CONSTRAINT_ERROR for the cases this is ostensibly
meant to cover)

This is not quite true. INVALID_ARGUMENT was there after 1st ballot, but got removed when the language was tightened for INVALID_COMMAND and CONSTRAINT_ERROR.

@bzbarsky-apple
Copy link
Contributor Author

This is not quite true. INVALID_ARGUMENT was there after 1st ballot, but got removed when the language was tightened for INVALID_COMMAND and CONSTRAINT_ERROR.

Ah, this makes a lot of sense, ok.

@bzbarsky-apple bzbarsky-apple force-pushed the get-rid-of-invalid-argument-enum branch from 5f2a580 to d3caec8 Compare November 24, 2021 17:08
It used to be in the spec, but was then removed in favor of
INVALID_COMMAND or CONSTRAINT_ERROR.  The value we are using for it
collides with the spec-defined NEEDS_TIMED_INTERACTION value.
@bzbarsky-apple bzbarsky-apple force-pushed the get-rid-of-invalid-argument-enum branch from d3caec8 to c0c43a7 Compare November 24, 2021 19:35
@github-actions
Copy link

github-actions bot commented Nov 24, 2021

PR #12192: Size comparison from 8bfdc13 to c0c43a7

Increases (3 builds for linux)
platform target config section 8bfdc13 c0c43a7 change % change
linux chip-tool debug (read only) 5959517 5959613 96 0.0
.rodata 283880 283944 64 0.0
.text 5291957 5291989 32 0.0
ota-requestor-app debug (read only) 1403353 1403385 32 0.0
.rodata 126080 126144 64 0.1
tv-app debug (read only) 1912529 1912673 144 0.0
.rodata 159176 159272 96 0.1
.text 1605154 1605202 48 0.0
Decreases (5 builds for efr32, linux, mbed, nrfconnect)
platform target config section 8bfdc13 c0c43a7 change % change
efr32 lighting-app BRD4161A+rpc (read only) 744644 744468 -176 -0.0
.text 744636 744460 -176 -0.0
linux lighting-app debug+rpc (read only) 1615929 1615913 -16 -0.0
.text 1346994 1346978 -16 -0.0
ota-requestor-app debug .text 1174130 1174098 -32 -0.0
mbed lighting-app CY8CPROTO_062_4343W+release (read/write) 2278352 2278288 -64 -0.0
.text 1240952 1240888 -64 -0.0
nrfconnect lighting-app nrf52840dk_nrf52840+rpc (read/write) 833371 833355 -16 -0.0
text 560380 560372 -8 -0.0
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 8bfdc13 c0c43a7 change % change
efr32 lighting-app BRD4161A (read only) 757184 757184 0 0.0
(read/write) 119788 119788 0 0.0
.bss 117972 117972 0 0.0
.data 1816 1816 0 0.0
.text 757176 757176 0 0.0
BRD4161A+rpc (read only) 744644 744468 -176 -0.0
(read/write) 136416 136416 0 0.0
.bss 134476 134476 0 0.0
.data 1940 1940 0 0.0
.text 744636 744460 -176 -0.0
lock-app BRD4161A (read only) 733040 733040 0 0.0
(read/write) 117508 117508 0 0.0
.bss 115732 115732 0 0.0
.data 1772 1772 0 0.0
.text 733032 733032 0 0.0
window-app BRD4161A (read only) 736488 736488 0 0.0
(read/write) 117868 117868 0 0.0
.bss 116084 116084 0 0.0
.data 1780 1780 0 0.0
.text 736480 736480 0 0.0
esp32 all-clusters-app c3devkit (read only) 835374 835374 0 0.0
(read/write) 1222586 1222586 0 0.0
.dram0.bss 57952 57952 0 0.0
.dram0.data 14100 14100 0 0.0
.flash.rodata 165280 165280 0 0.0
.flash.text 835374 835374 0 0.0
.iram0.text 61394 61394 0 0.0
m5stack (read only) 906835 906835 0 0.0
(read/write) 421852 421852 0 0.0
.dram0.bss 63344 63344 0 0.0
.dram0.data 34072 34072 0 0.0
.flash.rodata 193156 193156 0 0.0
.flash.text 901451 901451 0 0.0
.iram0.text 122943 122943 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 718472 718472 0 0.0
.bss 78252 78252 0 0.0
.data 1952 1952 0 0.0
.text 632468 632468 0 0.0
lock-app k32w061+debug (read/write) 608764 608764 0 0.0
.bss 68692 68692 0 0.0
.data 1920 1920 0 0.0
.text 532352 532352 0 0.0
shell k32w061+debug (read/write) 674164 674164 0 0.0
.bss 79852 79852 0 0.0
.data 1888 1888 0 0.0
.text 586624 586624 0 0.0
linux all-clusters-app debug (read only) 1767121 1767121 0 0.0
(read/write) 129880 129880 0 0.0
.bss 58800 58800 0 0.0
.data 1170 1170 0 0.0
.data.rel.ro 64608 64608 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 576 576 0 0.0
.rodata 138293 138293 0 0.0
.text 1490482 1490482 0 0.0
bridge-app debug+rpc (read only) 1342765 1342765 0 0.0
(read/write) 77824 77824 0 0.0
.bss 41712 41712 0 0.0
.data 1680 1680 0 0.0
.data.rel.ro 29384 29384 0 0.0
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 424 424 0 0.0
.rodata 112924 112924 0 0.0
.text 1129749 1129749 0 0.0
chip-tool debug (read only) 5959517 5959613 96 0.0
(read/write) 197584 197584 0 0.0
.bss 40064 40064 0 0.0
.data 2384 2384 0 0.0
.data.rel.ro 149552 149552 0 0.0
.dynamic 592 592 0 0.0
.got 4456 4456 0 0.0
.init 27 27 0 0.0
.init_array 488 488 0 0.0
.rodata 283880 283944 64 0.0
.text 5291957 5291989 32 0.0
lighting-app debug+rpc (read only) 1615929 1615913 -16 -0.0
(read/write) 111072 111072 0 0.0
.bss 47408 47408 0 0.0
.data 1362 1362 0 0.0
.data.rel.ro 56976 56976 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 131217 131217 0 0.0
.text 1346994 1346978 -16 -0.0
ota-provider-app debug (read only) 1306817 1306817 0 0.0
(read/write) 76312 76312 0 0.0
.bss 44320 44320 0 0.0
.data 912 912 0 0.0
.data.rel.ro 25944 25944 0 0.0
.dynamic 592 592 0 0.0
.got 4048 4048 0 0.0
.init 27 27 0 0.0
.init_array 464 464 0 0.0
.rodata 114640 114640 0 0.0
.text 1091826 1091826 0 0.0
ota-requestor-app debug (read only) 1403353 1403385 32 0.0
(read/write) 80144 80144 0 0.0
.bss 46752 46752 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27272 27272 0 0.0
.dynamic 592 592 0 0.0
.got 4032 4032 0 0.0
.init 27 27 0 0.0
.init_array 488 488 0 0.0
.rodata 126080 126144 64 0.1
.text 1174130 1174098 -32 -0.0
shell debug (read only) 820129 820129 0 0.0
(read/write) 66936 66936 0 0.0
.bss 23496 23496 0 0.0
.data 338 338 0 0.0
.data.rel.ro 38560 38560 0 0.0
.dynamic 592 592 0 0.0
.got 3560 3560 0 0.0
.init 27 27 0 0.0
.init_array 360 360 0 0.0
.rodata 78927 78927 0 0.0
.text 634514 634514 0 0.0
tv-app debug (read only) 1912529 1912673 144 0.0
(read/write) 320088 320088 0 0.0
.bss 250168 250168 0 0.0
.data 2880 2880 0 0.0
.data.rel.ro 61368 61368 0 0.0
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 632 632 0 0.0
.rodata 159176 159272 96 0.1
.text 1605154 1605202 48 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2294096 2294096 0 0.0
.bss 180500 180500 0 0.0
.data 5240 5240 0 0.0
.heap 850704 850704 0 0.0
.text 1256696 1256696 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2278352 2278288 -64 -0.0
.bss 172404 172404 0 0.0
.data 5600 5600 0 0.0
.heap 858440 858440 0 0.0
.text 1240952 1240888 -64 -0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2252672 2252672 0 0.0
.bss 171220 171220 0 0.0
.data 5584 5584 0 0.0
.heap 859640 859640 0 0.0
.text 1215272 1215272 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2050800 2050800 0 0.0
.bss 156424 156424 0 0.0
.data 4984 4984 0 0.0
.heap 875040 875040 0 0.0
.text 1013400 1013400 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 871003 871003 0 0.0
bss 112632 112632 0 0.0
rodata 96516 96516 0 0.0
text 586212 586212 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 833371 833355 -16 -0.0
bss 108984 108984 0 0.0
rodata 87700 87700 0 0.0
text 560380 560372 -8 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 796046 796046 0 0.0
bss 114004 114004 0 0.0
rodata 91776 91776 0 0.0
text 515676 515676 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 843095 843095 0 0.0
bss 109664 109664 0 0.0
rodata 92520 92520 0 0.0
text 565456 565456 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 768398 768398 0 0.0
bss 111076 111076 0 0.0
rodata 87808 87808 0 0.0
text 495012 495012 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497327 497327 0 0.0
bss 51824 51824 0 0.0
rodata 45780 45780 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 849227 849227 0 0.0
bss 109804 109804 0 0.0
rodata 94228 94228 0 0.0
text 569640 569640 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 842819 842819 0 0.0
bss 109700 109700 0 0.0
rodata 92476 92476 0 0.0
text 565076 565076 0 0.0
shell nrf52840dk_nrf52840 (read/write) 778311 778311 0 0.0
bss 109168 109168 0 0.0
rodata 72996 72996 0 0.0
text 521532 521532 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 693350 693350 0 0.0
bss 110152 110152 0 0.0
rodata 67640 67640 0 0.0
text 442140 442140 0 0.0
p6 all-clusters-app default (read/write) 2309592 2309592 0 0.0
.bss 113496 113496 0 0.0
.data 2544 2544 0 0.0
.heap 917304 917304 0 0.0
.text 1267856 1267856 0 0.0
lock-app default (read/write) 2221608 2221608 0 0.0
.bss 101080 101080 0 0.0
.data 2416 2416 0 0.0
.heap 929848 929848 0 0.0
.text 1179872 1179872 0 0.0
qpg lighting-app qpg6100+debug (read only) 498732 498732 0 0.0
(read/write) 114140 114140 0 0.0
.bss 50368 50368 0 0.0
.data 1020 1020 0 0.0
.text 493412 493412 0 0.0
lock-app qpg6100+debug (read only) 472636 472636 0 0.0
(read/write) 114144 114144 0 0.0
.bss 49240 49240 0 0.0
.data 976 976 0 0.0
.text 467316 467316 0 0.0
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8986 8986 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 772402 772402 0 0.0
bss 79208 79208 0 0.0
noinit 37160 37160 0 0.0
text 536460 536460 0 0.0

@andy31415
Copy link
Contributor

fast track: several checkmarks, PR up for a while, straight forward update/rename.

@andy31415 andy31415 merged commit 195e710 into project-chip:master Nov 25, 2021
@bzbarsky-apple bzbarsky-apple deleted the get-rid-of-invalid-argument-enum branch November 25, 2021 16:46
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.

6 participants