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

Set DiscoveredNodeData have a single interfaceId. #15087

Merged

Conversation

andy31415
Copy link
Contributor

Previous implementation was assuming every IP address has its own
interface, however resolved nodes generally are only on one interface:

  • Platform MDNS will resolve nodes one by one (one IP only)
  • MinMDNS will process packets one by one, so all addresses belong
    to a single interface

This should have a slight RAM improvement and will make future logic
for processing MDNS entries for figuring out the 'best IP address to
use' simpler.

Problem

Extra RAM usage and complexity due to seemingly extra information in resolved node data.

Change overview

Have a single interfaceId instead of a list for resolvednodedata.

Testing

Compile and CI.

Previous implementation was assuming every IP address has its own
interface, however resolved nodes generally are only on one interface:
  - Platform MDNS will resolve nodes one by one (one IP only)
  - MinMDNS will process packets one by one, so all addresses belong
    to a single interface

This should have a slight RAM improvement and will make future logic
for processing MDNS entries for figuring out the 'best IP address to
use' simpler.
@github-actions
Copy link

github-actions bot commented Feb 11, 2022

PR #15087: Size comparison from 512ab16 to 5afcd79

Decreases (25 builds for cyw30739, efr32, k32w, linux, mbed, p6, qpg)
platform target config section 512ab16 5afcd79 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 595258 595218 -40 -0.0
.app_xip_area 496672 496632 -40 -0.0
lock cyw930739m2evb_01 (read/write) 553062 553030 -32 -0.0
.app_xip_area 456044 456012 -32 -0.0
ota-requestor cyw930739m2evb_01 (read/write) 571998 571966 -32 -0.0
.app_xip_area 465724 465692 -32 -0.0
efr32 lighting-app BRD4161A (read only) 909688 909656 -32 -0.0
.text 909680 909648 -32 -0.0
BRD4161A+rpc (read only) 897132 897100 -32 -0.0
.text 897124 897092 -32 -0.0
window-app BRD4161A (read only) 844752 844720 -32 -0.0
.text 844744 844712 -32 -0.0
k32w light k32w061+release (read/write) 685744 685712 -32 -0.0
.text 599664 599632 -32 -0.0
lock k32w061+release (read/write) 691172 691124 -48 -0.0
.text 604656 604608 -48 -0.0
linux all-clusters-app debug (read only) 2356761 2356713 -48 -0.0
.text 1988642 1988594 -48 -0.0
bridge-app debug+rpc (read only) 1725829 1725781 -48 -0.0
.text 1467589 1467541 -48 -0.0
chip-tool debug (read only) 8383997 8383917 -80 -0.0
.text 7408629 7408549 -80 -0.0
chip-tool-ipv6only arm64 (read only) 8195468 8195356 -112 -0.0
.text 6998484 6998372 -112 -0.0
door-lock-app debug (read only) 1930985 1930937 -48 -0.0
.text 1609378 1609330 -48 -0.0
lighting-app debug+rpc (read only) 2055273 2055225 -48 -0.0
.text 1733842 1733794 -48 -0.0
ota-provider-app debug (read only) 1864529 1864481 -48 -0.0
.text 1556370 1556322 -48 -0.0
ota-requestor-app debug (read only) 1859985 1859937 -48 -0.0
.text 1559890 1559842 -48 -0.0
shell debug (read only) 2330553 2330505 -48 -0.0
.text 1967202 1967154 -48 -0.0
thermostat-no-ble arm64 (read only) 2150316 2150252 -64 -0.0
.text 1799264 1799200 -64 -0.0
tv-app debug (read only) 2528953 2528873 -80 -0.0
(read/write) 140960 140800 -160 -0.1
.bss 58752 58592 -160 -0.3
.text 2157938 2157858 -80 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2323776 2323712 -64 -0.0
.text 1286376 1286312 -64 -0.0
p6 all-clusters-app default (read/write) 2484056 2484040 -16 -0.0
.text 1442320 1442304 -16 -0.0
light-app default (read/write) 2390640 2390624 -16 -0.0
.text 1348904 1348888 -16 -0.0
lock-app default (read/write) 2354096 2354080 -16 -0.0
.text 1312360 1312344 -16 -0.0
qpg lighting-app qpg6105+debug (read only) 595636 595596 -40 -0.0
.text 590316 590276 -40 -0.0
lock-app qpg6105+debug (read only) 561388 561348 -40 -0.0
.text 556068 556028 -40 -0.0
Full report (31 builds for cyw30739, efr32, k32w, linux, mbed, p6, qpg, telink)
platform target config section 512ab16 5afcd79 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 595258 595218 -40 -0.0
.app_xip_area 496672 496632 -40 -0.0
.bss 81284 81284 0 0.0
.data 644 644 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 553062 553030 -32 -0.0
.app_xip_area 456044 456012 -32 -0.0
.bss 79756 79756 0 0.0
.data 608 608 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 571998 571966 -32 -0.0
.app_xip_area 465724 465692 -32 -0.0
.bss 88684 88684 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) 909688 909656 -32 -0.0
(read/write) 129104 129104 0 0.0
.bss 127072 127072 0 0.0
.data 2032 2032 0 0.0
.text 909680 909648 -32 -0.0
BRD4161A+rpc (read only) 897132 897100 -32 -0.0
(read/write) 145764 145764 0 0.0
.bss 143632 143632 0 0.0
.data 2132 2132 0 0.0
.text 897124 897092 -32 -0.0
window-app BRD4161A (read only) 844752 844720 -32 -0.0
(read/write) 127168 127168 0 0.0
.bss 125264 125264 0 0.0
.data 1900 1900 0 0.0
.text 844744 844712 -32 -0.0
k32w light k32w061+release (read/write) 685744 685712 -32 -0.0
.bss 78376 78376 0 0.0
.data 1904 1904 0 0.0
.text 599664 599632 -32 -0.0
lock k32w061+release (read/write) 691172 691124 -48 -0.0
.bss 78768 78768 0 0.0
.data 1948 1948 0 0.0
.text 604656 604608 -48 -0.0
linux all-clusters-app debug (read only) 2356761 2356713 -48 -0.0
(read/write) 141600 141600 0 0.0
.bss 56128 56128 0 0.0
.data 1296 1296 0 0.0
.data.rel.ro 78488 78488 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 205893 205893 0 0.0
.text 1988642 1988594 -48 -0.0
bridge-app debug+rpc (read only) 1725829 1725781 -48 -0.0
(read/write) 85768 85768 0 0.0
.bss 40528 40528 0 0.0
.data 2034 2034 0 0.0
.data.rel.ro 38056 38056 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 141740 141740 0 0.0
.text 1467589 1467541 -48 -0.0
chip-tool debug (read only) 8383997 8383917 -80 -0.0
(read/write) 246912 246912 0 0.0
.bss 33416 33416 0 0.0
.data 1184 1184 0 0.0
.data.rel.ro 206264 206264 0 0.0
.dynamic 608 608 0 0.0
.got 4784 4784 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 460021 460021 0 0.0
.text 7408629 7408549 -80 -0.0
chip-tool-ipv6only arm64 (read only) 8195468 8195356 -112 -0.0
(read/write) 354385 354385 0 0.0
.bss 51681 51681 0 0.0
.data 1216 1216 0 0.0
.data.rel.ro 248680 248680 0 0.0
.dynamic 560 560 0 0.0
.got 49008 49008 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 436148 436148 0 0.0
.text 6998484 6998372 -112 -0.0
door-lock-app debug (read only) 1930985 1930937 -48 -0.0
(read/write) 112088 112088 0 0.0
.bss 43600 43600 0 0.0
.data 1010 1010 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 173138 173138 0 0.0
.text 1609378 1609330 -48 -0.0
lighting-app debug+rpc (read only) 2055273 2055225 -48 -0.0
(read/write) 117368 117368 0 0.0
.bss 44576 44576 0 0.0
.data 1464 1464 0 0.0
.data.rel.ro 65832 65832 0 0.0
.dynamic 608 608 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 720 720 0 0.0
.rodata 166641 166641 0 0.0
.text 1733842 1733794 -48 -0.0
ota-provider-app debug (read only) 1864529 1864481 -48 -0.0
(read/write) 107768 107768 0 0.0
.bss 43456 43456 0 0.0
.data 1224 1224 0 0.0
.data.rel.ro 57432 57432 0 0.0
.dynamic 608 608 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 157619 157619 0 0.0
.text 1556370 1556322 -48 -0.0
ota-requestor-app debug (read only) 1859985 1859937 -48 -0.0
(read/write) 108856 108856 0 0.0
.bss 43744 43744 0 0.0
.data 1160 1160 0 0.0
.data.rel.ro 58504 58504 0 0.0
.dynamic 592 592 0 0.0
.got 4176 4176 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 151300 151300 0 0.0
.text 1559890 1559842 -48 -0.0
shell debug (read only) 2330553 2330505 -48 -0.0
(read/write) 144496 144496 0 0.0
.bss 64928 64928 0 0.0
.data 832 832 0 0.0
.data.rel.ro 73040 73040 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 206930 206930 0 0.0
.text 1967202 1967154 -48 -0.0
thermostat-no-ble arm64 (read only) 2150316 2150252 -64 -0.0
(read/write) 142225 142225 0 0.0
.bss 59105 59105 0 0.0
.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 132908 132908 0 0.0
.text 1799264 1799200 -64 -0.0
tv-app debug (read only) 2528953 2528873 -80 -0.0
(read/write) 140960 140800 -160 -0.1
.bss 58752 58592 -160 -0.3
.data 3200 3200 0 0.0
.data.rel.ro 72984 72984 0 0.0
.dynamic 592 592 0 0.0
.got 4528 4528 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 198093 198093 0 0.0
.text 2157938 2157858 -80 -0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2398352 2398352 0 0.0
.bss 190196 190196 0 0.0
.data 5320 5320 0 0.0
.text 1360952 1360952 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2360184 2360184 0 0.0
.bss 182808 182808 0 0.0
.data 5624 5624 0 0.0
.text 1322784 1322784 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2323776 2323712 -64 -0.0
.bss 182696 182696 0 0.0
.data 5600 5600 0 0.0
.text 1286376 1286312 -64 -0.0
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) 2309204 2309204 0 0.0
.bss 179948 179948 0 0.0
.data 5424 5424 0 0.0
.text 1271776 1271776 0 0.0
p6 all-clusters-app default (read/write) 2484056 2484040 -16 -0.0
.bss 119816 119816 0 0.0
.data 2672 2672 0 0.0
.text 1442320 1442304 -16 -0.0
light-app default (read/write) 2390640 2390624 -16 -0.0
.bss 109464 109464 0 0.0
.data 2520 2520 0 0.0
.text 1348904 1348888 -16 -0.0
lock-app default (read/write) 2354096 2354080 -16 -0.0
.bss 109184 109184 0 0.0
.data 2480 2480 0 0.0
.text 1312360 1312344 -16 -0.0
qpg lighting-app qpg6105+debug (read only) 595636 595596 -40 -0.0
(read/write) 146936 146936 0 0.0
.bss 90656 90656 0 0.0
.data 1108 1108 0 0.0
.text 590316 590276 -40 -0.0
lock-app qpg6105+debug (read only) 561388 561348 -40 -0.0
(read/write) 146936 146936 0 0.0
.bss 90640 90640 0 0.0
.data 1060 1060 0 0.0
.text 556068 556028 -40 -0.0
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 877134 0 0.0
bss 90456 90456 0 0.0
noinit 37160 37160 0 0.0
text 615198 615198 0 0.0

@andy31415 andy31415 merged commit 3ee4f4d into project-chip:master Feb 14, 2022
jamesluo11 pushed a commit to jamesluo11/connectedhomeip that referenced this pull request Apr 26, 2022
Previous implementation was assuming every IP address has its own
interface, however resolved nodes generally are only on one interface:
  - Platform MDNS will resolve nodes one by one (one IP only)
  - MinMDNS will process packets one by one, so all addresses belong
    to a single interface

This should have a slight RAM improvement and will make future logic
for processing MDNS entries for figuring out the 'best IP address to
use' simpler.
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