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

[OTA] Set OTA Requestor server attributes in CHIP context #16041

Conversation

carol-apple
Copy link
Contributor

@carol-apple carol-apple commented Mar 9, 2022

Problem

The OTARequestor was calling into core CHIP functionality (updating server attribute states) at start up on the main thread. This should be done in the CHIP context.

Fixes: #15128

Change overview

  • Create a callback function to be run in the CHIP context
  • Schedule the work from OTARequestor::Init

Testing

  • Verified that core CHIP functionality is not called on the main thread
  • Verified that basic transfer between requestor/provider succeeds

@github-actions
Copy link

github-actions bot commented Mar 9, 2022

PR #16041: Size comparison from 6081193 to a43b170

Increases (5 builds for cyw30739, efr32, k32w, linux)
platform target config section 6081193 a43b170 change % change
cyw30739 ota-requestor cyw930739m2evb_01 (read/write) 570466 570482 16 0.0
.app_xip_area 466816 466832 16 0.0
efr32 lighting-app BRD4161A (read only) 922528 922560 32 0.0
.text 922520 922552 32 0.0
BRD4161A+rpc (read only) 951356 951372 16 0.0
.text 951348 951364 16 0.0
k32w light k32w061+release (read/write) 696508 696524 16 0.0
.text 610992 611008 16 0.0
linux ota-requestor-app debug (read only) 1912753 1912897 144 0.0
.text 1607186 1607330 144 0.0
Full report (26 builds for cyw30739, efr32, esp32, k32w, linux, mbed, p6, telink)
platform target config section 6081193 a43b170 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 602202 602202 0 0.0
.app_xip_area 506720 506720 0 0.0
.bss 78172 78172 0 0.0
.data 652 652 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 560078 560078 0 0.0
.app_xip_area 466132 466132 0 0.0
.bss 76676 76676 0 0.0
.data 616 616 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 570466 570482 16 0.0
.app_xip_area 466816 466832 16 0.0
.bss 86060 86060 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) 922528 922560 32 0.0
(read/write) 128896 128896 0 0.0
.bss 126856 126856 0 0.0
.data 2040 2040 0 0.0
.text 922520 922552 32 0.0
BRD4161A+rpc (read only) 951356 951372 16 0.0
(read/write) 144852 144852 0 0.0
.bss 142632 142632 0 0.0
.data 2220 2220 0 0.0
.text 951348 951364 16 0.0
window-app BRD4161A (read only) 854412 854412 0 0.0
(read/write) 126852 126852 0 0.0
.bss 124936 124936 0 0.0
.data 1916 1916 0 0.0
.text 854404 854404 0 0.0
esp32 all-clusters-app c3devkit (read only) 958694 958694 0 0.0
(read/write) 1393802 1393802 0 0.0
.dram0.bss 63576 63576 0 0.0
.dram0.data 14220 14220 0 0.0
.flash.rodata 197088 197088 0 0.0
.flash.text 958694 958694 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1013687 1013687 0 0.0
(read/write) 461052 461052 0 0.0
.dram0.bss 69096 69096 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 226056 226056 0 0.0
.flash.text 1008303 1008303 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 696508 696524 16 0.0
.bss 77792 77792 0 0.0
.data 1924 1924 0 0.0
.text 610992 611008 16 0.0
lock k32w061+release (read/write) 697016 697016 0 0.0
.bss 77704 77704 0 0.0
.data 1964 1964 0 0.0
.text 611548 611548 0 0.0
linux all-clusters-app debug (read only) 2432289 2432289 0 0.0
(read/write) 145872 145872 0 0.0
.bss 60352 60352 0 0.0
.data 1360 1360 0 0.0
.data.rel.ro 78424 78424 0 0.0
.dynamic 592 592 0 0.0
.got 4176 4176 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 205765 205765 0 0.0
.text 2063538 2063538 0 0.0
bridge-app debug+rpc (read only) 1737061 1737061 0 0.0
(read/write) 92784 92784 0 0.0
.bss 47624 47624 0 0.0
.data 2016 2016 0 0.0
.data.rel.ro 38064 38064 0 0.0
.dynamic 592 592 0 0.0
.got 3928 3928 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 141964 141964 0 0.0
.text 1479125 1479125 0 0.0
chip-tool debug (read only) 10095253 10095253 0 0.0
(read/write) 358168 358168 0 0.0
.bss 25640 25640 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 325352 325352 0 0.0
.dynamic 608 608 0 0.0
.got 4776 4776 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 514388 514388 0 0.0
.text 8798181 8798181 0 0.0
chip-tool-ipv6only arm64 (read only) 9730988 9730988 0 0.0
(read/write) 475969 475969 0 0.0
.bss 43953 43953 0 0.0
.data 1200 1200 0 0.0
.data.rel.ro 371712 371712 0 0.0
.dynamic 560 560 0 0.0
.got 55304 55304 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492004 492004 0 0.0
.text 8187796 8187796 0 0.0
door-lock-app debug (read only) 1951521 1951521 0 0.0
(read/write) 119296 119296 0 0.0
.bss 50656 50656 0 0.0
.data 1056 1056 0 0.0
.data.rel.ro 62184 62184 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 173852 173852 0 0.0
.text 1629026 1629026 0 0.0
lighting-app debug+rpc (read only) 2083689 2083689 0 0.0
(read/write) 124616 124616 0 0.0
.bss 51456 51456 0 0.0
.data 1536 1536 0 0.0
.data.rel.ro 66104 66104 0 0.0
.dynamic 608 608 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 166044 166044 0 0.0
.text 1761986 1761986 0 0.0
ota-provider-app debug (read only) 1884793 1884793 0 0.0
(read/write) 114896 114896 0 0.0
.bss 50464 50464 0 0.0
.data 1320 1320 0 0.0
.data.rel.ro 57464 57464 0 0.0
.dynamic 608 608 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 159091 159091 0 0.0
.text 1574978 1574978 0 0.0
ota-requestor-app debug (read only) 1912753 1912897 144 0.0
(read/write) 117864 117864 0 0.0
.bss 51584 51584 0 0.0
.data 1480 1480 0 0.0
.data.rel.ro 59368 59368 0 0.0
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 155052 155052 0 0.0
.text 1607186 1607330 144 0.0
shell debug (read only) 2398465 2398465 0 0.0
(read/write) 150088 150088 0 0.0
.bss 70472 70472 0 0.0
.data 864 864 0 0.0
.data.rel.ro 73064 73064 0 0.0
.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 205714 205714 0 0.0
.text 2036178 2036178 0 0.0
thermostat-no-ble arm64 (read only) 2180428 2180428 0 0.0
(read/write) 148833 148833 0 0.0
.bss 65409 65409 0 0.0
.data 1048 1048 0 0.0
.data.rel.ro 75160 75160 0 0.0
.dynamic 560 560 0 0.0
.got 4240 4240 0 0.0
.init 24 24 0 0.0
.init_array 352 352 0 0.0
.rodata 133228 133228 0 0.0
.text 1828608 1828608 0 0.0
tv-app debug (read only) 2624313 2624313 0 0.0
(read/write) 251000 251000 0 0.0
.bss 168160 168160 0 0.0
.data 3168 3168 0 0.0
.data.rel.ro 73624 73624 0 0.0
.dynamic 592 592 0 0.0
.got 4544 4544 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 199485 199485 0 0.0
.text 2250738 2250738 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2351892 2351892 0 0.0
.bss 186212 186212 0 0.0
.data 5792 5792 0 0.0
.text 1314492 1314492 0 0.0
p6 all-clusters-app default (read/write) 2495488 2495488 0 0.0
.bss 119640 119640 0 0.0
.data 2680 2680 0 0.0
.text 1453752 1453752 0 0.0
light-app default (read/write) 2398960 2398960 0 0.0
.bss 113104 113104 0 0.0
.data 2536 2536 0 0.0
.text 1357224 1357224 0 0.0
lock-app default (read/write) 2362520 2362520 0 0.0
.bss 112848 112848 0 0.0
.data 2496 2496 0 0.0
.text 1320784 1320784 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 889826 889826 0 0.0
bss 86968 86968 0 0.0
noinit 37160 37160 0 0.0
text 629098 629098 0 0.0

@woody-apple woody-apple merged commit 6b7d009 into project-chip:master Mar 10, 2022
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.

Invoke the OTARequestor logic from the chip task context
5 participants