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

Implement the CurrentFabricIndex attribute #11161

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Problem

No support for CurrentFabricIndex.

Change overview

Add a way for AttributeAccessInterface::Read to get a fabric index, and implement CurrentFabricIndex in all our apps.

Also changes the TrustedRootCertificates attribute to be external, while I was editing all the .zap files anyway.

Testing

Added unit test.

@github-actions
Copy link

github-actions bot commented Oct 28, 2021

PR #11161: Size comparison from 1e27d92 to b7bdaae

Increases above 0.2%:

platform target config section 1e27d92 b7bdaae change % change
linux ota-requestor-app debug .data.rel.ro 25464 25528 64 0.3
Increases (9 builds for linux, p6, telink)
platform target config section 1e27d92 b7bdaae change % change
linux all-clusters-app debug .data.rel.ro 61504 61536 32 0.1
.text 1384738 1384914 176 0.0
bridge-app debug+rpc .data.rel.ro 27336 27368 32 0.1
.text 1076981 1077157 176 0.0
chip-tool debug (read only) 4266229 4268125 1896 0.0
(read/write) 122176 122240 64 0.1
.data.rel.ro 97504 97568 64 0.1
.rodata 214704 214800 96 0.0
.text 3788725 3790357 1632 0.0
lighting-app debug+rpc .data.rel.ro 54416 54448 32 0.1
.text 1280658 1280834 176 0.0
ota-provider-app debug (read only) 1239849 1239953 104 0.0
.data.rel.ro 24584 24616 32 0.1
.text 1032466 1032978 512 0.0
ota-requestor-app debug (read only) 1301465 1303097 1632 0.1
(read/write) 76616 76744 128 0.2
.bss 45216 45280 64 0.1
.data.rel.ro 25464 25528 64 0.3
.rodata 127424 127456 32 0.0
.text 1076226 1077826 1600 0.1
tv-app debug .data.rel.ro 58672 58704 32 0.1
.text 1478178 1478354 176 0.0
p6 lock-app default .heap 963760 964160 400 0.0
telink lighting-app tlsr9518adk80d text 458454 458508 54 0.0
Decreases (15 builds for efr32, k32w, linux, p6, qpg, telink)
platform target config section 1e27d92 b7bdaae change % change
efr32 lighting-app BRD4161A (read only) 738120 737800 -320 -0.0
(read/write) 115428 115028 -400 -0.3
.bss 113676 113276 -400 -0.4
.text 738112 737792 -320 -0.0
BRD4161A+rpc (read only) 725560 725240 -320 -0.0
(read/write) 132036 131636 -400 -0.3
.bss 130180 129780 -400 -0.3
.text 725552 725232 -320 -0.0
lock-app BRD4161A (read only) 717400 717080 -320 -0.0
(read/write) 113244 112844 -400 -0.4
.bss 111532 111132 -400 -0.4
.text 717392 717072 -320 -0.0
window-app BRD4161A (read only) 718304 718000 -304 -0.0
(read/write) 113572 113172 -400 -0.4
.bss 111852 111452 -400 -0.4
.text 718296 717992 -304 -0.0
k32w lighting-app k32w061+se05x+release (read/write) 701656 700920 -736 -0.1
.bss 78688 78288 -400 -0.5
.text 615268 614932 -336 -0.1
lock-app k32w061+debug (read/write) 593612 592876 -736 -0.1
.bss 69172 68772 -400 -0.6
.text 516776 516440 -336 -0.1
linux all-clusters-app debug (read only) 1655073 1654841 -232 -0.0
(read/write) 119104 118720 -384 -0.3
.bss 51376 50960 -416 -0.8
.rodata 138069 137685 -384 -0.3
bridge-app debug+rpc (read only) 1283341 1283109 -232 -0.0
(read/write) 85160 84776 -384 -0.5
.bss 51856 51440 -416 -0.8
.rodata 111044 110660 -384 -0.3
lighting-app debug+rpc (read only) 1542281 1542017 -264 -0.0
(read/write) 102000 101648 -352 -0.3
.bss 41208 40824 -384 -0.9
.rodata 129169 128753 -416 -0.3
ota-provider-app debug (read/write) 67872 67488 -384 -0.6
.bss 37440 37024 -416 -1.1
.rodata 111208 110824 -384 -0.3
tv-app debug (read only) 1774929 1774697 -232 -0.0
(read/write) 289624 289240 -384 -0.1
.bss 223280 222864 -416 -0.2
.rodata 154488 154104 -384 -0.2
p6 lock-app default (read/write) 2169744 2169424 -320 -0.0
.bss 67168 66768 -400 -0.6
.text 1128008 1127688 -320 -0.0
qpg lighting-app qpg6100+debug (read only) 491224 490880 -344 -0.1
.bss 51288 50888 -400 -0.8
.text 485904 485560 -344 -0.1
lock-app qpg6100+debug (read only) 467556 467236 -320 -0.1
.bss 50240 49840 -400 -0.8
.text 462236 461916 -320 -0.1
telink lighting-app tlsr9518adk80d (read/write) 665202 664474 -728 -0.1
bss 69944 69544 -400 -0.6
Full report (20 builds for efr32, k32w, linux, p6, qpg, telink)
platform target config section 1e27d92 b7bdaae change % change
efr32 lighting-app BRD4161A (read only) 738120 737800 -320 -0.0
(read/write) 115428 115028 -400 -0.3
.bss 113676 113276 -400 -0.4
.data 1752 1752 0 0.0
.text 738112 737792 -320 -0.0
BRD4161A+rpc (read only) 725560 725240 -320 -0.0
(read/write) 132036 131636 -400 -0.3
.bss 130180 129780 -400 -0.3
.data 1852 1852 0 0.0
.text 725552 725232 -320 -0.0
lock-app BRD4161A (read only) 717400 717080 -320 -0.0
(read/write) 113244 112844 -400 -0.4
.bss 111532 111132 -400 -0.4
.data 1712 1712 0 0.0
.text 717392 717072 -320 -0.0
window-app BRD4161A (read only) 718304 718000 -304 -0.0
(read/write) 113572 113172 -400 -0.4
.bss 111852 111452 -400 -0.4
.data 1716 1716 0 0.0
.text 718296 717992 -304 -0.0
k32w lighting-app k32w061+se05x+release (read/write) 701656 700920 -736 -0.1
.bss 78688 78288 -400 -0.5
.data 1900 1900 0 0.0
.text 615268 614932 -336 -0.1
lock-app k32w061+debug (read/write) 593612 592876 -736 -0.1
.bss 69172 68772 -400 -0.6
.data 1864 1864 0 0.0
.text 516776 516440 -336 -0.1
shell k32w061+debug (read/write) 425252 425252 0 0.0
.bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359620 359620 0 0.0
linux all-clusters-app debug (read only) 1655073 1654841 -232 -0.0
(read/write) 119104 118720 -384 -0.3
.bss 51376 50960 -416 -0.8
.data 978 978 0 0.0
.data.rel.ro 61504 61536 32 0.1
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 520 520 0 0.0
.rodata 138069 137685 -384 -0.3
.text 1384738 1384914 176 0.0
bridge-app debug+rpc (read only) 1283341 1283109 -232 -0.0
(read/write) 85160 84776 -384 -0.5
.bss 51856 51440 -416 -0.8
.data 976 976 0 0.0
.data.rel.ro 27336 27368 32 0.1
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 111044 110660 -384 -0.3
.text 1076981 1077157 176 0.0
chip-tool debug (read only) 4266229 4268125 1896 0.0
(read/write) 122176 122240 64 0.1
.bss 17680 17680 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 97504 97568 64 0.1
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 424 424 0 0.0
.rodata 214704 214800 96 0.0
.text 3788725 3790357 1632 0.0
lighting-app debug+rpc (read only) 1542281 1542017 -264 -0.0
(read/write) 102000 101648 -352 -0.3
.bss 41208 40824 -384 -0.9
.data 1106 1106 0 0.0
.data.rel.ro 54416 54448 32 0.1
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 129169 128753 -416 -0.3
.text 1280658 1280834 176 0.0
ota-provider-app debug (read only) 1239849 1239953 104 0.0
(read/write) 67872 67488 -384 -0.6
.bss 37440 37024 -416 -1.1
.data 752 752 0 0.0
.data.rel.ro 24584 24616 32 0.1
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 111208 110824 -384 -0.3
.text 1032466 1032978 512 0.0
ota-requestor-app debug (read only) 1301465 1303097 1632 0.1
(read/write) 76616 76744 128 0.2
.bss 45216 45280 64 0.1
.data 816 816 0 0.0
.data.rel.ro 25464 25528 64 0.3
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 127424 127456 32 0.0
.text 1076226 1077826 1600 0.1
shell debug (read only) 787153 787153 0 0.0
(read/write) 57760 57760 0 0.0
.bss 16168 16168 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36848 36848 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 77519 77519 0 0.0
.text 608098 608098 0 0.0
tv-app debug (read only) 1774929 1774697 -232 -0.0
(read/write) 289624 289240 -384 -0.1
.bss 223280 222864 -416 -0.2
.data 2032 2032 0 0.0
.data.rel.ro 58672 58704 32 0.1
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 154488 154104 -384 -0.2
.text 1478178 1478354 176 0.0
p6 lock-app default (read/write) 2169744 2169424 -320 -0.0
.bss 67168 66768 -400 -0.6
.data 2416 2416 0 0.0
.heap 963760 964160 400 0.0
.text 1128008 1127688 -320 -0.0
qpg lighting-app qpg6100+debug (read only) 491224 490880 -344 -0.1
(read/write) 114144 114144 0 0.0
.bss 51288 50888 -400 -0.8
.data 1000 1000 0 0.0
.text 485904 485560 -344 -0.1
lock-app qpg6100+debug (read only) 467556 467236 -320 -0.1
(read/write) 114140 114140 0 0.0
.bss 50240 49840 -400 -0.8
.data 956 956 0 0.0
.text 462236 461916 -320 -0.1
persistent-storage-app qpg6100+debug (read only) 155236 155236 0 0.0
(read/write) 114140 114140 0 0.0
.bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149916 149916 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 665202 664474 -728 -0.1
bss 69944 69544 -400 -0.6
noinit 33216 33216 0 0.0
text 458454 458508 54 0.0

For some attributes, the value depends on the accessing fabric.  Put
the accessing fabric index into the AttributeValueEncoder so callees
can check it.
@bzbarsky-apple bzbarsky-apple force-pushed the pass-fabric-index-to-read branch from b7bdaae to 46a39f1 Compare October 29, 2021 14:18
@andy31415 andy31415 merged commit 2475f10 into project-chip:master Oct 29, 2021
@bzbarsky-apple bzbarsky-apple deleted the pass-fabric-index-to-read branch October 29, 2021 17:41
andy31415 pushed a commit that referenced this pull request Nov 3, 2021
* Pass the accessing fabric index to AttributeAccessInterface::Read.

For some attributes, the value depends on the accessing fabric.  Put
the accessing fabric index into the AttributeValueEncoder so callees
can check it.

* Add implementation of CurrentFabricIndex attribute.
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
* Pass the accessing fabric index to AttributeAccessInterface::Read.

For some attributes, the value depends on the accessing fabric.  Put
the accessing fabric index into the AttributeValueEncoder so callees
can check it.

* Add implementation of CurrentFabricIndex attribute.
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