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

Multiple IP address support in ResolvedNodeData structure and cache #11149

Merged

Conversation

cecille
Copy link
Contributor

@cecille cecille commented Oct 28, 2021

Problem

Two(ish) related issues (in two commits)

    1. ResolvedNodeData reports only the last address in the mdns packet and it would be lovely if we could get all of them since we'd ideally like to enable fallbacks
    1. The cache also needs to handle multiple addresses. Since the cache entry is basically the same as the ResolvedNodeData structure, it makes sense to just store that directly and stop copying back and forth, especially if there are multiple addresses. As a bonus, this gave an incentive to actually add the expiry time to the ResolvedNodeData, which probably should have been there in the first place anyway.

Change overview

  • Adds multiple addresses to ResolvedNodeData
  • Add expiry time to ResolvedNodeData
  • Use ResolvedNodeData structure directly in the cache

Not yet done - any time of multiple address support in device or session layers

  • Note this will change the address used for operational from the last address in the mdns packet to the first

Testing

Cache tests cover cache changes, operational addresses covered by cirque tests. Also tested manually.

Added expiry time to ResolvedNodeId, which the resolvers should
set as appropriate from the TTL.

Using ResolvedNodeData for the DNS-SD cache directly means we
don't need to copy everything over, which is becoming more
cumbersome as we add support for more addresses. Also change
test to use test time structure.
@todo
Copy link

todo bot commented Oct 28, 2021

Right now, just use addr0, but we should really push all the addresses and interfaces to

// TODO: Right now, just use addr0, but we should really push all the addresses and interfaces to
// the device and allow it to make a proper decision about which addresses are preferred and reachable.
if (nodeData.mAddress[0].IsIPv6LinkLocal())
{
interfaceId = nodeData.mInterfaceId;
}
err = device->UpdateAddress(Transport::PeerAddress::UDP(nodeData.mAddress[0], nodeData.mPort, interfaceId));
SuccessOrExit(err);
PersistDevice(device);


This comment was generated by todo based on a TODO comment in bd58613 in #11149. cc @cecille.

@todo
Copy link

todo bot commented Oct 28, 2021

For now, just provide addr 0, but this should really provide all and

// TODO: For now, just provide addr 0, but this should really provide all and
// allow the caller to choose.
mSuccessCallback( //
nodeData.mPeerId.GetCompressedFabricId(), //
nodeData.mPeerId.GetNodeId(), //
nodeData.mInterfaceId.GetPlatformInterface(), //
nodeData.mAddress[0].ToString(ipAddressBuffer, sizeof(ipAddressBuffer)), //
nodeData.mPort //
);
}
else


This comment was generated by todo based on a TODO comment in bd58613 in #11149. cc @cecille.

@todo
Copy link

todo bot commented Oct 28, 2021

Expand the results to include all the addresses.

// TODO: Expand the results to include all the addresses.
Platform::CopyString(nodeData.mHostName, result->mHostName);
nodeData.mInterfaceId = result->mInterface;
nodeData.mAddress[0] = result->mAddress.ValueOr({});
nodeData.mPort = result->mPort;
Time::TimeSource<Time::Source::kSystem> timeSource;
nodeData.mExpiryTime = timeSource.GetCurrentMonotonicTimeMs() + result->mTtl * 1000;
for (size_t i = 0; i < result->mTextEntrySize; ++i)
{


This comment was generated by todo based on a TODO comment in bd58613 in #11149. cc @cecille.

@todo
Copy link

todo bot commented Oct 28, 2021

use pool to allow dynamic

// TODO: use pool to allow dynamic
static constexpr int kMaxIPAddresses = 5;
void LogNodeIdResolved()
{
#if CHIP_PROGRESS_LOGGING
char addrBuffer[Inet::IPAddress::kMaxStringLength];
// Would be nice to log the interface id, but sorting out how to do so
// across our differnet InterfaceId implementations is a pain.
ChipLogProgress(Discovery, "Node ID resolved for 0x" ChipLogFormatX64, ChipLogValueX64(mPeerId.GetNodeId()));
for (int i = 0; i < mNumIPs; ++i)


This comment was generated by todo based on a TODO comment in bd58613 in #11149. cc @cecille.

Maintaining size for darwin, linux and android, other have the
cache size called out explicitly in the platform config so the
platform maintainers can set this as appropriate.
@github-actions
Copy link

github-actions bot commented Nov 2, 2021

PR #11149: Size comparison from eddd4f7 to 2ebc4fa

Increases above 0.2%:

platform target config section eddd4f7 2ebc4fa change % change
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 861027 863203 2176 0.3
text 577548 580232 2684 0.5
nrf52840dk_nrf52840+rpc (read/write) 821851 824059 2208 0.3
text 550720 553408 2688 0.5
lock-app nrf52840dk_nrf52840 (read/write) 837731 839891 2160 0.3
text 559028 561712 2684 0.5
pump-app nrf52840dk_nrf52840 (read/write) 843843 846003 2160 0.3
text 563208 565892 2684 0.5
pump-controller-app nrf52840dk_nrf52840 (read/write) 837587 839763 2176 0.3
text 558764 561448 2684 0.5
shell nrf52840dk_nrf52840 (read/write) 775911 778123 2212 0.3
text 519804 522524 2720 0.5
Increases (27 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, qpg)
platform target config section eddd4f7 2ebc4fa change % change
efr32 lighting-app BRD4161A (read only) 736844 737216 372 0.1
.text 736836 737208 372 0.1
BRD4161A+rpc (read only) 724268 724656 388 0.1
.text 724260 724648 388 0.1
lock-app BRD4161A (read only) 716124 716496 372 0.1
.text 716116 716488 372 0.1
window-app BRD4161A (read only) 717024 717396 372 0.1
.text 717016 717388 372 0.1
esp32 all-clusters-app m5stack .flash.rodata 208240 208256 16 0.0
k32w lighting-app k32w061+se05x+release .text 613548 613692 144 0.0
lock-app k32w061+debug .text 515376 515520 144 0.0
shell k32w061+debug .text 359136 359316 180 0.1
linux all-clusters-app debug (read only) 1690385 1690529 144 0.0
.text 1417378 1417522 144 0.0
chip-tool debug (read only) 4329237 4329477 240 0.0
.rodata 218928 218960 32 0.0
.text 3844677 3844885 208 0.0
lighting-app debug+rpc (read only) 1542617 1542777 160 0.0
.text 1280626 1280786 160 0.0
ota-provider-app debug (read only) 1243145 1243337 192 0.0
.rodata 112136 112168 32 0.0
.text 1034930 1035090 160 0.0
ota-requestor-app debug (read only) 1310441 1310617 176 0.0
.rodata 123104 123136 32 0.0
.text 1089618 1089762 144 0.0
shell debug (read only) 786529 786673 144 0.0
.text 607202 607346 144 0.0
tv-app debug (read only) 1790633 1790793 160 0.0
.text 1493410 1493570 160 0.0
mbed shell CY8CPROTO_062_4343W+release (read/write) 2048432 2048512 80 0.0
.heap 875232 875776 544 0.1
.text 1011032 1011112 80 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 861027 863203 2176 0.3
rodata 96548 96580 32 0.0
text 577548 580232 2684 0.5
nrf52840dk_nrf52840+rpc (read/write) 821851 824059 2208 0.3
rodata 87324 87356 32 0.0
text 550720 553408 2688 0.5
nrf5340dk_nrf5340_cpuapp rodata 91788 91820 32 0.0
text 507012 507132 120 0.0
lock-app nrf52840dk_nrf52840 (read/write) 837731 839891 2160 0.3
rodata 92900 92932 32 0.0
text 559028 561712 2684 0.5
nrf5340dk_nrf5340_cpuapp rodata 88208 88240 32 0.0
text 488584 488704 120 0.0
pump-app nrf52840dk_nrf52840 (read/write) 843843 846003 2160 0.3
rodata 94612 94644 32 0.0
text 563208 565892 2684 0.5
pump-controller-app nrf52840dk_nrf52840 (read/write) 837587 839763 2176 0.3
rodata 92900 92932 32 0.0
text 558764 561448 2684 0.5
shell nrf52840dk_nrf52840 (read/write) 775911 778123 2212 0.3
rodata 72412 72448 36 0.0
text 519804 522524 2720 0.5
nrf5340dk_nrf5340_cpuapp rodata 67052 67088 36 0.1
text 440404 440556 152 0.0
qpg lighting-app qpg6100+debug (read only) 490384 490528 144 0.0
.text 485064 485208 144 0.0
lock-app qpg6100+debug (read only) 466720 466864 144 0.0
.text 461400 461544 144 0.0
Decreases (27 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, qpg)
platform target config section eddd4f7 2ebc4fa change % change
efr32 lighting-app BRD4161A (read/write) 114612 114068 -544 -0.5
.bss 112852 112308 -544 -0.5
BRD4161A+rpc (read/write) 131216 130676 -540 -0.4
.bss 129356 128812 -544 -0.4
lock-app BRD4161A (read/write) 112428 111884 -544 -0.5
.bss 110708 110164 -544 -0.5
window-app BRD4161A (read/write) 112756 112208 -548 -0.5
.bss 111028 110484 -544 -0.5
esp32 all-clusters-app m5stack (read only) 911571 911567 -4 -0.0
(read/write) 427592 427064 -528 -0.1
.dram0.bss 61088 60544 -544 -0.9
.flash.text 911571 911567 -4 -0.0
k32w lighting-app k32w061+se05x+release (read/write) 699104 698704 -400 -0.1
.bss 77848 77304 -544 -0.7
lock-app k32w061+debug (read/write) 591412 591012 -400 -0.1
.bss 68364 67820 -544 -0.8
shell k32w061+debug (read/write) 424800 424436 -364 -0.1
.bss 63288 62744 -544 -0.9
linux all-clusters-app debug (read/write) 119664 119120 -544 -0.5
.bss 51120 50576 -544 -1.1
chip-tool debug (read/write) 124064 123520 -544 -0.4
.bss 18192 17648 -544 -3.0
lighting-app debug+rpc (read/write) 101680 101136 -544 -0.5
.bss 40696 40152 -544 -1.3
ota-provider-app debug (read/write) 67520 66976 -544 -0.8
.bss 37120 36576 -544 -1.5
ota-requestor-app debug (read/write) 76840 76296 -544 -0.7
.bss 45376 44832 -544 -1.2
shell debug (read/write) 57664 57120 -544 -0.9
.bss 16104 15560 -544 -3.4
tv-app debug (read/write) 289240 288696 -544 -0.2
.bss 222736 222192 -544 -0.2
mbed shell CY8CPROTO_062_4343W+release .bss 156248 155704 -544 -0.3
nrfconnect lighting-app nrf52840dk_nrf52840 bss 111312 110772 -540 -0.5
nrf52840dk_nrf52840+rpc bss 107552 107012 -540 -0.5
nrf5340dk_nrf5340_cpuapp (read/write) 786050 785666 -384 -0.0
bss 112688 112144 -544 -0.5
lock-app nrf52840dk_nrf52840 bss 110348 109804 -544 -0.5
nrf5340dk_nrf5340_cpuapp (read/write) 763030 762630 -400 -0.1
bss 111756 111212 -544 -0.5
pump-app nrf52840dk_nrf52840 bss 110484 109944 -540 -0.5
pump-controller-app nrf52840dk_nrf52840 bss 110384 109840 -544 -0.5
shell nrf52840dk_nrf52840 bss 109104 108560 -544 -0.5
nrf5340dk_nrf5340_cpuapp (read/write) 690962 690598 -364 -0.1
bss 110084 109540 -544 -0.5
qpg lighting-app qpg6100+debug .bss 50408 49864 -544 -1.1
lock-app qpg6100+debug .bss 49352 48808 -544 -1.1
Full report (37 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section eddd4f7 2ebc4fa change % change
efr32 lighting-app BRD4161A (read only) 736844 737216 372 0.1
(read/write) 114612 114068 -544 -0.5
.bss 112852 112308 -544 -0.5
.data 1760 1760 0 0.0
.text 736836 737208 372 0.1
BRD4161A+rpc (read only) 724268 724656 388 0.1
(read/write) 131216 130676 -540 -0.4
.bss 129356 128812 -544 -0.4
.data 1860 1860 0 0.0
.text 724260 724648 388 0.1
lock-app BRD4161A (read only) 716124 716496 372 0.1
(read/write) 112428 111884 -544 -0.5
.bss 110708 110164 -544 -0.5
.data 1720 1720 0 0.0
.text 716116 716488 372 0.1
window-app BRD4161A (read only) 717024 717396 372 0.1
(read/write) 112756 112208 -548 -0.5
.bss 111028 110484 -544 -0.5
.data 1724 1724 0 0.0
.text 717016 717388 372 0.1
esp32 all-clusters-app c3devkit (read only) 880466 880466 0 0.0
(read/write) 1307824 1307824 0 0.0
.dram0.bss 58592 58592 0 0.0
.dram0.data 16464 16464 0 0.0
.flash.rodata 199536 199536 0 0.0
.flash.text 880466 880466 0 0.0
.iram0.text 57554 57554 0 0.0
m5stack (read only) 911571 911567 -4 -0.0
(read/write) 427592 427064 -528 -0.1
.dram0.bss 61088 60544 -544 -0.9
.dram0.data 32100 32100 0 0.0
.flash.rodata 208240 208256 16 0.0
.flash.text 911571 911567 -4 -0.0
.iram0.text 125115 125115 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 699104 698704 -400 -0.1
.bss 77848 77304 -544 -0.7
.data 1908 1908 0 0.0
.text 613548 613692 144 0.0
lock-app k32w061+debug (read/write) 591412 591012 -400 -0.1
.bss 68364 67820 -544 -0.8
.data 1872 1872 0 0.0
.text 515376 515520 144 0.0
shell k32w061+debug (read/write) 424800 424436 -364 -0.1
.bss 63288 62744 -544 -0.9
.data 672 672 0 0.0
.text 359136 359316 180 0.1
linux all-clusters-app debug (read only) 1690385 1690529 144 0.0
(read/write) 119664 119120 -544 -0.5
.bss 51120 50576 -544 -1.1
.data 1042 1042 0 0.0
.data.rel.ro 62240 62240 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 536 536 0 0.0
.rodata 139637 139637 0 0.0
.text 1417378 1417522 144 0.0
bridge-app debug+rpc (read only) 1283293 1283293 0 0.0
(read/write) 68488 68488 0 0.0
.bss 35024 35024 0 0.0
.data 992 992 0 0.0
.data.rel.ro 27496 27496 0 0.0
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 111204 111204 0 0.0
.text 1076533 1076533 0 0.0
chip-tool debug (read only) 4329237 4329477 240 0.0
(read/write) 124064 123520 -544 -0.4
.bss 18192 17648 -544 -3.0
.data 1584 1584 0 0.0
.data.rel.ro 98856 98856 0 0.0
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 424 424 0 0.0
.rodata 218928 218960 32 0.0
.text 3844677 3844885 208 0.0
lighting-app debug+rpc (read only) 1542617 1542777 160 0.0
(read/write) 101680 101136 -544 -0.5
.bss 40696 40152 -544 -1.3
.data 1138 1138 0 0.0
.data.rel.ro 54560 54560 0 0.0
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 129297 129297 0 0.0
.text 1280626 1280786 160 0.0
ota-provider-app debug (read only) 1243145 1243337 192 0.0
(read/write) 67520 66976 -544 -0.8
.bss 37120 36576 -544 -1.5
.data 752 752 0 0.0
.data.rel.ro 24568 24568 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 112136 112168 32 0.0
.text 1034930 1035090 160 0.0
ota-requestor-app debug (read only) 1310441 1310617 176 0.0
(read/write) 76840 76296 -544 -0.7
.bss 45376 44832 -544 -1.2
.data 816 816 0 0.0
.data.rel.ro 25512 25512 0 0.0
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 123104 123136 32 0.0
.text 1089618 1089762 144 0.0
shell debug (read only) 786529 786673 144 0.0
(read/write) 57664 57120 -544 -0.9
.bss 16104 15560 -544 -3.4
.data 242 242 0 0.0
.data.rel.ro 36816 36816 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 77839 77839 0 0.0
.text 607202 607346 144 0.0
tv-app debug (read only) 1790633 1790793 160 0.0
(read/write) 289240 288696 -544 -0.2
.bss 222736 222192 -544 -0.2
.data 2064 2064 0 0.0
.data.rel.ro 58784 58784 0 0.0
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 155032 155032 0 0.0
.text 1493410 1493570 160 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2292704 2292704 0 0.0
.bss 179956 179956 0 0.0
.data 5224 5224 0 0.0
.heap 851264 851264 0 0.0
.text 1255304 1255304 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2271648 2271648 0 0.0
.bss 172004 172004 0 0.0
.data 5576 5576 0 0.0
.heap 858864 858864 0 0.0
.text 1234248 1234248 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2249368 2249368 0 0.0
.bss 170900 170900 0 0.0
.data 5560 5560 0 0.0
.heap 859984 859984 0 0.0
.text 1211968 1211968 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2048432 2048512 80 0.0
.bss 156248 155704 -544 -0.3
.data 4968 4968 0 0.0
.heap 875232 875776 544 0.1
.text 1011032 1011112 80 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 861027 863203 2176 0.3
bss 111312 110772 -540 -0.5
rodata 96548 96580 32 0.0
text 577548 580232 2684 0.5
nrf52840dk_nrf52840+rpc (read/write) 821851 824059 2208 0.3
bss 107552 107012 -540 -0.5
rodata 87324 87356 32 0.0
text 550720 553408 2688 0.5
nrf5340dk_nrf5340_cpuapp (read/write) 786050 785666 -384 -0.0
bss 112688 112144 -544 -0.5
rodata 91788 91820 32 0.0
text 507012 507132 120 0.0
lock-app nrf52840dk_nrf52840 (read/write) 837731 839891 2160 0.3
bss 110348 109804 -544 -0.5
rodata 92900 92932 32 0.0
text 559028 561712 2684 0.5
nrf5340dk_nrf5340_cpuapp (read/write) 763030 762630 -400 -0.1
bss 111756 111212 -544 -0.5
rodata 88208 88240 32 0.0
text 488584 488704 120 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497323 497323 0 0.0
bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 843843 846003 2160 0.3
bss 110484 109944 -540 -0.5
rodata 94612 94644 32 0.0
text 563208 565892 2684 0.5
pump-controller-app nrf52840dk_nrf52840 (read/write) 837587 839763 2176 0.3
bss 110384 109840 -544 -0.5
rodata 92900 92932 32 0.0
text 558764 561448 2684 0.5
shell nrf52840dk_nrf52840 (read/write) 775911 778123 2212 0.3
bss 109104 108560 -544 -0.5
rodata 72412 72448 36 0.0
text 519804 522524 2720 0.5
nrf5340dk_nrf5340_cpuapp (read/write) 690962 690598 -364 -0.1
bss 110084 109540 -544 -0.5
rodata 67052 67088 36 0.1
text 440404 440556 152 0.0
p6 lock-app default (read/write) 2167680 2167680 0 0.0
.bss 66352 66352 0 0.0
.data 2424 2424 0 0.0
.heap 964568 964568 0 0.0
.text 1125944 1125944 0 0.0
qpg lighting-app qpg6100+debug (read only) 490384 490528 144 0.0
(read/write) 114144 114144 0 0.0
.bss 50408 49864 -544 -1.1
.data 1008 1008 0 0.0
.text 485064 485208 144 0.0
lock-app qpg6100+debug (read only) 466720 466864 144 0.0
(read/write) 114140 114140 0 0.0
.bss 49352 48808 -544 -1.1
.data 964 964 0 0.0
.text 461400 461544 144 0.0
persistent-storage-app qpg6100+debug (read only) 155796 155796 0 0.0
(read/write) 114140 114140 0 0.0
.bss 27760 27760 0 0.0
.data 372 372 0 0.0
.text 150476 150476 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 662422 662422 0 0.0
bss 69116 69116 0 0.0
noinit 33216 33216 0 0.0
text 457800 457800 0 0.0

@woody-apple
Copy link
Contributor

@cecille Can you resolve the conflicts? Should be able to get this in then!

…tiple_addresses

Includes changes to previous code to deal with clock changes.
@todo
Copy link

todo bot commented Nov 9, 2021

Use seconds?

// TODO: Use seconds?
const System::Clock::Timestamp currentTime = System::SystemClock().GetMonotonicTimestamp();
nodeData.mExpiryTime = currentTime + System::Clock::Seconds16(result->mTtlSeconds);
for (size_t i = 0; i < result->mTextEntrySize; ++i)
{


This comment was generated by todo based on a TODO comment in e195b11 in #11149. cc @cecille.

@github-actions
Copy link

github-actions bot commented Nov 9, 2021

PR #11149: Size comparison from 613f27f to e195b11

Increases above 0.2%:

platform target config section 613f27f e195b11 change % change
linux chip-tool debug (read only) 4982309 4995221 12912 0.3
.init_array 424 432 8 1.9
.rodata 239760 242064 2304 1.0
Increases (27 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, qpg)
platform target config section 613f27f e195b11 change % change
efr32 lighting-app BRD4161A (read only) 742904 743204 300 0.0
.text 742896 743196 300 0.0
BRD4161A+rpc (read only) 730440 730740 300 0.0
.text 730432 730732 300 0.0
lock-app BRD4161A (read only) 722192 722492 300 0.0
.text 722184 722484 300 0.0
window-app BRD4161A (read only) 723088 723388 300 0.0
.text 723080 723380 300 0.0
esp32 all-clusters-app m5stack (read only) 911847 911943 96 0.0
.flash.rodata 204624 204640 16 0.0
.flash.text 911847 911943 96 0.0
k32w lighting-app k32w061+se05x+release .text 613940 614012 72 0.0
lock-app k32w061+debug .text 516156 516228 72 0.0
shell k32w061+debug .text 571044 571168 124 0.0
linux all-clusters-app debug (read only) 1710601 1710777 176 0.0
.rodata 139765 139797 32 0.0
.text 1437346 1437490 144 0.0
chip-tool debug (read only) 4982309 4995221 12912 0.3
.data.rel.ro 101184 101232 48 0.0
.init_array 424 432 8 1.9
.rodata 239760 242064 2304 1.0
.text 4471397 4481909 10512 0.2
lighting-app debug+rpc (read only) 1557945 1558073 128 0.0
.text 1295410 1295538 128 0.0
ota-provider-app debug (read only) 1259721 1259881 160 0.0
.rodata 113216 113248 32 0.0
.text 1050258 1050386 128 0.0
ota-requestor-app debug (read only) 1344281 1344441 160 0.0
.rodata 124232 124264 32 0.0
.text 1121250 1121378 128 0.0
shell debug (read only) 789065 789225 160 0.0
.rodata 78191 78223 32 0.0
.text 609362 609490 128 0.0
tv-app debug (read only) 1842217 1842425 208 0.0
.text 1541842 1542050 208 0.0
mbed shell CY8CPROTO_062_4343W+release (read/write) 2048864 2049008 144 0.0
.heap 875016 875568 552 0.1
.text 1011464 1011608 144 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 rodata 96924 96936 12 0.0
text 578128 578204 76 0.0
nrf52840dk_nrf52840+rpc rodata 88104 88112 8 0.0
text 552276 552352 76 0.0
nrf5340dk_nrf5340_cpuapp rodata 92180 92192 12 0.0
text 507600 507676 76 0.0
lock-app nrf52840dk_nrf52840 rodata 93296 93304 8 0.0
text 559612 559684 72 0.0
nrf5340dk_nrf5340_cpuapp rodata 88600 88612 12 0.0
text 489176 489248 72 0.0
pump-app nrf52840dk_nrf52840 rodata 95004 95016 12 0.0
text 563772 563848 76 0.0
pump-controller-app nrf52840dk_nrf52840 rodata 93292 93304 12 0.0
text 559348 559420 72 0.0
shell nrf52840dk_nrf52840 rodata 72564 72572 8 0.0
text 520004 520112 108 0.0
nrf5340dk_nrf5340_cpuapp rodata 67204 67216 12 0.0
text 440612 440720 108 0.0
qpg lighting-app qpg6100+debug (read only) 490776 490852 76 0.0
.text 485456 485532 76 0.0
lock-app qpg6100+debug (read only) 466988 467072 84 0.0
.text 461668 461752 84 0.0
Decreases (27 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, qpg)
platform target config section 613f27f e195b11 change % change
efr32 lighting-app BRD4161A (read/write) 116268 115716 -552 -0.5
.bss 114484 113932 -552 -0.5
BRD4161A+rpc (read/write) 132892 132336 -556 -0.4
.bss 130988 130436 -552 -0.4
lock-app BRD4161A (read/write) 114084 113532 -552 -0.5
.bss 112340 111788 -552 -0.5
window-app BRD4161A (read/write) 114412 113856 -556 -0.5
.bss 112660 112108 -552 -0.5
esp32 all-clusters-app m5stack (read/write) 423864 423328 -536 -0.1
.dram0.bss 60968 60416 -552 -0.9
k32w lighting-app k32w061+se05x+release (read/write) 699648 699168 -480 -0.1
.bss 77996 77444 -552 -0.7
lock-app k32w061+debug (read/write) 592360 591880 -480 -0.1
.bss 68524 67972 -552 -0.8
shell k32w061+debug (read/write) 658016 657588 -428 -0.1
.bss 79324 78772 -552 -0.7
linux all-clusters-app debug (read/write) 126528 125952 -576 -0.5
.bss 57872 57296 -576 -1.0
chip-tool debug (read/write) 134688 134216 -472 -0.4
.bss 25840 25296 -544 -2.1
lighting-app debug+rpc (read/write) 110088 109512 -576 -0.5
.bss 48432 47856 -576 -1.2
ota-provider-app debug (read/write) 75336 74760 -576 -0.8
.bss 44864 44288 -576 -1.3
ota-requestor-app debug (read/write) 79104 78528 -576 -0.7
.bss 47328 46752 -576 -1.2
shell debug (read/write) 65480 64936 -544 -0.8
.bss 23912 23368 -544 -2.3
tv-app debug (read/write) 407936 407360 -576 -0.1
.bss 340112 339536 -576 -0.2
mbed shell CY8CPROTO_062_4343W+release .bss 156456 155904 -552 -0.4
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862155 861671 -484 -0.1
bss 111460 110908 -552 -0.5
nrf52840dk_nrf52840+rpc (read/write) 824503 823999 -504 -0.1
bss 107812 107260 -552 -0.5
nrf5340dk_nrf5340_cpuapp (read/write) 787162 786710 -452 -0.1
bss 112832 112280 -552 -0.5
lock-app nrf52840dk_nrf52840 (read/write) 838831 838375 -456 -0.1
bss 110492 109940 -552 -0.5
nrf5340dk_nrf5340_cpuapp (read/write) 764142 763690 -452 -0.1
bss 111904 111352 -552 -0.5
pump-app nrf52840dk_nrf52840 (read/write) 844955 844471 -484 -0.1
bss 110632 110080 -552 -0.5
pump-controller-app nrf52840dk_nrf52840 (read/write) 838699 838231 -468 -0.1
bss 110528 109976 -552 -0.5
shell nrf52840dk_nrf52840 (read/write) 776431 776007 -424 -0.1
bss 109280 108728 -552 -0.5
nrf5340dk_nrf5340_cpuapp (read/write) 691482 691062 -420 -0.1
bss 110264 109712 -552 -0.5
qpg lighting-app qpg6100+debug .bss 51152 50600 -552 -1.1
lock-app qpg6100+debug .bss 50096 49544 -552 -1.1
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 613f27f e195b11 change % change
efr32 lighting-app BRD4161A (read only) 742904 743204 300 0.0
(read/write) 116268 115716 -552 -0.5
.bss 114484 113932 -552 -0.5
.data 1784 1784 0 0.0
.text 742896 743196 300 0.0
BRD4161A+rpc (read only) 730440 730740 300 0.0
(read/write) 132892 132336 -556 -0.4
.bss 130988 130436 -552 -0.4
.data 1900 1900 0 0.0
.text 730432 730732 300 0.0
lock-app BRD4161A (read only) 722192 722492 300 0.0
(read/write) 114084 113532 -552 -0.5
.bss 112340 111788 -552 -0.5
.data 1744 1744 0 0.0
.text 722184 722484 300 0.0
window-app BRD4161A (read only) 723088 723388 300 0.0
(read/write) 114412 113856 -556 -0.5
.bss 112660 112108 -552 -0.5
.data 1748 1748 0 0.0
.text 723080 723380 300 0.0
esp32 all-clusters-app c3devkit (read only) 880694 880694 0 0.0
(read/write) 1306536 1306536 0 0.0
.dram0.bss 58464 58464 0 0.0
.dram0.data 16472 16472 0 0.0
.flash.rodata 198360 198360 0 0.0
.flash.text 880694 880694 0 0.0
.iram0.text 57526 57526 0 0.0
m5stack (read only) 911847 911943 96 0.0
(read/write) 423864 423328 -536 -0.1
.dram0.bss 60968 60416 -552 -0.9
.dram0.data 32108 32108 0 0.0
.flash.rodata 204624 204640 16 0.0
.flash.text 911847 911943 96 0.0
.iram0.text 125115 125115 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 699648 699168 -480 -0.1
.bss 77996 77444 -552 -0.7
.data 1912 1912 0 0.0
.text 613940 614012 72 0.0
lock-app k32w061+debug (read/write) 592360 591880 -480 -0.1
.bss 68524 67972 -552 -0.8
.data 1880 1880 0 0.0
.text 516156 516228 72 0.0
shell k32w061+debug (read/write) 658016 657588 -428 -0.1
.bss 79324 78772 -552 -0.7
.data 1848 1848 0 0.0
.text 571044 571168 124 0.0
linux all-clusters-app debug (read only) 1710601 1710777 176 0.0
(read/write) 126528 125952 -576 -0.5
.bss 57872 57296 -576 -1.0
.data 1042 1042 0 0.0
.data.rel.ro 62352 62352 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 139765 139797 32 0.0
.text 1437346 1437490 144 0.0
bridge-app debug+rpc (read only) 1298253 1298253 0 0.0
(read/write) 77072 77072 0 0.0
.bss 42768 42768 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 27760 27760 0 0.0
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 408 408 0 0.0
.rodata 111540 111540 0 0.0
.text 1090821 1090821 0 0.0
chip-tool debug (read only) 4982309 4995221 12912 0.3
(read/write) 134688 134216 -472 -0.4
.bss 25840 25296 -544 -2.1
.data 2256 2256 0 0.0
.data.rel.ro 101184 101232 48 0.0
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 424 432 8 1.9
.rodata 239760 242064 2304 1.0
.text 4471397 4481909 10512 0.2
lighting-app debug+rpc (read only) 1557945 1558073 128 0.0
(read/write) 110088 109512 -576 -0.5
.bss 48432 47856 -576 -1.2
.data 1202 1202 0 0.0
.data.rel.ro 55168 55168 0 0.0
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 128977 128977 0 0.0
.text 1295410 1295538 128 0.0
ota-provider-app debug (read only) 1259721 1259881 160 0.0
(read/write) 75336 74760 -576 -0.8
.bss 44864 44288 -576 -1.3
.data 752 752 0 0.0
.data.rel.ro 24616 24616 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 448 448 0 0.0
.rodata 113216 113248 32 0.0
.text 1050258 1050386 128 0.0
ota-requestor-app debug (read only) 1344281 1344441 160 0.0
(read/write) 79104 78528 -576 -0.7
.bss 47328 46752 -576 -1.2
.data 816 816 0 0.0
.data.rel.ro 25880 25880 0 0.0
.dynamic 592 592 0 0.0
.got 3992 3992 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 124232 124264 32 0.0
.text 1121250 1121378 128 0.0
shell debug (read only) 789065 789225 160 0.0
(read/write) 65480 64936 -544 -0.8
.bss 23912 23368 -544 -2.3
.data 242 242 0 0.0
.data.rel.ro 36816 36816 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 344 344 0 0.0
.rodata 78191 78223 32 0.0
.text 609362 609490 128 0.0
tv-app debug (read only) 1842217 1842425 208 0.0
(read/write) 407936 407360 -576 -0.1
.bss 340112 339536 -576 -0.2
.data 2736 2736 0 0.0
.data.rel.ro 59448 59448 0 0.0
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 156456 156456 0 0.0
.text 1541842 1542050 208 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2290856 2290856 0 0.0
.bss 179436 179436 0 0.0
.data 5232 5232 0 0.0
.heap 851776 851776 0 0.0
.text 1253456 1253456 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2270952 2270952 0 0.0
.bss 172492 172492 0 0.0
.data 5584 5584 0 0.0
.heap 858368 858368 0 0.0
.text 1233552 1233552 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2248672 2248672 0 0.0
.bss 171388 171388 0 0.0
.data 5568 5568 0 0.0
.heap 859488 859488 0 0.0
.text 1211272 1211272 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2048864 2049008 144 0.0
.bss 156456 155904 -552 -0.4
.data 4976 4976 0 0.0
.heap 875016 875568 552 0.1
.text 1011464 1011608 144 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862155 861671 -484 -0.1
bss 111460 110908 -552 -0.5
rodata 96924 96936 12 0.0
text 578128 578204 76 0.0
nrf52840dk_nrf52840+rpc (read/write) 824503 823999 -504 -0.1
bss 107812 107260 -552 -0.5
rodata 88104 88112 8 0.0
text 552276 552352 76 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 787162 786710 -452 -0.1
bss 112832 112280 -552 -0.5
rodata 92180 92192 12 0.0
text 507600 507676 76 0.0
lock-app nrf52840dk_nrf52840 (read/write) 838831 838375 -456 -0.1
bss 110492 109940 -552 -0.5
rodata 93296 93304 8 0.0
text 559612 559684 72 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 764142 763690 -452 -0.1
bss 111904 111352 -552 -0.5
rodata 88600 88612 12 0.0
text 489176 489248 72 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497327 497327 0 0.0
bss 51824 51824 0 0.0
rodata 45780 45780 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844955 844471 -484 -0.1
bss 110632 110080 -552 -0.5
rodata 95004 95016 12 0.0
text 563772 563848 76 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 838699 838231 -468 -0.1
bss 110528 109976 -552 -0.5
rodata 93292 93304 12 0.0
text 559348 559420 72 0.0
shell nrf52840dk_nrf52840 (read/write) 776431 776007 -424 -0.1
bss 109280 108728 -552 -0.5
rodata 72564 72572 8 0.0
text 520004 520112 108 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 691482 691062 -420 -0.1
bss 110264 109712 -552 -0.5
rodata 67204 67216 12 0.0
text 440612 440720 108 0.0
p6 all-clusters-app default (read/write) 2299528 2299528 0 0.0
.bss 112448 112448 0 0.0
.data 2536 2536 0 0.0
.heap 918360 918360 0 0.0
.text 1257792 1257792 0 0.0
lock-app default (read/write) 2212184 2212184 0 0.0
.bss 101256 101256 0 0.0
.data 2408 2408 0 0.0
.heap 929680 929680 0 0.0
.text 1170448 1170448 0 0.0
qpg lighting-app qpg6100+debug (read only) 490776 490852 76 0.0
(read/write) 114140 114140 0 0.0
.bss 51152 50600 -552 -1.1
.data 1012 1012 0 0.0
.text 485456 485532 76 0.0
lock-app qpg6100+debug (read only) 466988 467072 84 0.0
(read/write) 114144 114144 0 0.0
.bss 50096 49544 -552 -1.1
.data 968 968 0 0.0
.text 461668 461752 84 0.0
persistent-storage-app qpg6100+debug (read only) 153400 153400 0 0.0
(read/write) 114140 114140 0 0.0
.bss 19616 19616 0 0.0
.data 364 364 0 0.0
.text 148080 148080 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 663750 663750 0 0.0
bss 69272 69272 0 0.0
noinit 33216 33216 0 0.0
text 458596 458596 0 0.0

@cecille
Copy link
Contributor Author

cecille commented Nov 10, 2021

This is rebased now. If we're happy to continue the discussion on the linked issue, I think we can resolve the conversation from earlier and put this in.

@woody-apple woody-apple merged commit 9164605 into project-chip:master Nov 11, 2021
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
…roject-chip#11149)

* Add multiple addresses to ResolvedNodeData

* Use ResolvedNodeData directly for cache.

Added expiry time to ResolvedNodeId, which the resolvers should
set as appropriate from the TTL.

Using ResolvedNodeData for the DNS-SD cache directly means we
don't need to copy everything over, which is becoming more
cumbersome as we add support for more addresses. Also change
test to use test time structure.

* Update src/lib/dnssd/DnssdCache.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Address review comments.

* Reduce mdns cache size for platforms.

Maintaining size for darwin, linux and android, other have the
cache size called out explicitly in the platform config so the
platform maintainers can set this as appropriate.

* Restyled by whitespace

Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
@cecille cecille deleted the resolved_node_multiple_addresses branch April 1, 2022 00:02
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.

9 participants