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

Allow for split commissioner / admin topology #14261

Merged

Conversation

msandstedt
Copy link
Contributor

@msandstedt msandstedt commented Jan 25, 2022

Problem

It is possible to implement Matter commissioning such that a commissioner node is not on any fabric, and delegates operational communication and invocation of the CommissioningComplete command to a different
administrator node. In this configuration, the commissioner only communicates by PASE and may not ever have received operational credentials. However, the sdk does not allow for such an architecture as commissioner instances must currently self-commission to a fabric as a part of initialization.

Change overview

To support such a split commissioner / admin architecture, this amends the commissioner to accept initialization without operational credentials. In this configuration, the commissioner is capable of conducting the commissioning procedure until these are needed. When it is found that credentials aren't available, the commissioner gracefully discontinues commissioning.

Fixes #13501

Testing

All current integration and unit tests pass. To provide coverage for the new non-fabric-associated commissioner configuration, an additional null-fabric-commissioner identity has been added to chip-tool. When selected, and given an operational credentials delegate that specifies an admin subject for the AddNOC command, this can commission up until operational discovery and operational channel communication.

It is possible to implement Matter commissioning such that a commissioner
node is not on any fabric, and delegates operational communication and
invocation of the CommissioningComplete command to a different
administrator node.

In this configuration, the commissioner only communicates by PASE and may
not ever have received operational credentials.

To support such a configuration, this commit amends the commissioner
to accept initialization to the kUndefinedFabricIndex.  In this
configuration, the commissioner does not bootstrap itself with any
credentials, and is capable of conducting the commissioning procedure
until these are needed.  When it is found that credentials aren't
available, the commissioner gracefully discontinues commissioning.

Because CASESessionManager is using fabric association for operational
discovery, discontinuation of the commissioning sequence occurs at
attempted operational discovery.

Fixes project-chip#13501
@github-actions
Copy link

github-actions bot commented Jan 25, 2022

PR #14261: Size comparison from de95567 to 354c8f3

Increases (1 build for linux)
platform target config section de95567 354c8f3 change % change
linux chip-tool-ipv6only arm64 (read only) 8716252 8716980 728 0.0
.rodata 534420 534572 152 0.0
.text 7341284 7341860 576 0.0
Full report (15 builds for cyw30739, efr32, k32w, linux, p6, qpg, telink)
platform target config section de95567 354c8f3 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 578006 578006 0 0.0
.app_xip_area 483064 483064 0 0.0
.bss 77688 77688 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
efr32 lighting-app BRD4161A (read only) 839388 839388 0 0.0
(read/write) 127228 127228 0 0.0
.bss 125328 125328 0 0.0
.data 1900 1900 0 0.0
.text 839380 839380 0 0.0
BRD4161A+rpc (read only) 826760 826760 0 0.0
(read/write) 143888 143888 0 0.0
.bss 141888 141888 0 0.0
.data 2000 2000 0 0.0
.text 826752 826752 0 0.0
window-app BRD4161A (read only) 811716 811716 0 0.0
(read/write) 125884 125884 0 0.0
.bss 124028 124028 0 0.0
.data 1856 1856 0 0.0
.text 811708 811708 0 0.0
k32w light k32w061+release (read/write) 662880 662880 0 0.0
.bss 77460 77460 0 0.0
.data 1868 1868 0 0.0
.text 577752 577752 0 0.0
lock k32w061+release (read/write) 663792 663792 0 0.0
.bss 77724 77724 0 0.0
.data 1892 1892 0 0.0
.text 578376 578376 0 0.0
linux chip-tool-ipv6only arm64 (read only) 8716252 8716980 728 0.0
(read/write) 391585 391585 0 0.0
.bss 56033 56033 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 261440 261440 0 0.0
.dynamic 560 560 0 0.0
.got 69232 69232 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 534420 534572 152 0.0
.text 7341284 7341860 576 0.0
thermostat-no-ble arm64 (read only) 2049708 2049708 0 0.0
(read/write) 146785 146785 0 0.0
.bss 65665 65665 0 0.0
.data 904 904 0 0.0
.data.rel.ro 73192 73192 0 0.0
.dynamic 560 560 0 0.0
.got 4064 4064 0 0.0
.init 24 24 0 0.0
.init_array 320 320 0 0.0
.rodata 131372 131372 0 0.0
.text 1703776 1703776 0 0.0
p6 all-clusters-app default (read/write) 2411464 2411464 0 0.0
.bss 117756 117756 0 0.0
.data 2584 2584 0 0.0
.text 1369728 1369728 0 0.0
light-app default (read/write) 2334944 2334944 0 0.0
.bss 105516 105516 0 0.0
.data 2408 2408 0 0.0
.text 1293208 1293208 0 0.0
lock-app default (read/write) 2300496 2300496 0 0.0
.bss 105260 105260 0 0.0
.data 2360 2360 0 0.0
.text 1258760 1258760 0 0.0
qpg lighting-app qpg6105+debug (read only) 569848 569848 0 0.0
(read/write) 146936 146936 0 0.0
.bss 89672 89672 0 0.0
.data 1060 1060 0 0.0
.text 564528 564528 0 0.0
lock-app qpg6105+debug (read only) 515956 515956 0 0.0
(read/write) 146940 146940 0 0.0
.bss 89144 89144 0 0.0
.data 992 992 0 0.0
.text 510636 510636 0 0.0
persistent-storage-app qpg6105+debug (read only) 107140 107140 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101820 101820 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 845562 845562 0 0.0
bss 87472 87472 0 0.0
noinit 37160 37160 0 0.0
text 590686 590686 0 0.0

examples/chip-tool/commands/common/CHIPCommand.cpp Outdated Show resolved Hide resolved
examples/chip-tool/commands/common/CHIPCommand.cpp Outdated Show resolved Hide resolved
src/controller/CHIPDeviceController.cpp Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Jan 26, 2022

PR #14261: Size comparison from de95567 to 8bec479

Increases above 0.2%:

platform target config section de95567 8bec479 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 578006 579854 1848 0.3
.app_xip_area 483064 484776 1712 0.4
efr32 lighting-app BRD4161A (read only) 839388 842596 3208 0.4
.text 839380 842588 3208 0.4
BRD4161A+rpc (read only) 826760 829952 3192 0.4
.text 826752 829944 3192 0.4
window-app BRD4161A (read only) 811716 814924 3208 0.4
.text 811708 814916 3208 0.4
k32w light k32w061+release (read/write) 662880 664580 1700 0.3
.text 577752 579316 1564 0.3
lock k32w061+release (read/write) 663792 665632 1840 0.3
.text 578376 580080 1704 0.3
linux all-clusters-app debug (read only) 2211393 2220641 9248 0.4
(read/write) 145648 146320 672 0.5
.bss 62944 63168 224 0.4
.data.rel.ro 75816 76248 432 0.6
.text 1866914 1875138 8224 0.4
bridge-app debug+rpc (read only) 1611461 1620629 9168 0.6
(read/write) 88552 89192 640 0.7
.bss 45248 45472 224 0.5
.data.rel.ro 36352 36784 432 1.2
.text 1358997 1367141 8144 0.6
chip-tool debug (read/write) 258832 259472 640 0.2
.bss 37688 37912 224 0.6
.data.rel.ro 214152 214584 432 0.2
chip-tool-ipv6only arm64 .bss 56033 56241 208 0.4
door-lock-app debug (read only) 1697425 1706561 9136 0.5
(read/write) 114936 115576 640 0.6
.bss 48288 48512 224 0.5
.data.rel.ro 60304 60736 432 0.7
.text 1403410 1411554 8144 0.6
lighting-app debug+rpc (read only) 1910369 1919601 9232 0.5
(read/write) 120024 120664 640 0.5
.bss 49272 49464 192 0.4
.data.rel.ro 63984 64416 432 0.7
.text 1597314 1605522 8208 0.5
ota-provider-app debug (read only) 1513113 1522297 9184 0.6
(read/write) 83152 83824 672 0.8
.bss 45856 46080 224 0.5
.data.rel.ro 31080 31512 432 1.4
.text 1264082 1272242 8160 0.6
ota-requestor-app debug (read only) 1611049 1619289 8240 0.5
(read/write) 88024 88664 640 0.7
.bss 48544 48768 224 0.5
.data.rel.ro 33112 33544 432 1.3
.text 1352898 1360306 7408 0.5
shell debug (read only) 2187249 2196449 9200 0.4
(read/write) 146048 146688 640 0.4
.bss 69152 69376 224 0.3
.data.rel.ro 70392 70824 432 0.6
.text 1847730 1855938 8208 0.4
thermostat-no-ble arm64 (read only) 2049708 2058356 8648 0.4
(read/write) 146785 147457 672 0.5
.bss 65665 65857 192 0.3
.data.rel.ro 73192 73624 432 0.6
.got 4064 4112 48 1.2
.text 1703776 1711200 7424 0.4
tv-app debug (read only) 2249465 2258937 9472 0.4
(read/write) 317256 317896 640 0.2
.data.rel.ro 70760 71192 432 0.6
.text 1885858 1894210 8352 0.4
nrfconnect lighting-app nrf52840dk_nrf52840 text 639756 641312 1556 0.2
nrf52840dk_nrf52840+rpc text 635148 636708 1560 0.2
nrf52840dongle_nrf52840 text 671952 673512 1560 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 856622 858438 1816 0.2
text 556672 558228 1556 0.3
lock-app nrf52840dk_nrf52840 (read/write) 913903 915767 1864 0.2
text 612516 614076 1560 0.3
nrf5340dk_nrf5340_cpuapp (read/write) 823974 825790 1816 0.2
text 529468 531028 1560 0.3
pump-app nrf52840dk_nrf52840 (read/write) 916579 918427 1848 0.2
text 614984 616540 1556 0.3
pump-controller-app nrf52840dk_nrf52840 (read/write) 911747 913611 1864 0.2
text 611012 612572 1560 0.3
p6 lock-app default .text 1258760 1261984 3224 0.3
qpg lighting-app qpg6105+debug (read only) 569848 571420 1572 0.3
.text 564528 566100 1572 0.3
lock-app qpg6105+debug (read only) 515956 517660 1704 0.3
.text 510636 512340 1704 0.3
telink lighting-app tlsr9518adk80d text 590686 592488 1802 0.3
Increases (36 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section de95567 8bec479 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 578006 579854 1848 0.3
.app_xip_area 483064 484776 1712 0.4
.bss 77688 77824 136 0.2
efr32 lighting-app BRD4161A (read only) 839388 842596 3208 0.4
(read/write) 127228 127364 136 0.1
.bss 125328 125464 136 0.1
.text 839380 842588 3208 0.4
BRD4161A+rpc (read only) 826760 829952 3192 0.4
(read/write) 143888 144024 136 0.1
.bss 141888 142024 136 0.1
.text 826752 829944 3192 0.4
window-app BRD4161A (read only) 811716 814924 3208 0.4
(read/write) 125884 126020 136 0.1
.bss 124028 124164 136 0.1
.text 811708 814916 3208 0.4
esp32 all-clusters-app c3devkit (read only) 918896 920684 1788 0.2
(read/write) 1384338 1384618 280 0.0
.dram0.bss 70704 70840 136 0.2
.flash.rodata 180464 180600 136 0.1
.flash.text 918896 920684 1788 0.2
m5stack (read only) 968091 969667 1576 0.2
(read/write) 451368 451640 272 0.1
.dram0.bss 75448 75584 136 0.2
.flash.rodata 209760 209896 136 0.1
.flash.text 962707 964283 1576 0.2
k32w light k32w061+release (read/write) 662880 664580 1700 0.3
.bss 77460 77596 136 0.2
.text 577752 579316 1564 0.3
lock k32w061+release (read/write) 663792 665632 1840 0.3
.bss 77724 77860 136 0.2
.text 578376 580080 1704 0.3
linux all-clusters-app debug (read only) 2211393 2220641 9248 0.4
(read/write) 145648 146320 672 0.5
.bss 62944 63168 224 0.4
.data.rel.ro 75816 76248 432 0.6
.rodata 185525 185589 64 0.0
.text 1866914 1875138 8224 0.4
bridge-app debug+rpc (read only) 1611461 1620629 9168 0.6
(read/write) 88552 89192 640 0.7
.bss 45248 45472 224 0.5
.data.rel.ro 36352 36784 432 1.2
.rodata 139028 139092 64 0.0
.text 1358997 1367141 8144 0.6
chip-tool debug (read only) 8936597 8946725 10128 0.1
(read/write) 258832 259472 640 0.2
.bss 37688 37912 224 0.6
.data.rel.ro 214152 214584 432 0.2
.rodata 531777 531969 192 0.0
.text 7875157 7884133 8976 0.1
chip-tool-ipv6only arm64 (read only) 8716252 8725532 9280 0.1
(read/write) 391585 392273 688 0.2
.bss 56033 56241 208 0.4
.data.rel.ro 261440 261872 432 0.2
.got 69232 69280 48 0.1
.rodata 534420 534596 176 0.0
.text 7341284 7349188 7904 0.1
door-lock-app debug (read only) 1697425 1706561 9136 0.5
(read/write) 114936 115576 640 0.6
.bss 48288 48512 224 0.5
.data.rel.ro 60304 60736 432 0.7
.rodata 148732 148764 32 0.0
.text 1403410 1411554 8144 0.6
lighting-app debug+rpc (read only) 1910369 1919601 9232 0.5
(read/write) 120024 120664 640 0.5
.bss 49272 49464 192 0.4
.data.rel.ro 63984 64416 432 0.7
.rodata 161681 161745 64 0.0
.text 1597314 1605522 8208 0.5
ota-provider-app debug (read only) 1513113 1522297 9184 0.6
(read/write) 83152 83824 672 0.8
.bss 45856 46080 224 0.5
.data.rel.ro 31080 31512 432 1.4
.rodata 138470 138534 64 0.0
.text 1264082 1272242 8160 0.6
ota-requestor-app debug (read only) 1611049 1619289 8240 0.5
(read/write) 88024 88664 640 0.7
.bss 48544 48768 224 0.5
.data.rel.ro 33112 33544 432 1.3
.text 1352898 1360306 7408 0.5
shell debug (read only) 2187249 2196449 9200 0.4
(read/write) 146048 146688 640 0.4
.bss 69152 69376 224 0.3
.data.rel.ro 70392 70824 432 0.6
.rodata 186354 186386 32 0.0
.text 1847730 1855938 8208 0.4
thermostat-no-ble arm64 (read only) 2049708 2058356 8648 0.4
(read/write) 146785 147457 672 0.5
.bss 65665 65857 192 0.3
.data.rel.ro 73192 73624 432 0.6
.got 4064 4112 48 1.2
.rodata 131372 131396 24 0.0
.text 1703776 1711200 7424 0.4
tv-app debug (read only) 2249465 2258937 9472 0.4
(read/write) 317256 317896 640 0.2
.bss 237568 237792 224 0.1
.data.rel.ro 70760 71192 432 0.6
.rodata 195756 195916 160 0.1
.text 1885858 1894210 8352 0.4
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2353048 2354720 1672 0.1
.bss 189412 189548 136 0.1
.text 1315648 1317320 1672 0.1
lighting-app CY8CPROTO_062_4343W+release (read/write) 2338968 2340704 1736 0.1
.bss 180936 181072 136 0.1
.text 1301568 1303304 1736 0.1
lock-app CY8CPROTO_062_4343W+release (read/write) 2305784 2307456 1672 0.1
.bss 180832 180968 136 0.1
.text 1268384 1270056 1672 0.1
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 946763 948599 1836 0.2
bss 119024 119160 136 0.1
rodata 110400 110540 140 0.1
text 639756 641312 1556 0.2
nrf52840dk_nrf52840+rpc (read/write) 932283 934099 1816 0.2
bss 116068 116204 136 0.1
rodata 102856 102992 136 0.1
text 635148 636708 1560 0.2
nrf52840dongle_nrf52840 (read/write) 997443 999275 1832 0.2
bss 121864 122000 136 0.1
rodata 115156 115292 136 0.1
text 671952 673512 1560 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 856622 858438 1816 0.2
bss 115812 115948 136 0.1
rodata 103576 103712 136 0.1
text 556672 558228 1556 0.3
lock-app nrf52840dk_nrf52840 (read/write) 913903 915767 1864 0.2
bss 119072 119208 136 0.1
rodata 104940 105076 136 0.1
text 612516 614076 1560 0.3
nrf5340dk_nrf5340_cpuapp (read/write) 823974 825790 1816 0.2
bss 115888 116024 136 0.1
rodata 98168 98304 136 0.1
text 529468 531028 1560 0.3
pump-app nrf52840dk_nrf52840 (read/write) 916579 918427 1848 0.2
bss 118816 118952 136 0.1
rodata 105328 105464 136 0.1
text 614984 616540 1556 0.3
pump-controller-app nrf52840dk_nrf52840 (read/write) 911747 913611 1864 0.2
bss 118844 118980 136 0.1
rodata 104432 104568 136 0.1
text 611012 612572 1560 0.3
p6 all-clusters-app default (read/write) 2411464 2414672 3208 0.1
.bss 117756 117892 136 0.1
.text 1369728 1372936 3208 0.2
light-app default (read/write) 2334944 2338168 3224 0.1
.bss 105516 105652 136 0.1
.text 1293208 1296432 3224 0.2
lock-app default (read/write) 2300496 2303720 3224 0.1
.bss 105260 105396 136 0.1
.text 1258760 1261984 3224 0.3
qpg lighting-app qpg6105+debug (read only) 569848 571420 1572 0.3
.bss 89672 89808 136 0.2
.text 564528 566100 1572 0.3
lock-app qpg6105+debug (read only) 515956 517660 1704 0.3
.bss 89144 89280 136 0.2
.text 510636 512340 1704 0.3
telink lighting-app tlsr9518adk80d (read/write) 845562 847646 2084 0.2
bss 87472 87608 136 0.2
text 590686 592488 1802 0.3
Decreases (1 build for linux)
platform target config section de95567 8bec479 change % change
linux ota-requestor-app debug .rodata 144311 144183 -128 -0.1
Full report (42 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section de95567 8bec479 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 578006 579854 1848 0.3
.app_xip_area 483064 484776 1712 0.4
.bss 77688 77824 136 0.2
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
efr32 lighting-app BRD4161A (read only) 839388 842596 3208 0.4
(read/write) 127228 127364 136 0.1
.bss 125328 125464 136 0.1
.data 1900 1900 0 0.0
.text 839380 842588 3208 0.4
BRD4161A+rpc (read only) 826760 829952 3192 0.4
(read/write) 143888 144024 136 0.1
.bss 141888 142024 136 0.1
.data 2000 2000 0 0.0
.text 826752 829944 3192 0.4
window-app BRD4161A (read only) 811716 814924 3208 0.4
(read/write) 125884 126020 136 0.1
.bss 124028 124164 136 0.1
.data 1856 1856 0 0.0
.text 811708 814916 3208 0.4
esp32 all-clusters-app c3devkit (read only) 918896 920684 1788 0.2
(read/write) 1384338 1384618 280 0.0
.dram0.bss 70704 70840 136 0.2
.dram0.data 14244 14244 0 0.0
.flash.rodata 180464 180600 136 0.1
.flash.text 918896 920684 1788 0.2
.iram0.text 62056 62056 0 0.0
m5stack (read only) 968091 969667 1576 0.2
(read/write) 451368 451640 272 0.1
.dram0.bss 75448 75584 136 0.2
.dram0.data 34032 34032 0 0.0
.flash.rodata 209760 209896 136 0.1
.flash.text 962707 964283 1576 0.2
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 662880 664580 1700 0.3
.bss 77460 77596 136 0.2
.data 1868 1868 0 0.0
.text 577752 579316 1564 0.3
lock k32w061+release (read/write) 663792 665632 1840 0.3
.bss 77724 77860 136 0.2
.data 1892 1892 0 0.0
.text 578376 580080 1704 0.3
linux all-clusters-app debug (read only) 2211393 2220641 9248 0.4
(read/write) 145648 146320 672 0.5
.bss 62944 63168 224 0.4
.data 1200 1200 0 0.0
.data.rel.ro 75816 76248 432 0.6
.dynamic 592 592 0 0.0
.got 4128 4128 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 185525 185589 64 0.0
.text 1866914 1875138 8224 0.4
bridge-app debug+rpc (read only) 1611461 1620629 9168 0.6
(read/write) 88552 89192 640 0.7
.bss 45248 45472 224 0.5
.data 1794 1794 0 0.0
.data.rel.ro 36352 36784 432 1.2
.dynamic 592 592 0 0.0
.got 3968 3968 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 139028 139092 64 0.0
.text 1358997 1367141 8144 0.6
chip-tool debug (read only) 8936597 8946725 10128 0.1
(read/write) 258832 259472 640 0.2
.bss 37688 37912 224 0.6
.data 1064 1064 0 0.0
.data.rel.ro 214152 214584 432 0.2
.dynamic 608 608 0 0.0
.got 4640 4640 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 531777 531969 192 0.0
.text 7875157 7884133 8976 0.1
chip-tool-ipv6only arm64 (read only) 8716252 8725532 9280 0.1
(read/write) 391585 392273 688 0.2
.bss 56033 56241 208 0.4
.data 1128 1128 0 0.0
.data.rel.ro 261440 261872 432 0.2
.dynamic 560 560 0 0.0
.got 69232 69280 48 0.1
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 534420 534596 176 0.0
.text 7341284 7349188 7904 0.1
door-lock-app debug (read only) 1697425 1706561 9136 0.5
(read/write) 114936 115576 640 0.6
.bss 48288 48512 224 0.5
.data 930 930 0 0.0
.data.rel.ro 60304 60736 432 0.7
.dynamic 592 592 0 0.0
.got 4104 4104 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 148732 148764 32 0.0
.text 1403410 1411554 8144 0.6
lighting-app debug+rpc (read only) 1910369 1919601 9232 0.5
(read/write) 120024 120664 640 0.5
.bss 49272 49464 192 0.4
.data 1296 1296 0 0.0
.data.rel.ro 63984 64416 432 0.7
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 696 696 0 0.0
.rodata 161681 161745 64 0.0
.text 1597314 1605522 8208 0.5
ota-provider-app debug (read only) 1513113 1522297 9184 0.6
(read/write) 83152 83824 672 0.8
.bss 45856 46080 224 0.5
.data 968 968 0 0.0
.data.rel.ro 31080 31512 432 1.4
.dynamic 592 592 0 0.0
.got 4040 4040 0 0.0
.init 27 27 0 0.0
.init_array 584 584 0 0.0
.rodata 138470 138534 64 0.0
.text 1264082 1272242 8160 0.6
ota-requestor-app debug (read only) 1611049 1619289 8240 0.5
(read/write) 88024 88664 640 0.7
.bss 48544 48768 224 0.5
.data 1064 1064 0 0.0
.data.rel.ro 33112 33544 432 1.3
.dynamic 592 592 0 0.0
.got 4032 4032 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 144311 144183 -128 -0.1
.text 1352898 1360306 7408 0.5
shell debug (read only) 2187249 2196449 9200 0.4
(read/write) 146048 146688 640 0.4
.bss 69152 69376 224 0.3
.data 800 800 0 0.0
.data.rel.ro 70392 70824 432 0.6
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 186354 186386 32 0.0
.text 1847730 1855938 8208 0.4
thermostat-no-ble arm64 (read only) 2049708 2058356 8648 0.4
(read/write) 146785 147457 672 0.5
.bss 65665 65857 192 0.3
.data 904 904 0 0.0
.data.rel.ro 73192 73624 432 0.6
.dynamic 560 560 0 0.0
.got 4064 4112 48 1.2
.init 24 24 0 0.0
.init_array 320 320 0 0.0
.rodata 131372 131396 24 0.0
.text 1703776 1711200 7424 0.4
tv-app debug (read only) 2249465 2258937 9472 0.4
(read/write) 317256 317896 640 0.2
.bss 237568 237792 224 0.1
.data 2944 2944 0 0.0
.data.rel.ro 70760 71192 432 0.6
.dynamic 592 592 0 0.0
.got 4496 4496 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 195756 195916 160 0.1
.text 1885858 1894210 8352 0.4
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2353048 2354720 1672 0.1
.bss 189412 189548 136 0.1
.data 5296 5296 0 0.0
.text 1315648 1317320 1672 0.1
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2338968 2340704 1736 0.1
.bss 180936 181072 136 0.1
.data 5576 5576 0 0.0
.text 1301568 1303304 1736 0.1
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2305784 2307456 1672 0.1
.bss 180832 180968 136 0.1
.data 5568 5568 0 0.0
.text 1268384 1270056 1672 0.1
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2053960 2053960 0 0.0
.bss 156876 156876 0 0.0
.data 4864 4864 0 0.0
.text 1016560 1016560 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 946763 948599 1836 0.2
bss 119024 119160 136 0.1
rodata 110400 110540 140 0.1
text 639756 641312 1556 0.2
nrf52840dk_nrf52840+rpc (read/write) 932283 934099 1816 0.2
bss 116068 116204 136 0.1
rodata 102856 102992 136 0.1
text 635148 636708 1560 0.2
nrf52840dongle_nrf52840 (read/write) 997443 999275 1832 0.2
bss 121864 122000 136 0.1
rodata 115156 115292 136 0.1
text 671952 673512 1560 0.2
nrf5340dk_nrf5340_cpuapp (read/write) 856622 858438 1816 0.2
bss 115812 115948 136 0.1
rodata 103576 103712 136 0.1
text 556672 558228 1556 0.3
lock-app nrf52840dk_nrf52840 (read/write) 913903 915767 1864 0.2
bss 119072 119208 136 0.1
rodata 104940 105076 136 0.1
text 612516 614076 1560 0.3
nrf5340dk_nrf5340_cpuapp (read/write) 823974 825790 1816 0.2
bss 115888 116024 136 0.1
rodata 98168 98304 136 0.1
text 529468 531028 1560 0.3
pigweed-app nrf52840dk_nrf52840 (read/write) 541835 541835 0 0.0
bss 52588 52588 0 0.0
rodata 50104 50104 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 916579 918427 1848 0.2
bss 118816 118952 136 0.1
rodata 105328 105464 136 0.1
text 614984 616540 1556 0.3
pump-controller-app nrf52840dk_nrf52840 (read/write) 911747 913611 1864 0.2
bss 118844 118980 136 0.1
rodata 104432 104568 136 0.1
text 611012 612572 1560 0.3
shell nrf52840dk_nrf52840 (read/write) 798219 798219 0 0.0
bss 109776 109776 0 0.0
rodata 78288 78288 0 0.0
text 533648 533648 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 711022 711022 0 0.0
bss 107664 107664 0 0.0
rodata 72592 72592 0 0.0
text 451324 451324 0 0.0
p6 all-clusters-app default (read/write) 2411464 2414672 3208 0.1
.bss 117756 117892 136 0.1
.data 2584 2584 0 0.0
.text 1369728 1372936 3208 0.2
light-app default (read/write) 2334944 2338168 3224 0.1
.bss 105516 105652 136 0.1
.data 2408 2408 0 0.0
.text 1293208 1296432 3224 0.2
lock-app default (read/write) 2300496 2303720 3224 0.1
.bss 105260 105396 136 0.1
.data 2360 2360 0 0.0
.text 1258760 1261984 3224 0.3
qpg lighting-app qpg6105+debug (read only) 569848 571420 1572 0.3
(read/write) 146936 146936 0 0.0
.bss 89672 89808 136 0.2
.data 1060 1060 0 0.0
.text 564528 566100 1572 0.3
lock-app qpg6105+debug (read only) 515956 517660 1704 0.3
(read/write) 146940 146940 0 0.0
.bss 89144 89280 136 0.2
.data 992 992 0 0.0
.text 510636 512340 1704 0.3
persistent-storage-app qpg6105+debug (read only) 107140 107140 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101820 101820 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 845562 847646 2084 0.2
bss 87472 87608 136 0.2
noinit 37160 37160 0 0.0
text 590686 592488 1802 0.3

Previously, chip-tool had reused fabric ID as fabric index, and was
specifying both during commissioner initialization.  This is brittle
though because it is not practical for chip-tool to always know the
fabric index ahead of time before initialization.

This commit changes the commissioner to no longer accept a fabric index
for initialization.  Instead, the operational key pair and NOC chain are
optionally passed.  If present, these are added or merged into the fabric
table.  Merge works by identifying an existing, matching fabric in the
table by comparing root public key and fabric ID.  Once the new
certificates are merged, the fabric index is extracted from the fabric
table.
@github-actions
Copy link

github-actions bot commented Jan 27, 2022

PR #14261: Size comparison from 8d75845 to daa3113

Increases (17 builds for cyw30739, esp32, k32w, linux, nrfconnect, p6, qpg, telink)
platform target config section 8d75845 daa3113 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 580442 580446 4 0.0
.app_xip_area 485336 485340 4 0.0
esp32 all-clusters-app c3devkit (read only) 923298 923304 6 0.0
.flash.text 923298 923304 6 0.0
m5stack (read only) 972227 972235 8 0.0
.flash.text 966843 966851 8 0.0
k32w light k32w061+release (read/write) 665224 665240 16 0.0
.text 579928 579944 16 0.0
linux chip-tool-ipv6only arm64 (read only) 8935692 8940308 4616 0.1
(read/write) 394801 394849 48 0.0
.data.rel.ro 264512 264560 48 0.0
.rodata 544356 544604 248 0.0
.text 7541700 7546020 4320 0.1
thermostat-no-ble arm64 (read only) 2082804 2082868 64 0.0
.text 1733616 1733680 64 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 text 668576 668580 4 0.0
nrf52840dk_nrf52840+rpc text 663248 663252 4 0.0
nrf52840dongle_nrf52840 (read/write) 999827 999843 16 0.0
text 674004 674008 4 0.0
nrf5340dk_nrf5340_cpuapp text 584756 584760 4 0.0
lock-app nrf52840dk_nrf52840 text 614560 614564 4 0.0
nrf5340dk_nrf5340_cpuapp text 531512 531516 4 0.0
pump-app nrf52840dk_nrf52840 text 617096 617100 4 0.0
pump-controller-app nrf52840dk_nrf52840 text 613132 613140 8 0.0
p6 light-app default (read/write) 2339064 2339080 16 0.0
.text 1297328 1297344 16 0.0
qpg lighting-app qpg6105+debug (read only) 572036 572044 8 0.0
.text 566716 566724 8 0.0
telink lighting-app tlsr9518adk80d (read/write) 848158 848166 8 0.0
text 592932 592938 6 0.0
Full report (32 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 8d75845 daa3113 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 580442 580446 4 0.0
.app_xip_area 485336 485340 4 0.0
.bss 77852 77852 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
efr32 lighting-app BRD4161A (read only) 843492 843492 0 0.0
(read/write) 127396 127396 0 0.0
.bss 125496 125496 0 0.0
.data 1900 1900 0 0.0
.text 843484 843484 0 0.0
BRD4161A+rpc (read only) 830864 830864 0 0.0
(read/write) 144056 144056 0 0.0
.bss 142056 142056 0 0.0
.data 2000 2000 0 0.0
.text 830856 830856 0 0.0
window-app BRD4161A (read only) 816108 816108 0 0.0
(read/write) 126052 126052 0 0.0
.bss 124196 124196 0 0.0
.data 1856 1856 0 0.0
.text 816100 816100 0 0.0
esp32 all-clusters-app c3devkit (read only) 923298 923304 6 0.0
(read/write) 1384986 1384986 0 0.0
.dram0.bss 70880 70880 0 0.0
.dram0.data 14252 14252 0 0.0
.flash.rodata 180936 180936 0 0.0
.flash.text 923298 923304 6 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 972227 972235 8 0.0
(read/write) 452016 452016 0 0.0
.dram0.bss 75624 75624 0 0.0
.dram0.data 34032 34032 0 0.0
.flash.rodata 210232 210232 0 0.0
.flash.text 966843 966851 8 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 665224 665240 16 0.0
.bss 77628 77628 0 0.0
.data 1868 1868 0 0.0
.text 579928 579944 16 0.0
lock k32w061+release (read/write) 666192 666192 0 0.0
.bss 77892 77892 0 0.0
.data 1892 1892 0 0.0
.text 580608 580608 0 0.0
linux chip-tool-ipv6only arm64 (read only) 8935692 8940308 4616 0.1
(read/write) 394801 394849 48 0.0
.bss 55377 55377 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 264512 264560 48 0.0
.dynamic 560 560 0 0.0
.got 70024 70024 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 544356 544604 248 0.0
.text 7541700 7546020 4320 0.1
thermostat-no-ble arm64 (read only) 2082804 2082868 64 0.0
(read/write) 151873 151873 0 0.0
.bss 69585 69585 0 0.0
.data 960 960 0 0.0
.data.rel.ro 74208 74208 0 0.0
.dynamic 560 560 0 0.0
.got 4144 4144 0 0.0
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 131940 131940 0 0.0
.text 1733616 1733680 64 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2357384 2357384 0 0.0
.bss 189588 189588 0 0.0
.data 5296 5296 0 0.0
.text 1319984 1319984 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2341088 2341088 0 0.0
.bss 181104 181104 0 0.0
.data 5584 5584 0 0.0
.text 1303688 1303688 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2307840 2307840 0 0.0
.bss 181000 181000 0 0.0
.data 5568 5568 0 0.0
.text 1270440 1270440 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2294044 2294044 0 0.0
.bss 177732 177732 0 0.0
.data 5384 5384 0 0.0
.text 1256616 1256616 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 983707 983707 0 0.0
bss 120860 120860 0 0.0
rodata 116480 116480 0 0.0
text 668576 668580 4 0.0
nrf52840dk_nrf52840+rpc (read/write) 967571 967571 0 0.0
bss 117904 117904 0 0.0
rodata 108016 108016 0 0.0
text 663248 663252 4 0.0
nrf52840dongle_nrf52840 (read/write) 999827 999843 16 0.0
bss 122032 122032 0 0.0
rodata 115332 115332 0 0.0
text 674004 674008 4 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 892930 892930 0 0.0
bss 117648 117648 0 0.0
rodata 109780 109780 0 0.0
text 584756 584760 4 0.0
lock-app nrf52840dk_nrf52840 (read/write) 916323 916323 0 0.0
bss 119240 119240 0 0.0
rodata 105120 105120 0 0.0
text 614560 614564 4 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 826358 826358 0 0.0
bss 116056 116056 0 0.0
rodata 98344 98344 0 0.0
text 531512 531516 4 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541835 541835 0 0.0
bss 52588 52588 0 0.0
rodata 50104 50104 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 919187 919187 0 0.0
bss 118992 118992 0 0.0
rodata 105632 105632 0 0.0
text 617096 617100 4 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 914371 914371 0 0.0
bss 119016 119016 0 0.0
rodata 104736 104736 0 0.0
text 613132 613140 8 0.0
shell nrf52840dk_nrf52840 (read/write) 798203 798203 0 0.0
bss 109776 109776 0 0.0
rodata 78288 78288 0 0.0
text 533640 533640 0 0.0
p6 all-clusters-app default (read/write) 2418240 2418240 0 0.0
.bss 117932 117932 0 0.0
.data 2592 2592 0 0.0
.text 1376504 1376504 0 0.0
light-app default (read/write) 2339064 2339080 16 0.0
.bss 105684 105684 0 0.0
.data 2408 2408 0 0.0
.text 1297328 1297344 16 0.0
lock-app default (read/write) 2304584 2304584 0 0.0
.bss 105428 105428 0 0.0
.data 2360 2360 0 0.0
.text 1262848 1262848 0 0.0
qpg lighting-app qpg6105+debug (read only) 572036 572044 8 0.0
(read/write) 146936 146936 0 0.0
.bss 89840 89840 0 0.0
.data 1060 1060 0 0.0
.text 566716 566724 8 0.0
lock-app qpg6105+debug (read only) 518164 518164 0 0.0
(read/write) 146940 146940 0 0.0
.bss 89312 89312 0 0.0
.data 992 992 0 0.0
.text 512844 512844 0 0.0
persistent-storage-app qpg6105+debug (read only) 107140 107140 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101820 101820 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 848158 848166 8 0.0
bss 87640 87640 0 0.0
noinit 37160 37160 0 0.0
text 592932 592938 6 0.0

Copy link

@wbschiller wbschiller left a comment

Choose a reason for hiding this comment

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

Nice work!

@msandstedt msandstedt merged commit 54b5b69 into project-chip:master Jan 27, 2022
selissia pushed a commit to selissia/connectedhomeip that referenced this pull request Jan 28, 2022
It is possible to implement Matter commissioning such that a commissioner
node is not on any fabric, and delegates operational communication and
invocation of the CommissioningComplete command to a different
administrator node. In this configuration, the commissioner only
communicates by PASE and may not ever have received operational
credentials. However, such an architecture is not currently supported, as
commissioner instances must self-commission to a fabric as a part of
initialization.

To support such a split commissioner / admin architecture, this amends the
commissioner to accept initialization without operational credentials. In
this configuration, the commissioner is capable of conducting the
commissioning procedure until these are needed. When it is found that
credentials aren't available, the commissioner gracefully discontinues
commissioning.

As part of this change set, fabric index is also no longer specified as
part of controller or commissioner initialization.  chip-tool had 
previously specified a fabric index and reused this as fabric ID.  That
is brittle though because it is not always practical for chip-tool to
know the fabric index ahead of time before initialization.

Instead, the operational key pair and NOC chain are optionally passed to
commissioner / controller initialization.  If passed, these are added or
merged into the fabric table.  Merge works by identifying an existing,
matching fabric by comparing root public key and fabric ID.  Once the new
certificates are merged or added, the controller / commissioner extracts
the fabric index from the fabric table.  

Fixes project-chip#13501
@msandstedt msandstedt deleted the 13501-allow-split-commissioner-admin branch March 31, 2022 13:19
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.

Commissioning must support split commissioner / admin topology
6 participants