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

[ESP32]: PersistentStorageDelegate implementation for ACL #14780

Closed
wants to merge 1 commit into from

Conversation

shubhamdp
Copy link
Contributor

@shubhamdp shubhamdp commented Feb 4, 2022

Problem

PersistentStorageDelegate implementation for ACL storage is missing for ESP32.
Reference issue: #10251

Change overview

Implemented PersistentStorageDelegate for ACL storage.

Testing

Used REPL to write the ACL entries and read back after device reboot. (REF:Matter repl access control)

@github-actions
Copy link

github-actions bot commented Feb 4, 2022

PR #14780: Size comparison from a7d7d8d to aa0ffa7

Full report (32 builds for cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section a7d7d8d aa0ffa7 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 587118 587118 0 0.0
.app_xip_area 493716 493716 0 0.0
.bss 76124 76124 0 0.0
.data 624 624 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 545034 545034 0 0.0
.app_xip_area 453192 453192 0 0.0
.bss 74596 74596 0 0.0
.data 588 588 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 569406 569406 0 0.0
.app_xip_area 468244 468244 0 0.0
.bss 83588 83588 0 0.0
.data 532 532 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 856792 856792 0 0.0
(read/write) 125888 125888 0 0.0
.bss 123960 123960 0 0.0
.data 1924 1924 0 0.0
.text 856784 856784 0 0.0
BRD4161A+rpc (read only) 844168 844168 0 0.0
(read/write) 142544 142544 0 0.0
.bss 140520 140520 0 0.0
.data 2024 2024 0 0.0
.text 844160 844160 0 0.0
window-app BRD4161A (read only) 828996 828996 0 0.0
(read/write) 124524 124524 0 0.0
.bss 122644 122644 0 0.0
.data 1880 1880 0 0.0
.text 828988 828988 0 0.0
k32w light k32w061+release (read/write) 671632 671632 0 0.0
.bss 75828 75828 0 0.0
.data 1884 1884 0 0.0
.text 588120 588120 0 0.0
lock k32w061+release (read/write) 673204 673204 0 0.0
.bss 76148 76148 0 0.0
.data 1924 1924 0 0.0
.text 589332 589332 0 0.0
linux chip-tool-ipv6only arm64 (read only) 7173076 7173076 0 0.0
(read/write) 283441 283441 0 0.0
.bss 47457 47457 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 185656 185656 0 0.0
.dynamic 560 560 0 0.0
.got 45424 45424 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 390508 390508 0 0.0
.text 6180836 6180836 0 0.0
thermostat-no-ble arm64 (read only) 2125964 2125964 0 0.0
(read/write) 140785 140785 0 0.0
.bss 57745 57745 0 0.0
.data 976 976 0 0.0
.data.rel.ro 74928 74928 0 0.0
.dynamic 560 560 0 0.0
.got 4160 4160 0 0.0
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 131292 131292 0 0.0
.text 1776528 1776528 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2386968 2386968 0 0.0
.bss 188964 188964 0 0.0
.data 5296 5296 0 0.0
.text 1349568 1349568 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2347552 2347552 0 0.0
.bss 181072 181072 0 0.0
.data 5600 5600 0 0.0
.text 1310152 1310152 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2311552 2311552 0 0.0
.bss 180960 180960 0 0.0
.data 5584 5584 0 0.0
.text 1274152 1274152 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) 2301820 2301820 0 0.0
.bss 178244 178244 0 0.0
.data 5400 5400 0 0.0
.text 1264392 1264392 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 997571 997571 0 0.0
bss 120540 120540 0 0.0
rodata 117184 117184 0 0.0
text 680936 680936 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 979423 979423 0 0.0
bss 116396 116396 0 0.0
rodata 108572 108572 0 0.0
text 675992 675992 0 0.0
nrf52840dongle_nrf52840 (read/write) 1014259 1014259 0 0.0
bss 121904 121904 0 0.0
rodata 116020 116020 0 0.0
text 686428 686428 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 904262 904262 0 0.0
bss 117104 117104 0 0.0
rodata 110440 110440 0 0.0
text 595948 595948 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 929711 929711 0 0.0
bss 118880 118880 0 0.0
rodata 105532 105532 0 0.0
text 626796 626796 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 837238 837238 0 0.0
bss 115472 115472 0 0.0
rodata 98704 98704 0 0.0
text 542584 542584 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541779 541779 0 0.0
bss 52588 52588 0 0.0
rodata 50048 50048 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 932343 932343 0 0.0
bss 118632 118632 0 0.0
rodata 106004 106004 0 0.0
text 629132 629132 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 927283 927283 0 0.0
bss 118632 118632 0 0.0
rodata 105008 105008 0 0.0
text 625072 625072 0 0.0
shell nrf52840dk_nrf52840 (read/write) 802571 802571 0 0.0
bss 110968 110968 0 0.0
rodata 78480 78480 0 0.0
text 535544 535544 0 0.0
p6 all-clusters-app default (read/write) 2448184 2448184 0 0.0
.bss 117124 117124 0 0.0
.data 2584 2584 0 0.0
.text 1406448 1406448 0 0.0
light-app default (read/write) 2353088 2353088 0 0.0
.bss 106268 106268 0 0.0
.data 2432 2432 0 0.0
.text 1311352 1311352 0 0.0
lock-app default (read/write) 2318288 2318288 0 0.0
.bss 105980 105980 0 0.0
.data 2392 2392 0 0.0
.text 1276552 1276552 0 0.0
qpg lighting-app qpg6105+debug (read only) 579892 579892 0 0.0
(read/write) 146940 146940 0 0.0
.bss 88120 88120 0 0.0
.data 1088 1088 0 0.0
.text 574572 574572 0 0.0
lock-app qpg6105+debug (read only) 525964 525964 0 0.0
(read/write) 146940 146940 0 0.0
.bss 87560 87560 0 0.0
.data 1024 1024 0 0.0
.text 520644 520644 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) 858818 858818 0 0.0
bss 88476 88476 0 0.0
noinit 37160 37160 0 0.0
text 601990 601990 0 0.0

@github-actions
Copy link

github-actions bot commented Feb 4, 2022

PR #14780: Size comparison from a7d7d8d to 7a8c1c3

Increases (2 builds for esp32)
platform target config section a7d7d8d 7a8c1c3 change % change
esp32 all-clusters-app c3devkit (read only) 935310 935456 146 0.0
(read/write) 1401162 1401226 64 0.0
.dram0.data 14276 14284 8 0.1
.flash.rodata 197920 197984 64 0.0
.flash.text 935310 935456 146 0.0
m5stack (read only) 983335 983491 156 0.0
(read/write) 465516 465596 80 0.0
.dram0.data 34040 34048 8 0.0
.flash.rodata 224532 224604 72 0.0
.flash.text 977951 978107 156 0.0
Full report (43 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section a7d7d8d 7a8c1c3 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 587118 587118 0 0.0
.app_xip_area 493716 493716 0 0.0
.bss 76124 76124 0 0.0
.data 624 624 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 545034 545034 0 0.0
.app_xip_area 453192 453192 0 0.0
.bss 74596 74596 0 0.0
.data 588 588 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 569406 569406 0 0.0
.app_xip_area 468244 468244 0 0.0
.bss 83588 83588 0 0.0
.data 532 532 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 856792 856792 0 0.0
(read/write) 125888 125888 0 0.0
.bss 123960 123960 0 0.0
.data 1924 1924 0 0.0
.text 856784 856784 0 0.0
BRD4161A+rpc (read only) 844168 844168 0 0.0
(read/write) 142544 142544 0 0.0
.bss 140520 140520 0 0.0
.data 2024 2024 0 0.0
.text 844160 844160 0 0.0
window-app BRD4161A (read only) 828996 828996 0 0.0
(read/write) 124524 124524 0 0.0
.bss 122644 122644 0 0.0
.data 1880 1880 0 0.0
.text 828988 828988 0 0.0
esp32 all-clusters-app c3devkit (read only) 935310 935456 146 0.0
(read/write) 1401162 1401226 64 0.0
.dram0.bss 70056 70056 0 0.0
.dram0.data 14276 14284 8 0.1
.flash.rodata 197920 197984 64 0.0
.flash.text 935310 935456 146 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 983335 983491 156 0.0
(read/write) 465516 465596 80 0.0
.dram0.bss 74816 74816 0 0.0
.dram0.data 34040 34048 8 0.0
.flash.rodata 224532 224604 72 0.0
.flash.text 977951 978107 156 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 671632 671632 0 0.0
.bss 75828 75828 0 0.0
.data 1884 1884 0 0.0
.text 588120 588120 0 0.0
lock k32w061+release (read/write) 673204 673204 0 0.0
.bss 76148 76148 0 0.0
.data 1924 1924 0 0.0
.text 589332 589332 0 0.0
linux all-clusters-app debug (read only) 2314145 2314145 0 0.0
(read/write) 139968 139968 0 0.0
.bss 54592 54592 0 0.0
.data 1232 1232 0 0.0
.data.rel.ro 78472 78472 0 0.0
.dynamic 592 592 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 204293 204293 0 0.0
.text 1947650 1947650 0 0.0
bridge-app debug+rpc (read only) 1698853 1698853 0 0.0
(read/write) 84536 84536 0 0.0
.bss 39296 39296 0 0.0
.data 1986 1986 0 0.0
.data.rel.ro 38080 38080 0 0.0
.dynamic 592 592 0 0.0
.got 3976 3976 0 0.0
.init 27 27 0 0.0
.init_array 560 560 0 0.0
.rodata 139252 139252 0 0.0
.text 1443173 1443173 0 0.0
chip-tool debug (read only) 7224949 7224949 0 0.0
(read/write) 180584 180584 0 0.0
.bss 29192 29192 0 0.0
.data 1088 1088 0 0.0
.data.rel.ro 144304 144304 0 0.0
.dynamic 608 608 0 0.0
.got 4760 4760 0 0.0
.init 27 27 0 0.0
.init_array 600 600 0 0.0
.rodata 407701 407701 0 0.0
.text 6449205 6449205 0 0.0
chip-tool-ipv6only arm64 (read only) 7173076 7173076 0 0.0
(read/write) 283441 283441 0 0.0
.bss 47457 47457 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 185656 185656 0 0.0
.dynamic 560 560 0 0.0
.got 45424 45424 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 390508 390508 0 0.0
.text 6180836 6180836 0 0.0
door-lock-app debug (read only) 1896153 1896153 0 0.0
(read/write) 110728 110728 0 0.0
.bss 42272 42272 0 0.0
.data 962 962 0 0.0
.data.rel.ro 62064 62064 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 172060 172060 0 0.0
.text 1575698 1575698 0 0.0
lighting-app debug+rpc (read only) 1998641 1998641 0 0.0
(read/write) 115784 115784 0 0.0
.bss 43224 43224 0 0.0
.data 1392 1392 0 0.0
.data.rel.ro 65680 65680 0 0.0
.dynamic 608 608 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 712 712 0 0.0
.rodata 162001 162001 0 0.0
.text 1681970 1681970 0 0.0
ota-provider-app debug (read only) 1694209 1694209 0 0.0
(read/write) 80592 80592 0 0.0
.bss 41152 41152 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 32824 32824 0 0.0
.dynamic 608 608 0 0.0
.got 4248 4248 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 149670 149670 0 0.0
.text 1426370 1426370 0 0.0
ota-requestor-app debug (read only) 1699521 1699521 0 0.0
(read/write) 83512 83512 0 0.0
.bss 42464 42464 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 34632 34632 0 0.0
.dynamic 592 592 0 0.0
.got 4040 4040 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 144951 144951 0 0.0
.text 1437650 1437650 0 0.0
shell debug (read only) 2287289 2287289 0 0.0
(read/write) 141488 141488 0 0.0
.bss 62016 62016 0 0.0
.data 800 800 0 0.0
.data.rel.ro 72976 72976 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 205042 205042 0 0.0
.text 1925970 1925970 0 0.0
thermostat-no-ble arm64 (read only) 2125964 2125964 0 0.0
(read/write) 140785 140785 0 0.0
.bss 57745 57745 0 0.0
.data 976 976 0 0.0
.data.rel.ro 74928 74928 0 0.0
.dynamic 560 560 0 0.0
.got 4160 4160 0 0.0
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 131292 131292 0 0.0
.text 1776528 1776528 0 0.0
tv-app debug (read only) 2519769 2519769 0 0.0
(read/write) 139640 139640 0 0.0
.bss 57248 57248 0 0.0
.data 3136 3136 0 0.0
.data.rel.ro 73248 73248 0 0.0
.dynamic 592 592 0 0.0
.got 4528 4528 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 193420 193420 0 0.0
.text 2153170 2153170 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2386968 2386968 0 0.0
.bss 188964 188964 0 0.0
.data 5296 5296 0 0.0
.text 1349568 1349568 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2347552 2347552 0 0.0
.bss 181072 181072 0 0.0
.data 5600 5600 0 0.0
.text 1310152 1310152 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2311552 2311552 0 0.0
.bss 180960 180960 0 0.0
.data 5584 5584 0 0.0
.text 1274152 1274152 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) 2301820 2301820 0 0.0
.bss 178244 178244 0 0.0
.data 5400 5400 0 0.0
.text 1264392 1264392 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 997571 997571 0 0.0
bss 120540 120540 0 0.0
rodata 117184 117184 0 0.0
text 680936 680936 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 979423 979423 0 0.0
bss 116396 116396 0 0.0
rodata 108572 108572 0 0.0
text 675992 675992 0 0.0
nrf52840dongle_nrf52840 (read/write) 1014259 1014259 0 0.0
bss 121904 121904 0 0.0
rodata 116020 116020 0 0.0
text 686428 686428 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 904262 904262 0 0.0
bss 117104 117104 0 0.0
rodata 110440 110440 0 0.0
text 595948 595948 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 929711 929711 0 0.0
bss 118880 118880 0 0.0
rodata 105532 105532 0 0.0
text 626796 626796 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 837238 837238 0 0.0
bss 115472 115472 0 0.0
rodata 98704 98704 0 0.0
text 542584 542584 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541779 541779 0 0.0
bss 52588 52588 0 0.0
rodata 50048 50048 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 932343 932343 0 0.0
bss 118632 118632 0 0.0
rodata 106004 106004 0 0.0
text 629132 629132 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 927283 927283 0 0.0
bss 118632 118632 0 0.0
rodata 105008 105008 0 0.0
text 625072 625072 0 0.0
shell nrf52840dk_nrf52840 (read/write) 802571 802571 0 0.0
bss 110968 110968 0 0.0
rodata 78480 78480 0 0.0
text 535544 535544 0 0.0
p6 all-clusters-app default (read/write) 2448184 2448184 0 0.0
.bss 117124 117124 0 0.0
.data 2584 2584 0 0.0
.text 1406448 1406448 0 0.0
light-app default (read/write) 2353088 2353088 0 0.0
.bss 106268 106268 0 0.0
.data 2432 2432 0 0.0
.text 1311352 1311352 0 0.0
lock-app default (read/write) 2318288 2318288 0 0.0
.bss 105980 105980 0 0.0
.data 2392 2392 0 0.0
.text 1276552 1276552 0 0.0
qpg lighting-app qpg6105+debug (read only) 579892 579892 0 0.0
(read/write) 146940 146940 0 0.0
.bss 88120 88120 0 0.0
.data 1088 1088 0 0.0
.text 574572 574572 0 0.0
lock-app qpg6105+debug (read only) 525964 525964 0 0.0
(read/write) 146940 146940 0 0.0
.bss 87560 87560 0 0.0
.data 1024 1024 0 0.0
.text 520644 520644 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) 858818 858818 0 0.0
bss 88476 88476 0 0.0
noinit 37160 37160 0 0.0
text 601990 601990 0 0.0

@harimau-qirex
Copy link
Contributor

PR #14680 moved the initialisation of the example ACL delegate into Server::Init, removed SetAccessControlDelegateStorage, and uses the persistent storage delegate owned by Server to store the ACL entries. From what I can tell ESP32's main.cpp uses Server, so this change may no longer be needed.

@shubhamdp
Copy link
Contributor Author

PR #14680 moved the initialisation of the example ACL delegate into Server::Init, removed SetAccessControlDelegateStorage, and uses the persistent storage delegate owned by Server to store the ACL entries. From what I can tell ESP32's main.cpp uses Server, so this change may no longer be needed.

@harimau-qirex thanks, I'll closing this.

@shubhamdp shubhamdp closed this Feb 7, 2022
@shubhamdp shubhamdp deleted the esp32_acl_nvs branch August 18, 2022 10:09
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.

2 participants