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] Consolidate provider location between requestor core and driver #16088

Conversation

carol-apple
Copy link
Contributor

Problem

Both OTARequestor::mProviderLocation and GenericOTARequestorDriver::mLastUsedProvider exist. These two essentially contain the same provider information. When one is set, the other should too. They should just be consolidated.

Fixes: #15974

Change overview

  • Remove GenericOTARequestorDriver::mLastUsedProvider - this is only used to determine the next provider location so just use OTARequestor::mProviderLocation to do that
  • Create a getter for OTARequestor::mProviderLocation - call this getter in the driver wherever it references mLastUsedProvider
  • OTARequestor::mProviderLocation is no longer cleared once set - it was meant to be cleared whenever no OTA in progress but OTARequestor::mCurrentUpdateState can be used to determine that

Testing

  • Verified that basic transfer succeeds
  • Verified that DetermineProviderLocation is still selecting correctly when multiple default OTA providers are in the list

@github-actions
Copy link

github-actions bot commented Mar 11, 2022

PR #16088: Size comparison from 10ab541 to a557060

Increases above 0.2%:

platform target config section 10ab541 a557060 change % change
cyw30739 ota-requestor cyw930739m2evb_01 .data 540 564 24 4.4
efr32 lighting-app BRD4161A .data 2028 2052 24 1.2
BRD4161A+rpc .data 2208 2232 24 1.1
k32w light k32w061+release .data 1912 1928 16 0.8
Increases (4 builds for cyw30739, efr32, k32w)
platform target config section 10ab541 a557060 change % change
cyw30739 ota-requestor cyw930739m2evb_01 .data 540 564 24 4.4
efr32 lighting-app BRD4161A .data 2028 2052 24 1.2
BRD4161A+rpc .data 2208 2232 24 1.1
k32w light k32w061+release .data 1912 1928 16 0.8
Decreases (6 builds for cyw30739, efr32, k32w, linux, nrfconnect)
platform target config section 10ab541 a557060 change % change
cyw30739 ota-requestor cyw930739m2evb_01 (read/write) 566878 566766 -112 -0.0
.app_xip_area 466316 466228 -88 -0.0
.bss 82980 82932 -48 -0.1
efr32 lighting-app BRD4161A (read only) 921192 921128 -64 -0.0
(read/write) 128256 128232 -24 -0.0
.bss 126224 126176 -48 -0.0
.text 921184 921120 -64 -0.0
BRD4161A+rpc (read only) 950020 949940 -80 -0.0
(read/write) 144208 144184 -24 -0.0
.bss 142000 141952 -48 -0.0
.text 950012 949932 -80 -0.0
k32w light k32w061+release (read/write) 695516 695388 -128 -0.0
.bss 77160 77112 -48 -0.1
.text 610644 610548 -96 -0.0
linux ota-requestor-app debug (read only) 1917801 1917593 -208 -0.0
(read/write) 117992 117960 -32 -0.0
.bss 51584 51552 -32 -0.1
.text 1611474 1611266 -208 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1152707 1152643 -64 -0.0
bss 146212 146188 -24 -0.0
text 786748 786676 -72 -0.0
Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 10ab541 a557060 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 599102 599102 0 0.0
.app_xip_area 506700 506700 0 0.0
.bss 75108 75108 0 0.0
.data 640 640 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 556986 556986 0 0.0
.app_xip_area 466112 466112 0 0.0
.bss 73612 73612 0 0.0
.data 604 604 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 566878 566766 -112 -0.0
.app_xip_area 466316 466228 -88 -0.0
.bss 82980 82932 -48 -0.1
.data 540 564 24 4.4
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 921192 921128 -64 -0.0
(read/write) 128256 128232 -24 -0.0
.bss 126224 126176 -48 -0.0
.data 2028 2052 24 1.2
.text 921184 921120 -64 -0.0
BRD4161A+rpc (read only) 950020 949940 -80 -0.0
(read/write) 144208 144184 -24 -0.0
.bss 142000 141952 -48 -0.0
.data 2208 2232 24 1.1
.text 950012 949932 -80 -0.0
window-app BRD4161A (read only) 853732 853732 0 0.0
(read/write) 126216 126216 0 0.0
.bss 124312 124312 0 0.0
.data 1904 1904 0 0.0
.text 853724 853724 0 0.0
esp32 all-clusters-app c3devkit (read only) 958524 958524 0 0.0
(read/write) 1393858 1393858 0 0.0
.dram0.bss 63584 63584 0 0.0
.dram0.data 14220 14220 0 0.0
.flash.rodata 197144 197144 0 0.0
.flash.text 958524 958524 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1014127 1014127 0 0.0
(read/write) 461092 461092 0 0.0
.dram0.bss 69104 69104 0 0.0
.dram0.data 34048 34048 0 0.0
.flash.rodata 226104 226104 0 0.0
.flash.text 1008743 1008743 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 695516 695388 -128 -0.0
.bss 77160 77112 -48 -0.1
.data 1912 1928 16 0.8
.text 610644 610548 -96 -0.0
lock k32w061+release (read/write) 696360 696360 0 0.0
.bss 77080 77080 0 0.0
.data 1952 1952 0 0.0
.text 611528 611528 0 0.0
linux all-clusters-app debug (read only) 2436881 2436881 0 0.0
(read/write) 145840 145840 0 0.0
.bss 60352 60352 0 0.0
.data 1328 1328 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 206213 206213 0 0.0
.text 2067730 2067730 0 0.0
bridge-app debug+rpc (read only) 1742165 1742165 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 142348 142348 0 0.0
.text 1483893 1483893 0 0.0
chip-tool debug (read only) 10096133 10096133 0 0.0
(read/write) 357976 357976 0 0.0
.bss 25640 25640 0 0.0
.data 1120 1120 0 0.0
.data.rel.ro 325208 325208 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 514516 514516 0 0.0
.text 8799365 8799365 0 0.0
chip-tool-ipv6only arm64 (read only) 9729660 9729660 0 0.0
(read/write) 475729 475729 0 0.0
.bss 43953 43953 0 0.0
.data 1176 1176 0 0.0
.data.rel.ro 371520 371520 0 0.0
.dynamic 560 560 0 0.0
.got 55280 55280 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492148 492148 0 0.0
.text 8186868 8186868 0 0.0
door-lock-app debug (read only) 1956545 1956545 0 0.0
(read/write) 119264 119264 0 0.0
.bss 50656 50656 0 0.0
.data 1024 1024 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 174332 174332 0 0.0
.text 1633618 1633618 0 0.0
lighting-app debug+rpc (read only) 2088681 2088681 0 0.0
(read/write) 124584 124584 0 0.0
.bss 51456 51456 0 0.0
.data 1504 1504 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 166492 166492 0 0.0
.text 1766578 1766578 0 0.0
ota-provider-app debug (read only) 1889961 1889961 0 0.0
(read/write) 114896 114896 0 0.0
.bss 50496 50496 0 0.0
.data 1288 1288 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 159539 159539 0 0.0
.text 1579746 1579746 0 0.0
ota-requestor-app debug (read only) 1917801 1917593 -208 -0.0
(read/write) 117992 117960 -32 -0.0
.bss 51584 51552 -32 -0.1
.data 1448 1448 0 0.0
.data.rel.ro 59512 59512 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 155500 155500 0 0.0
.text 1611474 1611266 -208 -0.0
shell debug (read only) 2402881 2402881 0 0.0
(read/write) 150088 150088 0 0.0
.bss 70472 70472 0 0.0
.data 848 848 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 206162 206162 0 0.0
.text 2040194 2040194 0 0.0
thermostat-no-ble arm64 (read only) 2181588 2181588 0 0.0
(read/write) 148625 148625 0 0.0
.bss 65409 65409 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 74968 74968 0 0.0
.dynamic 560 560 0 0.0
.got 4256 4256 0 0.0
.init 24 24 0 0.0
.init_array 352 352 0 0.0
.rodata 133444 133444 0 0.0
.text 1829984 1829984 0 0.0
tv-app debug (read only) 2628553 2628553 0 0.0
(read/write) 250360 250360 0 0.0
.bss 167520 167520 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 199805 199805 0 0.0
.text 2254706 2254706 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2351012 2351012 0 0.0
.bss 186212 186212 0 0.0
.data 5784 5784 0 0.0
.text 1313612 1313612 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1152707 1152643 -64 -0.0
bss 146212 146188 -24 -0.0
rodata 144516 144516 0 0.0
text 786748 786676 -72 -0.0
p6 all-clusters-app default (read/write) 2495680 2495680 0 0.0
.bss 119640 119640 0 0.0
.data 2672 2672 0 0.0
.text 1453944 1453944 0 0.0
light-app default (read/write) 2399680 2399680 0 0.0
.bss 113104 113104 0 0.0
.data 2528 2528 0 0.0
.text 1357944 1357944 0 0.0
lock-app default (read/write) 2363240 2363240 0 0.0
.bss 112848 112848 0 0.0
.data 2488 2488 0 0.0
.text 1321504 1321504 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 889766 889766 0 0.0
bss 86976 86976 0 0.0
noinit 37160 37160 0 0.0
text 628970 628970 0 0.0

@Damian-Nordic Damian-Nordic merged commit ae514b6 into project-chip:master Mar 11, 2022
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 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.

TriggerImmediateQuery does not set mLastProvider (GenericOTARequestorDriver)
3 participants