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

Separate DataModel APIs for encoding fabric-sensitive structs #15284

Merged

Conversation

mrjerryjohns
Copy link
Contributor

@mrjerryjohns mrjerryjohns commented Feb 16, 2022

This builds upon @bzbarsky-apple 's original PR #15268 based upon discussions with him to create separate DataModel::EncodeForWrite/DataModel::EncodeForRead APIs that only apply to fabric-scoped structs. The latter requires passing an additional accessingFabricIndex argument as well that will be used in the future to omit fabric sensitive fields.

This is then used (for now) to omit encoding the fabric index on writes. On the read side, the AttributeReportBuilder::EncodeValue will now correctly call EncodeForRead vs Encode for fabric-scoped structs and non-scoped structs respectively.

The Encode API is removed from fabric-scoped structs. This permits catching incorrect uses of that API without passing in an accessing fabric in the relevant contexts.

This consciously created set of distinct methods for write vs. read permit an um-ambiguous way for callers to express the intention of the encoding and to correctly omit the fabric index on writes.

This will also be used later to correctly omit/include fabric-sensitive bits as well in a future PR.

Tests: Ran chip-tool to write an ACL entry and confirmed that that the fabric index field is omitted on writes.

This builds upon bzbarsky's original PR project-chip#15268 based upon discussions
with him to create separate EncodeForWrite/EncodeForRead APIs that only
apply to fabric-scoped structs.

This is then used (for now) to omit encoding the fabric index on writes.

Tests: Ran chip-tool to write an ACL entry and confirmed that that the
fabric index field is omitted on writes.
@mrjerryjohns mrjerryjohns force-pushed the im/omit-fabric-idx-write branch from 6232da9 to 8585c34 Compare February 16, 2022 23:26
src/app/AttributeAccessInterface.h Show resolved Hide resolved
src/app/EventLogging.h Outdated Show resolved Hide resolved
src/app/data-model/Encode.h Show resolved Hide resolved
src/app/data-model/Encode.h Show resolved Hide resolved
src/app/data-model/Encode.h Outdated Show resolved Hide resolved
src/app/data-model/Encode.h Outdated Show resolved Hide resolved
src/app/data-model/List.h Outdated Show resolved Hide resolved
src/app/zap-templates/partials/cluster-objects-struct.zapt Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Feb 16, 2022

PR #15284: Size comparison from 72896fc to 8585c34

Increases (16 builds for cyw30739, efr32, k32w, linux, p6, qpg, telink)
platform target config section 72896fc 8585c34 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 597326 597482 156 0.0
.app_xip_area 501244 501400 156 0.0
lock cyw930739m2evb_01 (read/write) 555266 555394 128 0.0
.app_xip_area 460752 460880 128 0.0
ota-requestor cyw930739m2evb_01 (read/write) 576378 576530 152 0.0
.app_xip_area 472432 472584 152 0.0
efr32 lighting-app BRD4161A (read only) 914204 914508 304 0.0
.text 914196 914500 304 0.0
BRD4161A+rpc (read only) 942896 943200 304 0.0
.text 942888 943192 304 0.0
window-app BRD4161A (read only) 848064 848240 176 0.0
.text 848056 848232 176 0.0
k32w light k32w061+release (read/write) 691332 691492 160 0.0
.text 605236 605396 160 0.0
lock k32w061+release (read/write) 693964 694092 128 0.0
.text 607612 607740 128 0.0
linux chip-tool-ipv6only arm64 (read only) 8332420 8332948 528 0.0
.text 7133924 7134452 528 0.0
thermostat-no-ble arm64 (read only) 2162268 2163164 896 0.0
.text 1810064 1810960 896 0.0
p6 all-clusters-app default (read/write) 2485928 2486232 304 0.0
.text 1444192 1444496 304 0.0
light-app default (read/write) 2392816 2393072 256 0.0
.text 1351080 1351336 256 0.0
lock-app default (read/write) 2356280 2356472 192 0.0
.text 1314544 1314736 192 0.0
qpg lighting-app qpg6105+debug (read only) 598816 599000 184 0.0
.text 593496 593680 184 0.0
lock-app qpg6105+debug (read only) 564440 564600 160 0.0
.text 559120 559280 160 0.0
telink lighting-app tlsr9518adk80d (read/write) 877618 877786 168 0.0
text 618038 618212 174 0.0
Full report (17 builds for cyw30739, efr32, k32w, linux, p6, qpg, telink)
platform target config section 72896fc 8585c34 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 597326 597482 156 0.0
.app_xip_area 501244 501400 156 0.0
.bss 78780 78780 0 0.0
.data 644 644 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 555266 555394 128 0.0
.app_xip_area 460752 460880 128 0.0
.bss 77252 77252 0 0.0
.data 608 608 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 576378 576530 152 0.0
.app_xip_area 472432 472584 152 0.0
.bss 86356 86356 0 0.0
.data 552 552 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 914204 914508 304 0.0
(read/write) 129524 129524 0 0.0
.bss 127488 127488 0 0.0
.data 2036 2036 0 0.0
.text 914196 914500 304 0.0
BRD4161A+rpc (read only) 942896 943200 304 0.0
(read/write) 146440 146440 0 0.0
.bss 144264 144264 0 0.0
.data 2176 2176 0 0.0
.text 942888 943192 304 0.0
window-app BRD4161A (read only) 848064 848240 176 0.0
(read/write) 127416 127416 0 0.0
.bss 125512 125512 0 0.0
.data 1904 1904 0 0.0
.text 848056 848232 176 0.0
k32w light k32w061+release (read/write) 691332 691492 160 0.0
.bss 78384 78384 0 0.0
.data 1912 1912 0 0.0
.text 605236 605396 160 0.0
lock k32w061+release (read/write) 693964 694092 128 0.0
.bss 78600 78600 0 0.0
.data 1952 1952 0 0.0
.text 607612 607740 128 0.0
linux chip-tool-ipv6only arm64 (read only) 8332420 8332948 528 0.0
(read/write) 362609 362609 0 0.0
.bss 58961 58961 0 0.0
.data 1216 1216 0 0.0
.data.rel.ro 249368 249368 0 0.0
.dynamic 560 560 0 0.0
.got 49272 49272 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 435804 435804 0 0.0
.text 7133924 7134452 528 0.0
thermostat-no-ble arm64 (read only) 2162268 2163164 896 0.0
(read/write) 150737 150737 0 0.0
.bss 67489 67489 0 0.0
.data 1032 1032 0 0.0
.data.rel.ro 75024 75024 0 0.0
.dynamic 560 560 0 0.0
.got 4208 4208 0 0.0
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 133580 133580 0 0.0
.text 1810064 1810960 896 0.0
p6 all-clusters-app default (read/write) 2485928 2486232 304 0.0
.bss 124232 124232 0 0.0
.data 2672 2672 0 0.0
.text 1444192 1444496 304 0.0
light-app default (read/write) 2392816 2393072 256 0.0
.bss 113912 113912 0 0.0
.data 2528 2528 0 0.0
.text 1351080 1351336 256 0.0
lock-app default (read/write) 2356280 2356472 192 0.0
.bss 113640 113640 0 0.0
.data 2488 2488 0 0.0
.text 1314544 1314736 192 0.0
qpg lighting-app qpg6105+debug (read only) 598816 599000 184 0.0
(read/write) 146940 146940 0 0.0
.bss 90744 90744 0 0.0
.data 1112 1112 0 0.0
.text 593496 593680 184 0.0
lock-app qpg6105+debug (read only) 564440 564600 160 0.0
(read/write) 146940 146940 0 0.0
.bss 90728 90728 0 0.0
.data 1064 1064 0 0.0
.text 559120 559280 160 0.0
persistent-storage-app qpg6105+debug (read only) 99520 99520 0 0.0
(read/write) 146940 146940 0 0.0
.bss 24004 24004 0 0.0
.data 176 176 0 0.0
.text 94200 94200 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 877618 877786 168 0.0
bss 87520 87520 0 0.0
noinit 37160 37160 0 0.0
text 618038 618212 174 0.0

@github-actions
Copy link

github-actions bot commented Feb 17, 2022

PR #15284: Size comparison from 72896fc to d5a25c8

Increases (22 builds for cyw30739, efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
platform target config section 72896fc d5a25c8 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 597326 597782 456 0.1
.app_xip_area 501244 501700 456 0.1
lock cyw930739m2evb_01 (read/write) 555266 555686 420 0.1
.app_xip_area 460752 461172 420 0.1
ota-requestor cyw930739m2evb_01 (read/write) 576378 576838 460 0.1
.app_xip_area 472432 472892 460 0.1
efr32 lighting-app BRD4161A (read only) 914204 914964 760 0.1
.text 914196 914956 760 0.1
BRD4161A+rpc (read only) 942896 943656 760 0.1
.text 942888 943648 760 0.1
window-app BRD4161A (read only) 848064 848664 600 0.1
.text 848056 848656 600 0.1
esp32 all-clusters-app c3devkit (read only) 947660 948148 488 0.1
(read/write) 1401170 1401178 8 0.0
.flash.rodata 199704 199712 8 0.0
.flash.text 947660 948148 488 0.1
m5stack (read only) 997411 997851 440 0.0
(read/write) 466412 466420 8 0.0
.flash.rodata 226788 226796 8 0.0
.flash.text 992027 992467 440 0.0
k32w light k32w061+release (read/write) 691332 691804 472 0.1
.text 605236 605708 472 0.1
lock k32w061+release (read/write) 693964 694372 408 0.1
.text 607612 608020 408 0.1
linux chip-tool-ipv6only arm64 (read only) 8332420 8333812 1392 0.0
.rodata 435804 435820 16 0.0
.text 7133924 7135300 1376 0.0
thermostat-no-ble arm64 (read only) 2162268 2164444 2176 0.1
.rodata 133580 133596 16 0.0
.text 1810064 1812224 2160 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2428444 2428956 512 0.0
.text 1391016 1391528 512 0.0
lighting-app CY8CPROTO_062_4343W+release (read/write) 2391644 2392156 512 0.0
.text 1354216 1354728 512 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2327080 2327472 392 0.0
.text 1289680 1290072 392 0.0
shell CY8CPROTO_062_4343W+release (read/write) 2317916 2318364 448 0.0
.text 1280488 1280936 448 0.0
p6 all-clusters-app default (read/write) 2485928 2486672 744 0.0
.text 1444192 1444936 744 0.1
light-app default (read/write) 2392816 2393512 696 0.0
.text 1351080 1351776 696 0.1
lock-app default (read/write) 2356280 2356896 616 0.0
.text 1314544 1315160 616 0.0
qpg lighting-app qpg6105+debug (read only) 598816 599324 508 0.1
.text 593496 594004 508 0.1
lock-app qpg6105+debug (read only) 564440 564908 468 0.1
.text 559120 559588 468 0.1
telink lighting-app tlsr9518adk80d (read/write) 877618 878138 520 0.1
text 618038 618554 516 0.1
Full report (24 builds for cyw30739, efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
platform target config section 72896fc d5a25c8 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 597326 597782 456 0.1
.app_xip_area 501244 501700 456 0.1
.bss 78780 78780 0 0.0
.data 644 644 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 555266 555686 420 0.1
.app_xip_area 460752 461172 420 0.1
.bss 77252 77252 0 0.0
.data 608 608 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 576378 576838 460 0.1
.app_xip_area 472432 472892 460 0.1
.bss 86356 86356 0 0.0
.data 552 552 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 914204 914964 760 0.1
(read/write) 129524 129524 0 0.0
.bss 127488 127488 0 0.0
.data 2036 2036 0 0.0
.text 914196 914956 760 0.1
BRD4161A+rpc (read only) 942896 943656 760 0.1
(read/write) 146440 146440 0 0.0
.bss 144264 144264 0 0.0
.data 2176 2176 0 0.0
.text 942888 943648 760 0.1
window-app BRD4161A (read only) 848064 848664 600 0.1
(read/write) 127416 127416 0 0.0
.bss 125512 125512 0 0.0
.data 1904 1904 0 0.0
.text 848056 848656 600 0.1
esp32 all-clusters-app c3devkit (read only) 947660 948148 488 0.1
(read/write) 1401170 1401178 8 0.0
.dram0.bss 68296 68296 0 0.0
.dram0.data 14268 14268 0 0.0
.flash.rodata 199704 199712 8 0.0
.flash.text 947660 948148 488 0.1
.iram0.text 62056 62056 0 0.0
m5stack (read only) 997411 997851 440 0.0
(read/write) 466412 466420 8 0.0
.dram0.bss 73432 73432 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 226788 226796 8 0.0
.flash.text 992027 992467 440 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 691332 691804 472 0.1
.bss 78384 78384 0 0.0
.data 1912 1912 0 0.0
.text 605236 605708 472 0.1
lock k32w061+release (read/write) 693964 694372 408 0.1
.bss 78600 78600 0 0.0
.data 1952 1952 0 0.0
.text 607612 608020 408 0.1
linux chip-tool-ipv6only arm64 (read only) 8332420 8333812 1392 0.0
(read/write) 362609 362609 0 0.0
.bss 58961 58961 0 0.0
.data 1216 1216 0 0.0
.data.rel.ro 249368 249368 0 0.0
.dynamic 560 560 0 0.0
.got 49272 49272 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 435804 435820 16 0.0
.text 7133924 7135300 1376 0.0
thermostat-no-ble arm64 (read only) 2162268 2164444 2176 0.1
(read/write) 150737 150737 0 0.0
.bss 67489 67489 0 0.0
.data 1032 1032 0 0.0
.data.rel.ro 75024 75024 0 0.0
.dynamic 560 560 0 0.0
.got 4208 4208 0 0.0
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 133580 133596 16 0.0
.text 1810064 1812224 2160 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2428444 2428956 512 0.0
.bss 195916 195916 0 0.0
.data 5328 5328 0 0.0
.text 1391016 1391528 512 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2391644 2392156 512 0.0
.bss 188448 188448 0 0.0
.data 5632 5632 0 0.0
.text 1354216 1354728 512 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2327080 2327472 392 0.0
.bss 187424 187424 0 0.0
.data 5608 5608 0 0.0
.text 1289680 1290072 392 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139840 1139840 0 0.0
.bss 11796 11796 0 0.0
.data 4368 4368 0 0.0
.text 103224 103224 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2317916 2318364 448 0.0
.bss 185972 185972 0 0.0
.data 5440 5440 0 0.0
.text 1280488 1280936 448 0.0
p6 all-clusters-app default (read/write) 2485928 2486672 744 0.0
.bss 124232 124232 0 0.0
.data 2672 2672 0 0.0
.text 1444192 1444936 744 0.1
light-app default (read/write) 2392816 2393512 696 0.0
.bss 113912 113912 0 0.0
.data 2528 2528 0 0.0
.text 1351080 1351776 696 0.1
lock-app default (read/write) 2356280 2356896 616 0.0
.bss 113640 113640 0 0.0
.data 2488 2488 0 0.0
.text 1314544 1315160 616 0.0
qpg lighting-app qpg6105+debug (read only) 598816 599324 508 0.1
(read/write) 146940 146940 0 0.0
.bss 90744 90744 0 0.0
.data 1112 1112 0 0.0
.text 593496 594004 508 0.1
lock-app qpg6105+debug (read only) 564440 564908 468 0.1
(read/write) 146940 146940 0 0.0
.bss 90728 90728 0 0.0
.data 1064 1064 0 0.0
.text 559120 559588 468 0.1
persistent-storage-app qpg6105+debug (read only) 99520 99520 0 0.0
(read/write) 146940 146940 0 0.0
.bss 24004 24004 0 0.0
.data 176 176 0 0.0
.text 94200 94200 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 877618 878138 520 0.1
bss 87520 87520 0 0.0
noinit 37160 37160 0 0.0
text 618038 618554 516 0.1

…ps the invalid fabric checker in AttributeValueEncoder::EncodeListItem...
@github-actions
Copy link

github-actions bot commented Feb 17, 2022

PR #15284: Size comparison from 72896fc to 6bc1676

Increases (17 builds for efr32, esp32, mbed, nrfconnect)
platform target config section 72896fc 6bc1676 change % change
efr32 lighting-app BRD4161A (read only) 914204 914964 760 0.1
.text 914196 914956 760 0.1
BRD4161A+rpc (read only) 942896 943656 760 0.1
.text 942888 943648 760 0.1
window-app BRD4161A (read only) 848064 848664 600 0.1
.text 848056 848656 600 0.1
esp32 all-clusters-app c3devkit (read only) 947660 948120 460 0.0
(read/write) 1401170 1401178 8 0.0
.flash.rodata 199704 199712 8 0.0
.flash.text 947660 948120 460 0.0
m5stack (read only) 997411 997859 448 0.0
(read/write) 466412 466420 8 0.0
.flash.rodata 226788 226796 8 0.0
.flash.text 992027 992475 448 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2428444 2429012 568 0.0
.text 1391016 1391584 568 0.0
lighting-app CY8CPROTO_062_4343W+release (read/write) 2391644 2392212 568 0.0
.text 1354216 1354784 568 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2327080 2327536 456 0.0
.text 1289680 1290136 456 0.0
shell CY8CPROTO_062_4343W+release (read/write) 2317916 2318428 512 0.0
.text 1280488 1281000 512 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 1022279 1022827 548 0.1
rodata 120660 120664 4 0.0
text 699076 699608 532 0.1
nrf52840dk_nrf52840+rpc (read/write) 991571 992107 536 0.1
rodata 112184 112192 8 0.0
text 678976 679508 532 0.1
nrf52840dongle_nrf52840 (read/write) 1037095 1037583 488 0.0
rodata 119472 119480 8 0.0
text 702968 703440 472 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 928890 929426 536 0.1
rodata 113900 113908 8 0.0
text 614088 614620 532 0.1
lock-app nrf52840dk_nrf52840 (read/write) 950983 951403 420 0.0
rodata 109356 109360 4 0.0
text 641268 641688 420 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 858442 858866 424 0.0
rodata 102524 102532 8 0.0
text 557056 557480 424 0.1
pump-app nrf52840dk_nrf52840 (read/write) 949431 949855 424 0.0
rodata 108308 108316 8 0.0
text 641088 641508 420 0.1
pump-controller-app nrf52840dk_nrf52840 (read/write) 945519 945943 424 0.0
rodata 108004 108012 8 0.0
text 637328 637748 420 0.1
Full report (20 builds for efr32, esp32, mbed, nrfconnect)
platform target config section 72896fc 6bc1676 change % change
efr32 lighting-app BRD4161A (read only) 914204 914964 760 0.1
(read/write) 129524 129524 0 0.0
.bss 127488 127488 0 0.0
.data 2036 2036 0 0.0
.text 914196 914956 760 0.1
BRD4161A+rpc (read only) 942896 943656 760 0.1
(read/write) 146440 146440 0 0.0
.bss 144264 144264 0 0.0
.data 2176 2176 0 0.0
.text 942888 943648 760 0.1
window-app BRD4161A (read only) 848064 848664 600 0.1
(read/write) 127416 127416 0 0.0
.bss 125512 125512 0 0.0
.data 1904 1904 0 0.0
.text 848056 848656 600 0.1
esp32 all-clusters-app c3devkit (read only) 947660 948120 460 0.0
(read/write) 1401170 1401178 8 0.0
.dram0.bss 68296 68296 0 0.0
.dram0.data 14268 14268 0 0.0
.flash.rodata 199704 199712 8 0.0
.flash.text 947660 948120 460 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 997411 997859 448 0.0
(read/write) 466412 466420 8 0.0
.dram0.bss 73432 73432 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 226788 226796 8 0.0
.flash.text 992027 992475 448 0.0
.iram0.text 123399 123399 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2428444 2429012 568 0.0
.bss 195916 195916 0 0.0
.data 5328 5328 0 0.0
.text 1391016 1391584 568 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2391644 2392212 568 0.0
.bss 188448 188448 0 0.0
.data 5632 5632 0 0.0
.text 1354216 1354784 568 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2327080 2327536 456 0.0
.bss 187424 187424 0 0.0
.data 5608 5608 0 0.0
.text 1289680 1290136 456 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139840 1139840 0 0.0
.bss 11796 11796 0 0.0
.data 4368 4368 0 0.0
.text 103224 103224 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2317916 2318428 512 0.0
.bss 185972 185972 0 0.0
.data 5440 5440 0 0.0
.text 1280488 1281000 512 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 1022279 1022827 548 0.1
bss 123548 123548 0 0.0
rodata 120660 120664 4 0.0
text 699076 699608 532 0.1
nrf52840dk_nrf52840+rpc (read/write) 991571 992107 536 0.1
bss 120736 120736 0 0.0
rodata 112184 112192 8 0.0
text 678976 679508 532 0.1
nrf52840dongle_nrf52840 (read/write) 1037095 1037583 488 0.0
bss 124768 124768 0 0.0
rodata 119472 119480 8 0.0
text 702968 703440 472 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 928890 929426 536 0.1
bss 120112 120112 0 0.0
rodata 113900 113908 8 0.0
text 614088 614620 532 0.1
lock-app nrf52840dk_nrf52840 (read/write) 950983 951403 420 0.0
bss 121752 121752 0 0.0
rodata 109356 109360 4 0.0
text 641268 641688 420 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 858442 858866 424 0.0
bss 118344 118344 0 0.0
rodata 102524 102532 8 0.0
text 557056 557480 424 0.1
pigweed-app nrf52840dk_nrf52840 (read/write) 527595 527595 0 0.0
bss 53632 53632 0 0.0
rodata 49976 49976 0 0.0
text 361016 361016 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 949431 949855 424 0.0
bss 121472 121472 0 0.0
rodata 108308 108316 8 0.0
text 641088 641508 420 0.1
pump-controller-app nrf52840dk_nrf52840 (read/write) 945519 945943 424 0.0
bss 121476 121476 0 0.0
rodata 108004 108012 8 0.0
text 637328 637748 420 0.1
shell nrf52840dk_nrf52840 (read/write) 810767 810767 0 0.0
bss 113324 113324 0 0.0
rodata 79348 79348 0 0.0
text 540444 540444 0 0.0

@mrjerryjohns mrjerryjohns merged commit 11a5b14 into project-chip:master Feb 17, 2022
mrjerryjohns added a commit to mrjerryjohns/connectedhomeip that referenced this pull request Feb 18, 2022
This builds upon the PR project-chip#15284 to omit fabric sensitive fields in the
call to `EncodeForRead` if the fabric index present in the object
doesn't match the accessing fabric.

The test-cluster.xml has been updated to enhance the TestFabricScoped
struct to include a number of different data types to ensure adequate
coverage.

Cluster definitions for OperationalCredentials and Acl clusters have
been updated to reflect the spec correctly w.r.t fabric sensitive
fields.

Tests:

Adds a YAML TestMultiFabric test that writes/reads fabric-sensitive data
from multiple fabrics and validates the read back data.

Adds a similar Python version of the test that is identical but is
more robust towards the fabric indices and order of data read back from
the server.
mrjerryjohns added a commit that referenced this pull request Mar 4, 2022
* Omit fabric sensitive data for Reads

This builds upon the PR #15284 to omit fabric sensitive fields in the
call to `EncodeForRead` if the fabric index present in the object
doesn't match the accessing fabric.

The test-cluster.xml has been updated to enhance the TestFabricScoped
struct to include a number of different data types to ensure adequate
coverage.

Cluster definitions for OperationalCredentials and Acl clusters have
been updated to reflect the spec correctly w.r.t fabric sensitive
fields.

Tests:

Adds a YAML TestMultiFabric test that writes/reads fabric-sensitive data
from multiple fabrics and validates the read back data.

Adds a similar Python version of the test that is identical but is
more robust towards the fabric indices and order of data read back from
the server.

* Re-run codegen

* Forgot to add the MultiFabric YAML test

* Re-run codegen and review fixes

* Disabling the multi-fabric test for now since it's not quite working yet even on master

* Rerun code gen

* Re-gen

* Minor indent fix

* Disable more fabric-scoped tests in Python while we wait for #15688 to get resolved
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.

4 participants