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

[mdns] Spawn kDnssdInitialized event after initializing mDNS server #25050

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

Damian-Nordic
Copy link
Contributor

@Damian-Nordic Damian-Nordic commented Feb 14, 2023

It turns out that when no network interfaces are up MinMdnsResolver::IsInitialized() returns false even after calling MinMdnsResolver::Init(). Moreover, the application has no means to be notified when the resolver gets ready to process DNS-SD queries.

Rename kDnssdPlatformInitialized event to kDnssdInitialized and spawn it in the minimal mDNS implementation when the server becomes initialized, similarly to what the platform DNS-SD implementation does.

This is needed to have a consistent way to notify the application that it can begin communication with other nodes e.g. to resume persistent subscriptions.

Related to #25013

It turns out that when no network interfaces are up
MinMdnsResolver::IsInitialized() returns false even after
calling MinMdnsResolver::Init(). Moreover, the application
has no means to be notified when the resolver gets ready to
process DNS-SD queries.

Rename kDnssdPlatformInitialized event to kDnssdInitialized
and spawn it in the minimal mDNS implementation when the
server becomes initialized, similarly to what the platform
DNS-SD implementation does.

This is needed to have a consistent way to notify the
application that it can begin communication with other nodes
e.g. to resume persistent subscriptions.

Signed-off-by: Damian Krolik <[email protected]>
@github-actions
Copy link

github-actions bot commented Feb 14, 2023

PR #25050: Size comparison from 6ce0f90 to d57bb13

Increases above 0.2%:

platform target config section 6ce0f90 d57bb13 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20180781 20251030 70249 0.3
psoc6 all-clusters cy8ckit_062s2_43012 .debug_info 27892969 27964463 71494 0.3
all-clusters-minimal cy8ckit_062s2_43012 .debug_info 27440448 27511942 71494 0.3
light cy8ckit_062s2_43012 .debug_info 22780548 22852041 71493 0.3
lock cy8ckit_062s2_43012 .debug_info 23010472 23081968 71496 0.3
Increases (33 builds for bl602, bl702, cc13x2_26x2, cc32xx, cyw30739, efr32, linux, mbed, psoc6, qpg, telink)
platform target config section 6ce0f90 d57bb13 change % change
bl602 lighting-app bl602 (read/write) 1346734 1346870 136 0.0
.text 1023378 1023486 108 0.0
bl602+rpc (read/write) 1392158 1392302 144 0.0
.text 1054310 1054420 110 0.0
bl702 lighting-app bl702 (read/write) 1185179 1185227 48 0.0
.debug_info 40558717 40558750 33 0.0
.debug_line 5273540 5273652 112 0.0
.debug_loc 3409115 3409130 15 0.0
.debug_ranges 371688 371696 8 0.0
.rodata 107200 107232 32 0.0
.text 952870 952886 16 0.0
bl702+rpc (read/write) 1278335 1278383 48 0.0
.debug_info 44966857 44966890 33 0.0
.debug_line 5672591 5672703 112 0.0
.debug_loc 3606033 3606048 15 0.0
.debug_ranges 395456 395464 8 0.0
.rodata 121840 121872 32 0.0
.text 1030266 1030282 16 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 678315 678363 48 0.0
.rodata 88371 88403 32 0.0
.text 589628 589644 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 642139 642187 48 0.0
.rodata 78163 78195 32 0.0
.text 563656 563672 16 0.0
lock-ftd LP_CC2652R7 (read only) 675207 675255 48 0.0
.rodata 76671 76703 32 0.0
.text 598056 598072 16 0.0
lock-mtd LP_CC2652R7 (read only) 661631 661675 44 0.0
.rodata 103263 103291 28 0.0
.text 557888 557904 16 0.0
pump-app LP_CC2652R7 (read only) 688275 688315 40 0.0
.rodata 90795 90827 32 0.0
.text 597000 597008 8 0.0
pump-controller-app LP_CC2652R7 (read only) 673635 673691 56 0.0
.rodata 86835 86867 32 0.0
.text 586320 586344 24 0.0
shell LP_CC2652R7 (read only) 669594 669634 40 0.0
.rodata 85122 85154 32 0.0
.text 584160 584168 8 0.0
cc32xx lock CC3235SF_LAUNCHXL (read only) 640361 640513 152 0.0
(read/write) 204084 204092 8 0.0
.bss 197488 197496 8 0.0
.debug_abbrev 928461 929366 905 0.1
.debug_aranges 87352 87360 8 0.0
.debug_frame 299840 299864 24 0.0
.debug_info 20180781 20251030 70249 0.3
.debug_line 2649926 2652268 2342 0.1
.debug_loc 2786017 2786183 166 0.0
.debug_ranges 280728 280856 128 0.0
.debug_str 3005287 3005347 60 0.0
.rodata 105633 105665 32 0.0
.strtab 375902 375952 50 0.0
.symtab 255856 255888 32 0.0
.text 532604 532728 124 0.0
cyw30739 ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 550126 550170 44 0.0
.app_xip_area 432424 432468 44 0.0
efr32 lighting-app BRD4161A+rs9116 (read/write) 1038488 1038656 168 0.0
.bss 181568 181576 8 0.0
.text 854856 855016 160 0.0
BRD4187C (read/write) 1135552 1135592 40 0.0
.text 975168 975208 40 0.0
lock-app BRD4161A+wf200 (read/write) 1066192 1066256 64 0.0
.bss 153088 153096 8 0.0
.text 911028 911084 56 0.0
window-app BRD4187C (read/write) 1137168 1137208 40 0.0
.text 975152 975192 40 0.0
linux chip-tool-ipv6only arm64 (read only) 11995524 11995588 64 0.0
.text 9685428 9685492 64 0.0
thermostat-no-ble arm64 (read only) 2511700 2511860 160 0.0
(read/write) 145240 145256 16 0.0
.bss 56456 56472 16 0.0
.rodata 151088 151120 32 0.0
.text 2098496 2098624 128 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2464688 2464848 160 0.0
.bss 215892 215900 8 0.0
.text 1427332 1427492 160 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read/write) 1757628 1757780 152 0.0
.bss 189800 189808 8 0.0
.debug_abbrev 1252012 1252899 887 0.1
.debug_aranges 111408 111416 8 0.0
.debug_frame 373996 374020 24 0.0
.debug_info 27892969 27964463 71494 0.3
.debug_line 3784202 3786965 2763 0.1
.debug_loc 3680939 3681106 167 0.0
.debug_ranges 362448 362576 128 0.0
.debug_str 3513391 3513451 60 0.0
.strtab 578384 578434 50 0.0
.symtab 425056 425088 32 0.0
.text 1556768 1556912 144 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read/write) 1699236 1699388 152 0.0
.bss 188992 189000 8 0.0
.debug_abbrev 1237683 1238570 887 0.1
.debug_aranges 110672 110680 8 0.0
.debug_frame 376440 376464 24 0.0
.debug_info 27440448 27511942 71494 0.3
.debug_line 3792546 3795405 2859 0.1
.debug_loc 3664669 3664836 167 0.0
.debug_ranges 360416 360544 128 0.0
.debug_str 3499144 3499204 60 0.0
.strtab 539592 539642 50 0.0
.symtab 410336 410368 32 0.0
.text 1499192 1499336 144 0.0
light cy8ckit_062s2_43012 (read/write) 1612308 1612460 152 0.0
.bss 180880 180888 8 0.0
.debug_abbrev 1072017 1072904 887 0.1
.debug_aranges 102880 102888 8 0.0
.debug_frame 346876 346900 24 0.0
.debug_info 22780548 22852041 71493 0.3
.debug_line 3344860 3347575 2715 0.1
.debug_loc 3342680 3342847 167 0.0
.debug_ranges 319592 319720 128 0.0
.debug_str 3302154 3302214 60 0.0
.strtab 474760 474810 50 0.0
.symtab 378080 378112 32 0.0
.text 1420576 1420720 144 0.0
lock cy8ckit_062s2_43012 (read/write) 1646548 1646684 136 0.0
.bss 185848 185856 8 0.0
.debug_abbrev 1073721 1074608 887 0.1
.debug_aranges 103320 103328 8 0.0
.debug_frame 348816 348840 24 0.0
.debug_info 23010472 23081968 71496 0.3
.debug_line 3346757 3349424 2667 0.1
.debug_loc 3365559 3365726 167 0.0
.debug_ranges 321504 321632 128 0.0
.debug_str 3319424 3319484 60 0.0
.strtab 478173 478223 50 0.0
.symtab 380272 380304 32 0.0
.text 1449840 1449968 128 0.0
qpg lighting-app qpg6105+debug (read/write) 1149152 1149188 36 0.0
.text 596252 596288 36 0.0
lock-app qpg6105+debug (read/write) 1116896 1116940 44 0.0
.text 563992 564036 44 0.0
telink all-clusters-app tlsr9518adk80d (read/write) 1013612 1013660 48 0.0
text 684612 684632 20 0.0
all-clusters-minimal-app tlsr9518adk80d (read/write) 950020 950068 48 0.0
text 646912 646930 18 0.0
contact-sensor-app tlsr9518adk80d (read/write) 854876 854924 48 0.0
text 577804 577820 16 0.0
light-switch-app tlsr9518adk80d (read/write) 870628 870676 48 0.0
text 591848 591864 16 0.0
lighting-app tlsr9518adk80d (read/write) 947964 948012 48 0.0
text 657250 657266 16 0.0
ota-requestor-app tlsr9518adk80d (read/write) 881964 882012 48 0.0
text 601594 601610 16 0.0
thermostat tlsr9518adk80d (read/write) 874824 874872 48 0.0
text 593428 593444 16 0.0
Decreases (12 builds for bl702, cc13x2_26x2, psoc6)
platform target config section 6ce0f90 d57bb13 change % change
bl702 lighting-app bl702 .debug_str 3563128 3563120 -8 -0.0
bl702+rpc .debug_str 3966620 3966612 -8 -0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 172868 172820 -48 -0.0
lock-ftd LP_CC2652R7 (read/write) 173328 173280 -48 -0.0
lock-mtd LP_CC2652R7 (read/write) 182160 182116 -44 -0.0
pump-app LP_CC2652R7 (read/write) 160996 160956 -40 -0.0
pump-controller-app LP_CC2652R7 (read/write) 175748 175692 -56 -0.0
shell LP_CC2652R7 (read/write) 183660 183620 -40 -0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 840872 840864 -8 -0.0
.heap 840872 840864 -8 -0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 841688 841680 -8 -0.0
.heap 841688 841680 -8 -0.0
light cy8ckit_062s2_43012 (read only) 850000 849992 -8 -0.0
.heap 850000 849992 -8 -0.0
lock cy8ckit_062s2_43012 (read only) 845024 845016 -8 -0.0
.heap 845024 845016 -8 -0.0
Full report (35 builds for bl602, bl702, cc13x2_26x2, cc32xx, cyw30739, efr32, linux, mbed, psoc6, qpg, telink)
platform target config section 6ce0f90 d57bb13 change % change
bl602 lighting-app bl602 (read/write) 1346734 1346870 136 0.0
.bss 94802 94802 0 0.0
.data 9736 9736 0 0.0
.text 1023378 1023486 108 0.0
bl602+rpc (read/write) 1392158 1392302 144 0.0
.bss 102850 102850 0 0.0
.data 10128 10128 0 0.0
.text 1054310 1054420 110 0.0
bl702 lighting-app bl702 (read only) 3358 3358 0 0.0
(read/write) 1185179 1185227 48 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 69905 69905 0 0.0
.bss_psram 30064 30064 0 0.0
.comment 48 48 0 0.0
.data 4056 4056 0 0.0
.debug_abbrev 1550508 1550508 0 0.0
.debug_aranges 134264 134264 0 0.0
.debug_frame 491736 491736 0 0.0
.debug_info 40558717 40558750 33 0.0
.debug_line 5273540 5273652 112 0.0
.debug_loc 3409115 3409130 15 0.0
.debug_ranges 371688 371696 8 0.0
.debug_str 3563128 3563120 -8 -0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 107200 107232 32 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 572957 572957 0 0.0
.symtab 173536 173536 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
952870 952886 16 0.0
bl702+rpc (read only) 3358 3358 0 0.0
(read/write) 1278335 1278383 48 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 77953 77953 0 0.0
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4608 4608 0 0.0
.debug_abbrev 1698984 1698984 0 0.0
.debug_aranges 142496 142496 0 0.0
.debug_frame 519484 519484 0 0.0
.debug_info 44966857 44966890 33 0.0
.debug_line 5672591 5672703 112 0.0
.debug_loc 3606033 3606048 15 0.0
.debug_ranges 395456 395464 8 0.0
.debug_str 3966620 3966612 -8 -0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 121840 121872 32 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 634016 634016 0 0.0
.symtab 192000 192000 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
1030266 1030282 16 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 678315 678363 48 0.0
(read/write) 172868 172820 -48 -0.0
.bss 80876 80876 0 0.0
.data 3384 3384 0 0.0
.rodata 88371 88403 32 0.0
.text 589628 589644 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 642139 642187 48 0.0
(read/write) 157568 157568 0 0.0
.bss 80068 80068 0 0.0
.data 3384 3384 0 0.0
.rodata 78163 78195 32 0.0
.text 563656 563672 16 0.0
lock-ftd LP_CC2652R7 (read only) 675207 675255 48 0.0
(read/write) 173328 173280 -48 -0.0
.bss 78316 78316 0 0.0
.data 3312 3312 0 0.0
.rodata 76671 76703 32 0.0
.text 598056 598072 16 0.0
lock-mtd LP_CC2652R7 (read only) 661631 661675 44 0.0
(read/write) 182160 182116 -44 -0.0
.bss 73572 73572 0 0.0
.data 3312 3312 0 0.0
.rodata 103263 103291 28 0.0
.text 557888 557904 16 0.0
pump-app LP_CC2652R7 (read only) 688275 688315 40 0.0
(read/write) 160996 160956 -40 -0.0
.bss 78284 78284 0 0.0
.data 3276 3276 0 0.0
.rodata 90795 90827 32 0.0
.text 597000 597008 8 0.0
pump-controller-app LP_CC2652R7 (read only) 673635 673691 56 0.0
(read/write) 175748 175692 -56 -0.0
.bss 78396 78396 0 0.0
.data 3300 3300 0 0.0
.rodata 86835 86867 32 0.0
.text 586320 586344 24 0.0
shell LP_CC2652R7 (read only) 669594 669634 40 0.0
(read/write) 183660 183620 -40 -0.0
.bss 82948 82948 0 0.0
.data 3380 3380 0 0.0
.rodata 85122 85154 32 0.0
.text 584160 584168 8 0.0
cc32xx lock CC3235SF_LAUNCHXL (read only) 640361 640513 152 0.0
(read/write) 204084 204092 8 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197488 197496 8 0.0
.comment 194 194 0 0.0
.data 1476 1476 0 0.0
.debug_abbrev 928461 929366 905 0.1
.debug_aranges 87352 87360 8 0.0
.debug_frame 299840 299864 24 0.0
.debug_info 20180781 20251030 70249 0.3
.debug_line 2649926 2652268 2342 0.1
.debug_loc 2786017 2786183 166 0.0
.debug_ranges 280728 280856 128 0.0
.debug_str 3005287 3005347 60 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105633 105665 32 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 375902 375952 50 0.0
.symtab 255856 255888 32 0.0
.text 0 0 0 0.0
532604 532728 124 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584974 584974 0 0.0
.app_xip_area 461768 461768 0 0.0
.bss 65648 65648 0 0.0
.data 736 736 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 588938 588938 0 0.0
.app_xip_area 460436 460436 0 0.0
.bss 70936 70936 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 550126 550170 44 0.0
.app_xip_area 432424 432468 44 0.0
.bss 60192 60192 0 0.0
.data 692 692 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rs9116 (read/write) 1038488 1038656 168 0.0
.bss 181568 181576 8 0.0
.data 2044 2044 0 0.0
.text 854856 855016 160 0.0
BRD4187C (read/write) 1135552 1135592 40 0.0
.bss 133256 133256 0 0.0
.data 2532 2532 0 0.0
.text 975168 975208 40 0.0
lock-app BRD4161A+wf200 (read/write) 1066192 1066256 64 0.0
.bss 153088 153096 8 0.0
.data 2052 2052 0 0.0
.text 911028 911084 56 0.0
window-app BRD4187C (read/write) 1137168 1137208 40 0.0
.bss 134848 134848 0 0.0
.data 2572 2572 0 0.0
.text 975152 975192 40 0.0
linux chip-tool-ipv6only arm64 (read only) 11995524 11995588 64 0.0
(read/write) 727720 727720 0 0.0
.bss 34248 34248 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 670008 670008 0 0.0
.dynamic 560 560 0 0.0
.got 15256 15256 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 583332 583332 0 0.0
.text 9685428 9685492 64 0.0
thermostat-no-ble arm64 (read only) 2511700 2511860 160 0.0
(read/write) 145240 145256 16 0.0
.bss 56456 56472 16 0.0
.data 1824 1824 0 0.0
.data.rel.ro 77496 77496 0 0.0
.dynamic 560 560 0 0.0
.got 5408 5408 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 151088 151120 32 0.0
.text 2098496 2098624 128 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2464688 2464848 160 0.0
.bss 215892 215900 8 0.0
.data 5880 5880 0 0.0
.text 1427332 1427492 160 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 840872 840864 -8 -0.0
(read/write) 1757628 1757780 152 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 189800 189808 8 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2672 2672 0 0.0
.debug_abbrev 1252012 1252899 887 0.1
.debug_aranges 111408 111416 8 0.0
.debug_frame 373996 374020 24 0.0
.debug_info 27892969 27964463 71494 0.3
.debug_line 3784202 3786965 2763 0.1
.debug_loc 3680939 3681106 167 0.0
.debug_ranges 362448 362576 128 0.0
.debug_str 3513391 3513451 60 0.0
.heap 840872 840864 -8 -0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 578384 578434 50 0.0
.symtab 425056 425088 32 0.0
.text 0 0 0 0.0
1556768 1556912 144 0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 841688 841680 -8 -0.0
(read/write) 1699236 1699388 152 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188992 189000 8 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1237683 1238570 887 0.1
.debug_aranges 110672 110680 8 0.0
.debug_frame 376440 376464 24 0.0
.debug_info 27440448 27511942 71494 0.3
.debug_line 3792546 3795405 2859 0.1
.debug_loc 3664669 3664836 167 0.0
.debug_ranges 360416 360544 128 0.0
.debug_str 3499144 3499204 60 0.0
.heap 841688 841680 -8 -0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 539592 539642 50 0.0
.symtab 410336 410368 32 0.0
.text 1499192 1499336 144 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850000 849992 -8 -0.0
(read/write) 1612308 1612460 152 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180880 180888 8 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2464 2464 0 0.0
.debug_abbrev 1072017 1072904 887 0.1
.debug_aranges 102880 102888 8 0.0
.debug_frame 346876 346900 24 0.0
.debug_info 22780548 22852041 71493 0.3
.debug_line 3344860 3347575 2715 0.1
.debug_loc 3342680 3342847 167 0.0
.debug_ranges 319592 319720 128 0.0
.debug_str 3302154 3302214 60 0.0
.heap 850000 849992 -8 -0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 474760 474810 50 0.0
.symtab 378080 378112 32 0.0
.text 1420576 1420720 144 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845024 845016 -8 -0.0
(read/write) 1646548 1646684 136 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 185848 185856 8 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1073721 1074608 887 0.1
.debug_aranges 103320 103328 8 0.0
.debug_frame 348816 348840 24 0.0
.debug_info 23010472 23081968 71496 0.3
.debug_line 3346757 3349424 2667 0.1
.debug_loc 3365559 3365726 167 0.0
.debug_ranges 321504 321632 128 0.0
.debug_str 3319424 3319484 60 0.0
.heap 845024 845016 -8 -0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 478173 478223 50 0.0
.symtab 380272 380304 32 0.0
.text 1449840 1449968 128 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1149152 1149188 36 0.0
.bss 99900 99900 0 0.0
.data 848 848 0 0.0
.text 596252 596288 36 0.0
lock-app qpg6105+debug (read/write) 1116896 1116940 44 0.0
.bss 96396 96396 0 0.0
.data 860 860 0 0.0
.text 563992 564036 44 0.0
telink all-clusters-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1013612 1013660 48 0.0
bss 97904 97904 0 0.0
text 684612 684632 20 0.0
all-clusters-minimal-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 950020 950068 48 0.0
bss 96956 96956 0 0.0
text 646912 646930 18 0.0
contact-sensor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 854876 854924 48 0.0
bss 89076 89076 0 0.0
text 577804 577820 16 0.0
light-switch-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 870628 870676 48 0.0
bss 89160 89160 0 0.0
text 591848 591864 16 0.0
lighting-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 947964 948012 48 0.0
bss 97312 97312 0 0.0
text 657250 657266 16 0.0
ota-requestor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 881964 882012 48 0.0
bss 90112 90112 0 0.0
text 601594 601610 16 0.0
thermostat tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 874824 874872 48 0.0
bss 90552 90552 0 0.0
text 593428 593444 16 0.0

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So with this change, what I see during startup is:

I (2639) chip[DL]: IPv4 address changed on WiFi station interface: 10.0.0.30/255.255.255.0 gateway 10.0.0.1
...
I (2669) app-devicecallbacks: IPv4 Server ready...
...
I (2699) chip[DIS]: CHIP minimal mDNS started advertising.

(multiple StartServer calls happen here, two for "reasons" and one because this PR triggers a StartServer from inside StartServer, so we do the "shut down and reinit endpoints" thing three times).

E (2819) chip[SVR]: Server initialization complete

Then we kick off the subscription resumption machinery, discovery happens, and then:

I (3159) chip[SC]: Initiating session on local FabricIndex 1 from 0x0000000000000011 -> 0x000000000001B669
I (3479) chip[EM]: <<< [E:24491i S:0 M:157468918] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:30 (SecureChannel:CASE_Sigma1)
I (3489) chip[IN]: (U) Sending msg 157468918 to IP address 'UDP:[FE80::18C8:1739:6AFD:1BC1%st1]:62231'
E (3509) chip[DMG]: Failed to establish CASE for subscription-resumption with error '3000004'

which is the LwIP ERR_RTE error, as far as I can tell. Because we just tried to send an IPv6 message but we have no IPv6 interface up. Then after that:

I (4139) chip[DL]: IP_EVENT_GOT_IP6
I (4139) chip[DL]: IPv6 addr available. Ready on WIFI_STA_DEF interface: fe80:0000:0000:0000:fef5:c4ff:fe30:e4e4

and after that we restart mDNS advertising again, but no longer trigger subscription resumption...

This part was likely broken even before #24725, since that didn't wait for network bringup at all. Now we're waiting until IPv4 comes up, but should really be waiting until all our interfaces are up, ideally... @jtung-apple @wqx6

@woody-apple woody-apple merged commit 40f7717 into project-chip:master Feb 14, 2023
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
…roject-chip#25050)

It turns out that when no network interfaces are up
MinMdnsResolver::IsInitialized() returns false even after
calling MinMdnsResolver::Init(). Moreover, the application
has no means to be notified when the resolver gets ready to
process DNS-SD queries.

Rename kDnssdPlatformInitialized event to kDnssdInitialized
and spawn it in the minimal mDNS implementation when the
server becomes initialized, similarly to what the platform
DNS-SD implementation does.

This is needed to have a consistent way to notify the
application that it can begin communication with other nodes
e.g. to resume persistent subscriptions.

Signed-off-by: Damian Krolik <[email protected]>
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.

4 participants