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

Revert "Add multi-address support for PeerAddress" #15082

Merged
merged 4 commits into from
Feb 11, 2022

Conversation

andy31415
Copy link
Contributor

@andy31415 andy31415 commented Feb 11, 2022

Problem

Change to have PeerAddress hold multiple IPs costs a lot of RAM (Peer Addresses exist in session pools and more) and generally we only need to find the good IP address during CASE (if a node does not reply, we likely do not know if IP changed or some session key was lost e.g. for reboot, so we need to run CASE anyway).

Change overview

Revert #14968, but keep unit tests (changed so they pass) and kept removal of ToPeerAddress usage to not be defined in CHIPController.

Testing

Compile and verified that unit tests pass on linux.

@github-actions
Copy link

github-actions bot commented Feb 11, 2022

PR #15082: Size comparison from 0edb9f9 to 65e84c0

Increases above 0.2%:

platform target config section 0edb9f9 65e84c0 change % change
linux chip-tool-ipv6only arm64 (read only) 8135596 8192996 57400 0.7
(read/write) 341217 353217 12000 3.5
.data.rel.ro 235568 248680 13112 5.6
.rodata 433956 436028 2072 0.5
.text 6972292 6996132 23840 0.3
Increases (12 builds for esp32, linux, nrfconnect)
platform target config section 0edb9f9 65e84c0 change % change
esp32 all-clusters-app c3devkit .flash.rodata 199016 199032 16 0.0
m5stack .flash.rodata 226112 226136 24 0.0
linux chip-tool-ipv6only arm64 (read only) 8135596 8192996 57400 0.7
(read/write) 341217 353217 12000 3.5
.data.rel.ro 235568 248680 13112 5.6
.got 48952 49008 56 0.1
.rodata 433956 436028 2072 0.5
.text 6972292 6996132 23840 0.3
nrfconnect lighting-app nrf52840dk_nrf52840 rodata 119984 120016 32 0.0
nrf52840dk_nrf52840+rpc rodata 111348 111384 36 0.0
nrf52840dongle_nrf52840 rodata 118844 118884 40 0.0
nrf5340dk_nrf5340_cpuapp rodata 113224 113256 32 0.0
lock-app nrf52840dk_nrf52840 rodata 108728 108760 32 0.0
nrf5340dk_nrf5340_cpuapp rodata 101900 101932 32 0.0
pump-app nrf52840dk_nrf52840 rodata 107708 107740 32 0.0
pump-controller-app nrf52840dk_nrf52840 rodata 107380 107412 32 0.0
shell nrf52840dk_nrf52840 rodata 78948 79012 64 0.1
Decreases (31 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 0edb9f9 65e84c0 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 595150 589946 -5204 -0.9
.app_xip_area 496564 495432 -1132 -0.2
.bss 81284 77212 -4072 -5.0
lock cyw930739m2evb_01 (read/write) 552954 547758 -5196 -0.9
.app_xip_area 455936 454812 -1124 -0.2
.bss 79756 75684 -4072 -5.1
ota-requestor cyw930739m2evb_01 (read/write) 571890 566642 -5248 -0.9
.app_xip_area 465616 464440 -1176 -0.3
.bss 88684 84612 -4072 -4.6
efr32 lighting-app BRD4161A (read only) 909560 908248 -1312 -0.1
(read/write) 129104 127408 -1696 -1.3
.bss 127072 125376 -1696 -1.3
.text 909552 908240 -1312 -0.1
BRD4161A+rpc (read only) 897020 895724 -1296 -0.1
(read/write) 145764 144068 -1696 -1.2
.bss 143632 141936 -1696 -1.2
.text 897012 895716 -1296 -0.1
window-app BRD4161A (read only) 844640 843472 -1168 -0.1
(read/write) 127168 125472 -1696 -1.3
.bss 125264 123568 -1696 -1.4
.text 844632 843464 -1168 -0.1
esp32 all-clusters-app c3devkit (read only) 945430 944362 -1068 -0.1
(read/write) 1400306 1398626 -1680 -0.1
.dram0.bss 68128 66432 -1696 -2.5
.flash.text 945430 944362 -1068 -0.1
m5stack (read only) 995071 994335 -736 -0.1
(read/write) 465576 463904 -1672 -0.4
.dram0.bss 73272 71576 -1696 -2.3
.flash.text 989687 988951 -736 -0.1
k32w light k32w061+release (read/write) 685636 682856 -2780 -0.4
.bss 78376 76680 -1696 -2.2
.text 599556 598472 -1084 -0.2
lock k32w061+release (read/write) 691064 688284 -2780 -0.4
.bss 78768 77072 -1696 -2.2
.text 604548 603464 -1084 -0.2
linux chip-tool-ipv6only arm64 .bss 51681 50513 -1168 -2.3
thermostat-no-ble arm64 (read only) 2150204 2148028 -2176 -0.1
(read/write) 142225 140657 -1568 -1.1
.bss 59105 57537 -1568 -2.7
.rodata 132876 132796 -80 -0.1
.text 1799184 1797088 -2096 -0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2398264 2397320 -944 -0.0
.bss 190196 188500 -1696 -0.9
.text 1360864 1359920 -944 -0.1
lighting-app CY8CPROTO_062_4343W+release (read/write) 2360152 2359216 -936 -0.0
.bss 182808 181112 -1696 -0.9
.text 1322752 1321816 -936 -0.1
lock-app CY8CPROTO_062_4343W+release (read/write) 2323680 2322744 -936 -0.0
.bss 182696 181000 -1696 -0.9
.text 1286280 1285344 -936 -0.1
shell CY8CPROTO_062_4343W+release (read/write) 2309116 2308172 -944 -0.0
.bss 179948 178252 -1696 -0.9
.text 1271688 1270744 -944 -0.1
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 1017907 1015171 -2736 -0.3
bss 123132 121436 -1696 -1.4
text 695896 694780 -1116 -0.2
nrf52840dk_nrf52840+rpc (read/write) 986735 983987 -2748 -0.3
bss 120320 118624 -1696 -1.4
text 675508 674392 -1116 -0.2
nrf52840dongle_nrf52840 (read/write) 1033731 1031035 -2696 -0.3
bss 124520 122824 -1696 -1.4
text 700484 699416 -1068 -0.2
nrf5340dk_nrf5340_cpuapp (read/write) 924646 921846 -2800 -0.3
bss 119696 118000 -1696 -1.4
text 610932 609800 -1132 -0.2
lock-app nrf52840dk_nrf52840 (read/write) 947731 944899 -2832 -0.3
bss 121504 119808 -1696 -1.4
text 638900 637828 -1072 -0.2
nrf5340dk_nrf5340_cpuapp (read/write) 855210 852458 -2752 -0.3
bss 118096 116400 -1696 -1.4
text 554708 553624 -1084 -0.2
pump-app nrf52840dk_nrf52840 (read/write) 946575 943743 -2832 -0.3
bss 121224 119528 -1696 -1.4
text 638956 637884 -1072 -0.2
pump-controller-app nrf52840dk_nrf52840 (read/write) 942495 939663 -2832 -0.3
bss 121228 119532 -1696 -1.4
text 635196 634124 -1072 -0.2
shell nrf52840dk_nrf52840 (read/write) 806207 804495 -1712 -0.2
bss 112376 111184 -1192 -1.1
text 537304 536680 -624 -0.1
p6 all-clusters-app default (read/write) 2483960 2482352 -1608 -0.1
.bss 119816 117768 -2048 -1.7
.text 1442224 1440616 -1608 -0.1
light-app default (read/write) 2390544 2389032 -1512 -0.1
.bss 109464 107416 -2048 -1.9
.text 1348808 1347296 -1512 -0.1
lock-app default (read/write) 2354016 2352504 -1512 -0.1
.bss 109184 107136 -2048 -1.9
.text 1312280 1310768 -1512 -0.1
qpg lighting-app qpg6105+debug (read only) 595528 594444 -1084 -0.2
.bss 90656 88960 -1696 -1.9
.text 590208 589124 -1084 -0.2
lock-app qpg6105+debug (read only) 561280 560192 -1088 -0.2
.bss 90640 88944 -1696 -1.9
.text 555960 554872 -1088 -0.2
telink lighting-app tlsr9518adk80d (read/write) 877134 874166 -2968 -0.3
bss 90456 88760 -1696 -1.9
text 615198 613958 -1240 -0.2
Full report (34 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 0edb9f9 65e84c0 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 595150 589946 -5204 -0.9
.app_xip_area 496564 495432 -1132 -0.2
.bss 81284 77212 -4072 -5.0
.data 644 644 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 552954 547758 -5196 -0.9
.app_xip_area 455936 454812 -1124 -0.2
.bss 79756 75684 -4072 -5.1
.data 608 608 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 571890 566642 -5248 -0.9
.app_xip_area 465616 464440 -1176 -0.3
.bss 88684 84612 -4072 -4.6
.data 552 552 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 909560 908248 -1312 -0.1
(read/write) 129104 127408 -1696 -1.3
.bss 127072 125376 -1696 -1.3
.data 2032 2032 0 0.0
.text 909552 908240 -1312 -0.1
BRD4161A+rpc (read only) 897020 895724 -1296 -0.1
(read/write) 145764 144068 -1696 -1.2
.bss 143632 141936 -1696 -1.2
.data 2132 2132 0 0.0
.text 897012 895716 -1296 -0.1
window-app BRD4161A (read only) 844640 843472 -1168 -0.1
(read/write) 127168 125472 -1696 -1.3
.bss 125264 123568 -1696 -1.4
.data 1900 1900 0 0.0
.text 844632 843464 -1168 -0.1
esp32 all-clusters-app c3devkit (read only) 945430 944362 -1068 -0.1
(read/write) 1400306 1398626 -1680 -0.1
.dram0.bss 68128 66432 -1696 -2.5
.dram0.data 14268 14268 0 0.0
.flash.rodata 199016 199032 16 0.0
.flash.text 945430 944362 -1068 -0.1
.iram0.text 62056 62056 0 0.0
m5stack (read only) 995071 994335 -736 -0.1
(read/write) 465576 463904 -1672 -0.4
.dram0.bss 73272 71576 -1696 -2.3
.dram0.data 34064 34064 0 0.0
.flash.rodata 226112 226136 24 0.0
.flash.text 989687 988951 -736 -0.1
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 685636 682856 -2780 -0.4
.bss 78376 76680 -1696 -2.2
.data 1904 1904 0 0.0
.text 599556 598472 -1084 -0.2
lock k32w061+release (read/write) 691064 688284 -2780 -0.4
.bss 78768 77072 -1696 -2.2
.data 1948 1948 0 0.0
.text 604548 603464 -1084 -0.2
linux chip-tool-ipv6only arm64 (read only) 8135596 8192996 57400 0.7
(read/write) 341217 353217 12000 3.5
.bss 51681 50513 -1168 -2.3
.data 1216 1216 0 0.0
.data.rel.ro 235568 248680 13112 5.6
.dynamic 560 560 0 0.0
.got 48952 49008 56 0.1
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 433956 436028 2072 0.5
.text 6972292 6996132 23840 0.3
thermostat-no-ble arm64 (read only) 2150204 2148028 -2176 -0.1
(read/write) 142225 140657 -1568 -1.1
.bss 59105 57537 -1568 -2.7
.data 1032 1032 0 0.0
.data.rel.ro 74984 74984 0 0.0
.dynamic 560 560 0 0.0
.got 4144 4144 0 0.0
.init 24 24 0 0.0
.init_array 328 328 0 0.0
.rodata 132876 132796 -80 -0.1
.text 1799184 1797088 -2096 -0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2398264 2397320 -944 -0.0
.bss 190196 188500 -1696 -0.9
.data 5320 5320 0 0.0
.text 1360864 1359920 -944 -0.1
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2360152 2359216 -936 -0.0
.bss 182808 181112 -1696 -0.9
.data 5624 5624 0 0.0
.text 1322752 1321816 -936 -0.1
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2323680 2322744 -936 -0.0
.bss 182696 181000 -1696 -0.9
.data 5600 5600 0 0.0
.text 1286280 1285344 -936 -0.1
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139648 1139648 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103032 103032 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2309116 2308172 -944 -0.0
.bss 179948 178252 -1696 -0.9
.data 5424 5424 0 0.0
.text 1271688 1270744 -944 -0.1
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 1017907 1015171 -2736 -0.3
bss 123132 121436 -1696 -1.4
rodata 119984 120016 32 0.0
text 695896 694780 -1116 -0.2
nrf52840dk_nrf52840+rpc (read/write) 986735 983987 -2748 -0.3
bss 120320 118624 -1696 -1.4
rodata 111348 111384 36 0.0
text 675508 674392 -1116 -0.2
nrf52840dongle_nrf52840 (read/write) 1033731 1031035 -2696 -0.3
bss 124520 122824 -1696 -1.4
rodata 118844 118884 40 0.0
text 700484 699416 -1068 -0.2
nrf5340dk_nrf5340_cpuapp (read/write) 924646 921846 -2800 -0.3
bss 119696 118000 -1696 -1.4
rodata 113224 113256 32 0.0
text 610932 609800 -1132 -0.2
lock-app nrf52840dk_nrf52840 (read/write) 947731 944899 -2832 -0.3
bss 121504 119808 -1696 -1.4
rodata 108728 108760 32 0.0
text 638900 637828 -1072 -0.2
nrf5340dk_nrf5340_cpuapp (read/write) 855210 852458 -2752 -0.3
bss 118096 116400 -1696 -1.4
rodata 101900 101932 32 0.0
text 554708 553624 -1084 -0.2
pigweed-app nrf52840dk_nrf52840 (read/write) 527595 527595 0 0.0
bss 53632 53632 0 0.0
rodata 49976 49976 0 0.0
text 361016 361016 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 946575 943743 -2832 -0.3
bss 121224 119528 -1696 -1.4
rodata 107708 107740 32 0.0
text 638956 637884 -1072 -0.2
pump-controller-app nrf52840dk_nrf52840 (read/write) 942495 939663 -2832 -0.3
bss 121228 119532 -1696 -1.4
rodata 107380 107412 32 0.0
text 635196 634124 -1072 -0.2
shell nrf52840dk_nrf52840 (read/write) 806207 804495 -1712 -0.2
bss 112376 111184 -1192 -1.1
rodata 78948 79012 64 0.1
text 537304 536680 -624 -0.1
p6 all-clusters-app default (read/write) 2483960 2482352 -1608 -0.1
.bss 119816 117768 -2048 -1.7
.data 2672 2672 0 0.0
.text 1442224 1440616 -1608 -0.1
light-app default (read/write) 2390544 2389032 -1512 -0.1
.bss 109464 107416 -2048 -1.9
.data 2520 2520 0 0.0
.text 1348808 1347296 -1512 -0.1
lock-app default (read/write) 2354016 2352504 -1512 -0.1
.bss 109184 107136 -2048 -1.9
.data 2480 2480 0 0.0
.text 1312280 1310768 -1512 -0.1
qpg lighting-app qpg6105+debug (read only) 595528 594444 -1084 -0.2
(read/write) 146936 146936 0 0.0
.bss 90656 88960 -1696 -1.9
.data 1108 1108 0 0.0
.text 590208 589124 -1084 -0.2
lock-app qpg6105+debug (read only) 561280 560192 -1088 -0.2
(read/write) 146936 146936 0 0.0
.bss 90640 88944 -1696 -1.9
.data 1060 1060 0 0.0
.text 555960 554872 -1088 -0.2
persistent-storage-app qpg6105+debug (read only) 99520 99520 0 0.0
(read/write) 146940 146940 0 0.0
.bss 24004 24004 0 0.0
.data 176 176 0 0.0
.text 94200 94200 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 877134 874166 -2968 -0.3
bss 90456 88760 -1696 -1.9
noinit 37160 37160 0 0.0
text 615198 613958 -1240 -0.2

@andy31415 andy31415 merged commit e68bd6c into project-chip:master Feb 11, 2022
jamesluo11 pushed a commit to jamesluo11/connectedhomeip that referenced this pull request Apr 26, 2022
* Revert "Add ability to keep several IP addresses per PeerAddress (project-chip#14968)"

This reverts commit 14eb3f5.

* Add back unit tests for peer address to string formatting. More tests are good

* Maintain the cleanup of ToPeerAddress from the previous patch - that was good

* Restyle
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.

3 participants