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

Stop requiring a fabric index to be provided when writing fabric-scoped structs with chip-tool. #17145

Conversation

bzbarsky-apple
Copy link
Contributor

It's ignored on the server anyway, so no need to require people to send it.

Problem

Consumers have to write things like:

chip-tool accesscontrol write acl '[{"fabricIndex": 0, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}]'

and then the fabric index gets ignored.

Change overview

Allow writing:

chip-tool accesscontrol write acl '[{"privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}]'

and having it work.

Testing

Checked that parsing the new syntax does not fail. Examined the generated code to make sure it's sane.

…ed structs with chip-tool.

It's ignored on the server anyway, so no need to require people to send it.
Copy link
Contributor

@mlepage-google mlepage-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O frabjous day, calloo, callay!

@github-actions
Copy link

github-actions bot commented Apr 6, 2022

PR #17145: Size comparison from e434e64 to 5f7212b

Decreases (2 builds for linux)
platform target config section e434e64 5f7212b change % change
linux chip-tool debug (read only) 10675509 10674597 -912 -0.0
.rodata 537845 537589 -256 -0.0
.text 9308869 9308213 -656 -0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 10278076 10277500 -576 -0.0
.rodata 512364 512204 -160 -0.0
.text 8662932 8662516 -416 -0.0
Full report (28 builds for cc13x2_26x2, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section e434e64 5f7212b change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read only) 674371 674371 0 0.0
(read/write) 177140 177140 0 0.0
.bss 81552 81552 0 0.0
.data 3168 3168 0 0.0
.rodata 80555 80555 0 0.0
.text 593336 593336 0 0.0
lock-mtd LP_CC2652R7 (read only) 623515 623515 0 0.0
(read/write) 154304 154304 0 0.0
.bss 77280 77280 0 0.0
.data 3168 3168 0 0.0
.rodata 80443 80443 0 0.0
.text 542584 542584 0 0.0
pump-app LP_CC2652R7 (read only) 691687 691687 0 0.0
(read/write) 160984 160984 0 0.0
.bss 81944 81944 0 0.0
.data 3200 3200 0 0.0
.rodata 82487 82487 0 0.0
.text 608716 608716 0 0.0
pump-controller-app LP_CC2652R7 (read only) 676059 676059 0 0.0
(read/write) 176356 176356 0 0.0
.bss 81688 81688 0 0.0
.data 3164 3164 0 0.0
.rodata 78987 78987 0 0.0
.text 596588 596588 0 0.0
efr32 lighting-app BRD4161A (read only) 904604 904604 0 0.0
(read/write) 133144 133144 0 0.0
.bss 131152 131152 0 0.0
.data 1992 1992 0 0.0
.text 904596 904596 0 0.0
BRD4161A+rpc (read only) 932492 932492 0 0.0
(read/write) 149092 149092 0 0.0
.bss 146920 146920 0 0.0
.data 2172 2172 0 0.0
.text 932484 932484 0 0.0
window-app BRD4161A (read only) 841964 841964 0 0.0
(read/write) 131204 131204 0 0.0
.bss 129328 129328 0 0.0
.data 1876 1876 0 0.0
.text 841956 841956 0 0.0
esp32 all-clusters-app c3devkit (read only) 991800 991800 0 0.0
(read/write) 1461506 1461506 0 0.0
.dram0.bss 63000 63000 0 0.0
.dram0.data 14260 14260 0 0.0
.flash.rodata 198760 198760 0 0.0
.flash.text 991800 991800 0 0.0
.iram0.text 62572 62572 0 0.0
m5stack (read only) 1044439 1044439 0 0.0
(read/write) 462560 462560 0 0.0
.dram0.bss 68528 68528 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 227824 227824 0 0.0
.flash.text 1039055 1039055 0 0.0
.iram0.text 123415 123415 0 0.0
k32w light k32w061+release (read/write) 684940 684940 0 0.0
.bss 78240 78240 0 0.0
.data 1988 1988 0 0.0
.text 598912 598912 0 0.0
lock k32w061+release (read/write) 689780 689780 0 0.0
.bss 78816 78816 0 0.0
.data 1948 1948 0 0.0
.text 603216 603216 0 0.0
linux all-clusters-app debug (read only) 2617801 2617801 0 0.0
(read/write) 145384 145384 0 0.0
.bss 57856 57856 0 0.0
.data 1408 1408 0 0.0
.data.rel.ro 80232 80232 0 0.0
.dynamic 592 592 0 0.0
.got 4312 4312 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 222117 222117 0 0.0
.text 2226994 2226994 0 0.0
bridge-app debug+rpc (read only) 1826685 1826685 0 0.0
(read/write) 90824 90824 0 0.0
.bss 44792 44792 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 38904 38904 0 0.0
.dynamic 592 592 0 0.0
.got 3928 3928 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 148249 148249 0 0.0
.text 1561157 1561157 0 0.0
chip-tool debug (read only) 10675509 10674597 -912 -0.0
(read/write) 371640 371640 0 0.0
.bss 22784 22784 0 0.0
.data 1040 1040 0 0.0
.data.rel.ro 341584 341584 0 0.0
.dynamic 624 624 0 0.0
.got 4928 4928 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 537845 537589 -256 -0.0
.text 9308869 9308213 -656 -0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 10278076 10277500 -576 -0.0
(read/write) 492033 492033 0 0.0
.bss 41041 41041 0 0.0
.data 1120 1120 0 0.0
.data.rel.ro 388704 388704 0 0.0
.dynamic 560 560 0 0.0
.got 57360 57360 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 512364 512204 -160 -0.0
.text 8662932 8662516 -416 -0.0
door-lock-app debug (read only) 2097897 2097897 0 0.0
(read/write) 118864 118864 0 0.0
.bss 48128 48128 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 64024 64024 0 0.0
.dynamic 592 592 0 0.0
.got 4256 4256 0 0.0
.init 27 27 0 0.0
.init_array 680 680 0 0.0
.rodata 186281 186281 0 0.0
.text 1757154 1757154 0 0.0
lighting-app debug+rpc (read only) 2277817 2277817 0 0.0
(read/write) 125920 125920 0 0.0
.bss 49472 49472 0 0.0
.data 1600 1600 0 0.0
.data.rel.ro 69160 69160 0 0.0
.dynamic 608 608 0 0.0
.got 4304 4304 0 0.0
.init 27 27 0 0.0
.init_array 760 760 0 0.0
.rodata 180489 180489 0 0.0
.text 1933378 1933378 0 0.0
ota-provider-app debug (read only) 2036033 2036033 0 0.0
(read/write) 114432 114432 0 0.0
.bss 47968 47968 0 0.0
.data 1384 1384 0 0.0
.data.rel.ro 59352 59352 0 0.0
.dynamic 608 608 0 0.0
.got 4456 4456 0 0.0
.init 27 27 0 0.0
.init_array 632 632 0 0.0
.rodata 172291 172291 0 0.0
.text 1708370 1708370 0 0.0
ota-requestor-app debug (read only) 2065313 2065313 0 0.0
(read/write) 117720 117720 0 0.0
.bss 48928 48928 0 0.0
.data 1608 1608 0 0.0
.data.rel.ro 61592 61592 0 0.0
.dynamic 592 592 0 0.0
.got 4296 4296 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 168660 168660 0 0.0
.text 1739506 1739506 0 0.0
shell debug (read only) 2512873 2512873 0 0.0
(read/write) 148912 148912 0 0.0
.bss 67560 67560 0 0.0
.data 848 848 0 0.0
.data.rel.ro 74776 74776 0 0.0
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 213714 213714 0 0.0
.text 2139954 2139954 0 0.0
thermostat-no-ble arm64 (read only) 2344332 2344332 0 0.0
(read/write) 150257 150257 0 0.0
.bss 63169 63169 0 0.0
.data 1136 1136 0 0.0
.data.rel.ro 78184 78184 0 0.0
.dynamic 560 560 0 0.0
.got 4752 4752 0 0.0
.init 24 24 0 0.0
.init_array 368 368 0 0.0
.rodata 144348 144348 0 0.0
.text 1972832 1972832 0 0.0
tv-app debug (read only) 2787073 2787073 0 0.0
(read/write) 250488 250488 0 0.0
.bss 165576 165576 0 0.0
.data 3360 3360 0 0.0
.data.rel.ro 75360 75360 0 0.0
.dynamic 592 592 0 0.0
.got 4672 4672 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 212363 212363 0 0.0
.text 2395234 2395234 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2366708 2366708 0 0.0
.bss 185092 185092 0 0.0
.data 5792 5792 0 0.0
.text 1329308 1329308 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1153039 1153039 0 0.0
bss 135604 135604 0 0.0
rodata 145608 145608 0 0.0
text 793252 793252 0 0.0
p6 all-clusters-app default (read/write) 2512064 2512064 0 0.0
.bss 118528 118528 0 0.0
.data 2672 2672 0 0.0
.text 1470328 1470328 0 0.0
light-app default (read/write) 2413264 2413264 0 0.0
.bss 111992 111992 0 0.0
.data 2528 2528 0 0.0
.text 1371528 1371528 0 0.0
lock-app default (read/write) 2376944 2376944 0 0.0
.bss 111736 111736 0 0.0
.data 2488 2488 0 0.0
.text 1335208 1335208 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 798964 798964 0 0.0
bss 70096 70096 0 0.0
noinit 40416 40416 0 0.0
text 568074 568074 0 0.0

@bzbarsky-apple bzbarsky-apple merged commit 845b38d into project-chip:master Apr 7, 2022
@bzbarsky-apple bzbarsky-apple deleted the chip-tool-no-fabric-index-required branch April 7, 2022 13:40
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
…ed structs with chip-tool. (project-chip#17145)

It's ignored on the server anyway, so no need to require people to send it.
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