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

[dns-sd] Extended discovery improvements #16290

Merged
merged 6 commits into from
Mar 23, 2022

Conversation

Damian-Nordic
Copy link
Contributor

@Damian-Nordic Damian-Nordic commented Mar 16, 2022

Problem

  • According to the spec, each time a commissionable node service is advertised and the device is not in the commissioning mode, the advertising should be treated as Extended Discovery. The current code, however, assumes that the device hasn't been commissioned to any fabric then it's not Extended Discovery.
  • The extended discovery timeout should default to 3-15 minutes while it's set to "no timeout" now.

Change overview

  • Change the extended discovery trigger condition.
  • Change the default extended discovery timeout to 15 minutes.
  • Use DefaultStorageKeyAllocator for selecting the persistent storage key.
  • Improve logging message to make them more meaningful for non-implementers. Also, remove some irrelevant/redundant logs.
    Fixes Extended timeout configuration value not initialized ? #11124

Testing

Built a sample with extended discovery disabled and observed that commissionable node advertising doesn't start until the commissioning window is opened.

src/app/server/Dnssd.cpp Outdated Show resolved Hide resolved
src/app/server/Dnssd.cpp Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Mar 21, 2022

PR #16290: Size comparison from 193b4d0 to 547ade6

Increases (4 builds for cyw30739, telink)
platform target config section 193b4d0 547ade6 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603854 603962 108 0.0
.app_xip_area 510952 511060 108 0.0
lock cyw930739m2evb_01 (read/write) 561642 561750 108 0.0
.app_xip_area 470268 470376 108 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 571494 571646 152 0.0
.app_xip_area 470472 470624 152 0.0
telink lighting-app tlsr9518adk80d (read/write) 895806 896330 524 0.1
text 633382 633830 448 0.1
Decreases (22 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6)
platform target config section 193b4d0 547ade6 change % change
efr32 lighting-app BRD4161A (read only) 921976 921676 -300 -0.0
(read/write) 128760 128756 -4 -0.0
.text 921968 921668 -300 -0.0
BRD4161A+rpc (read only) 950788 950480 -308 -0.0
.text 950780 950472 -308 -0.0
window-app BRD4161A (read only) 852304 851980 -324 -0.0
.text 852296 851972 -324 -0.0
esp32 all-clusters-app c3devkit (read only) 961988 961896 -92 -0.0
(read/write) 1393306 1393138 -168 -0.0
.flash.rodata 198160 197992 -168 -0.1
.flash.text 961988 961896 -92 -0.0
m5stack (read only) 1018119 1018039 -80 -0.0
(read/write) 461148 460988 -160 -0.0
.flash.rodata 227720 227560 -160 -0.1
.flash.text 1012735 1012655 -80 -0.0
k32w light k32w061+release (read/write) 701092 700776 -316 -0.0
.text 615768 615452 -316 -0.1
lock k32w061+release (read/write) 700948 700632 -316 -0.0
.text 615616 615300 -316 -0.1
linux chip-tool-ipv6only arm64 (read only) 9769516 9769132 -384 -0.0
.rodata 493844 493668 -176 -0.0
.text 8224308 8224100 -208 -0.0
thermostat-no-ble arm64 (read only) 2224356 2223988 -368 -0.0
.rodata 138452 138292 -160 -0.1
.text 1865840 1865632 -208 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2353452 2353220 -232 -0.0
.text 1316052 1315820 -232 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1155907 1155599 -308 -0.0
rodata 145956 145744 -212 -0.1
text 788072 787972 -100 -0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1142587 1142243 -344 -0.0
rodata 123612 123364 -248 -0.2
text 796976 796876 -100 -0.0
nrf52840dk_nrf52840+rpc (read/write) 1091183 1090839 -344 -0.0
rodata 111200 110952 -248 -0.2
text 761796 761696 -100 -0.0
nrf52840dongle_nrf52840 (read/write) 1155063 1154703 -360 -0.0
rodata 122292 122044 -248 -0.2
text 798812 798712 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1048558 1048214 -344 -0.0
rodata 115756 115508 -248 -0.2
text 710672 710572 -100 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 1042763 1042439 -324 -0.0
rodata 116276 116064 -212 -0.2
text 714760 714660 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 949122 948798 -324 -0.0
rodata 108472 108260 -212 -0.2
text 628608 628508 -100 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 1060915 1060607 -308 -0.0
rodata 118220 118008 -212 -0.2
text 730860 730760 -100 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1044167 1043843 -324 -0.0
rodata 114800 114588 -212 -0.2
text 717784 717684 -100 -0.0
p6 all-clusters-app default (read/write) 2492960 2492728 -232 -0.0
.text 1451224 1450992 -232 -0.0
light-app default (read/write) 2396360 2396112 -248 -0.0
.text 1354624 1354376 -248 -0.0
lock-app default (read/write) 2359896 2359664 -232 -0.0
.text 1318160 1317928 -232 -0.0
Full report (26 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 193b4d0 547ade6 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603854 603962 108 0.0
.app_xip_area 510952 511060 108 0.0
.bss 75656 75656 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 561642 561750 108 0.0
.app_xip_area 470268 470376 108 0.0
.bss 74160 74160 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 571494 571646 152 0.0
.app_xip_area 470472 470624 152 0.0
.bss 83488 83488 0 0.0
.data 500 500 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 921976 921676 -300 -0.0
(read/write) 128760 128756 -4 -0.0
.bss 126768 126768 0 0.0
.data 1988 1988 0 0.0
.text 921968 921668 -300 -0.0
BRD4161A+rpc (read only) 950788 950480 -308 -0.0
(read/write) 144712 144712 0 0.0
.bss 142544 142544 0 0.0
.data 2168 2168 0 0.0
.text 950780 950472 -308 -0.0
window-app BRD4161A (read only) 852304 851980 -324 -0.0
(read/write) 126712 126712 0 0.0
.bss 124848 124848 0 0.0
.data 1864 1864 0 0.0
.text 852296 851972 -324 -0.0
esp32 all-clusters-app c3devkit (read only) 961988 961896 -92 -0.0
(read/write) 1393306 1393138 -168 -0.0
.dram0.bss 62048 62048 0 0.0
.dram0.data 14188 14188 0 0.0
.flash.rodata 198160 197992 -168 -0.1
.flash.text 961988 961896 -92 -0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1018119 1018039 -80 -0.0
(read/write) 461148 460988 -160 -0.0
.dram0.bss 67576 67576 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 227720 227560 -160 -0.1
.flash.text 1012735 1012655 -80 -0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 701092 700776 -316 -0.0
.bss 77656 77656 0 0.0
.data 1868 1868 0 0.0
.text 615768 615452 -316 -0.1
lock k32w061+release (read/write) 700948 700632 -316 -0.0
.bss 77624 77624 0 0.0
.data 1908 1908 0 0.0
.text 615616 615300 -316 -0.1
linux chip-tool-ipv6only arm64 (read only) 9769516 9769132 -384 -0.0
(read/write) 472689 472689 0 0.0
.bss 40609 40609 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371824 371824 0 0.0
.dynamic 560 560 0 0.0
.got 55328 55328 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 493844 493668 -176 -0.0
.text 8224308 8224100 -208 -0.0
thermostat-no-ble arm64 (read only) 2224356 2223988 -368 -0.0
(read/write) 146385 146385 0 0.0
.bss 62289 62289 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75728 75728 0 0.0
.dynamic 560 560 0 0.0
.got 4352 4352 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 138452 138292 -160 -0.1
.text 1865840 1865632 -208 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2353452 2353220 -232 -0.0
.bss 184652 184652 0 0.0
.data 5752 5752 0 0.0
.text 1316052 1315820 -232 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1155907 1155599 -308 -0.0
bss 146716 146716 0 0.0
rodata 145956 145744 -212 -0.1
text 788072 787972 -100 -0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1142587 1142243 -344 -0.0
bss 143160 143160 0 0.0
rodata 123612 123364 -248 -0.2
text 796976 796876 -100 -0.0
nrf52840dk_nrf52840+rpc (read/write) 1091183 1090839 -344 -0.0
bss 139244 139244 0 0.0
rodata 111200 110952 -248 -0.2
text 761796 761696 -100 -0.0
nrf52840dongle_nrf52840 (read/write) 1155063 1154703 -360 -0.0
bss 144152 144152 0 0.0
rodata 122292 122044 -248 -0.2
text 798812 798712 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1048558 1048214 -344 -0.0
bss 140224 140224 0 0.0
rodata 115756 115508 -248 -0.2
text 710672 710572 -100 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 1042763 1042439 -324 -0.0
bss 133108 133108 0 0.0
rodata 116276 116064 -212 -0.2
text 714760 714660 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 949122 948798 -324 -0.0
bss 130204 130204 0 0.0
rodata 108472 108260 -212 -0.2
text 628608 628508 -100 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 1060915 1060607 -308 -0.0
bss 133020 133020 0 0.0
rodata 118220 118008 -212 -0.2
text 730860 730760 -100 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1044167 1043843 -324 -0.0
bss 132768 132768 0 0.0
rodata 114800 114588 -212 -0.2
text 717784 717684 -100 -0.0
p6 all-clusters-app default (read/write) 2492960 2492728 -232 -0.0
.bss 118072 118072 0 0.0
.data 2632 2632 0 0.0
.text 1451224 1450992 -232 -0.0
light-app default (read/write) 2396360 2396112 -248 -0.0
.bss 111544 111544 0 0.0
.data 2488 2488 0 0.0
.text 1354624 1354376 -248 -0.0
lock-app default (read/write) 2359896 2359664 -232 -0.0
.bss 111288 111288 0 0.0
.data 2448 2448 0 0.0
.text 1318160 1317928 -232 -0.0
telink lighting-app tlsr9518adk80d (read/write) 895806 896330 524 0.1
bss 87424 87424 0 0.0
noinit 37160 37160 0 0.0
text 633382 633830 448 0.1

@github-actions
Copy link

github-actions bot commented Mar 21, 2022

PR #16290: Size comparison from 193b4d0 to f1f9fba

Increases (4 builds for cyw30739, telink)
platform target config section 193b4d0 f1f9fba change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603854 603962 108 0.0
.app_xip_area 510952 511060 108 0.0
lock cyw930739m2evb_01 (read/write) 561642 561750 108 0.0
.app_xip_area 470268 470376 108 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 571494 571646 152 0.0
.app_xip_area 470472 470624 152 0.0
telink lighting-app tlsr9518adk80d (read/write) 895806 896330 524 0.1
text 633382 633830 448 0.1
Decreases (22 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6)
platform target config section 193b4d0 f1f9fba change % change
efr32 lighting-app BRD4161A (read only) 921976 921676 -300 -0.0
(read/write) 128760 128756 -4 -0.0
.text 921968 921668 -300 -0.0
BRD4161A+rpc (read only) 950788 950480 -308 -0.0
.text 950780 950472 -308 -0.0
window-app BRD4161A (read only) 852304 851980 -324 -0.0
.text 852296 851972 -324 -0.0
esp32 all-clusters-app c3devkit (read only) 961988 961896 -92 -0.0
(read/write) 1393306 1393138 -168 -0.0
.flash.rodata 198160 197992 -168 -0.1
.flash.text 961988 961896 -92 -0.0
m5stack (read only) 1018119 1018039 -80 -0.0
(read/write) 461148 460988 -160 -0.0
.flash.rodata 227720 227560 -160 -0.1
.flash.text 1012735 1012655 -80 -0.0
k32w light k32w061+release (read/write) 701092 700776 -316 -0.0
.text 615768 615452 -316 -0.1
lock k32w061+release (read/write) 700948 700632 -316 -0.0
.text 615616 615300 -316 -0.1
linux chip-tool-ipv6only arm64 (read only) 9769516 9769132 -384 -0.0
.rodata 493844 493668 -176 -0.0
.text 8224308 8224100 -208 -0.0
thermostat-no-ble arm64 (read only) 2224356 2223988 -368 -0.0
.rodata 138452 138292 -160 -0.1
.text 1865840 1865632 -208 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2353452 2353220 -232 -0.0
.text 1316052 1315820 -232 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1155907 1155599 -308 -0.0
rodata 145956 145744 -212 -0.1
text 788072 787972 -100 -0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1142587 1142243 -344 -0.0
rodata 123612 123364 -248 -0.2
text 796976 796876 -100 -0.0
nrf52840dk_nrf52840+rpc (read/write) 1091183 1090839 -344 -0.0
rodata 111200 110952 -248 -0.2
text 761796 761696 -100 -0.0
nrf52840dongle_nrf52840 (read/write) 1155063 1154703 -360 -0.0
rodata 122292 122044 -248 -0.2
text 798812 798712 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1048558 1048214 -344 -0.0
rodata 115756 115508 -248 -0.2
text 710672 710572 -100 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 1042763 1042439 -324 -0.0
rodata 116276 116064 -212 -0.2
text 714760 714660 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 949122 948798 -324 -0.0
rodata 108472 108260 -212 -0.2
text 628608 628508 -100 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 1060915 1060607 -308 -0.0
rodata 118220 118008 -212 -0.2
text 730860 730760 -100 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1044167 1043843 -324 -0.0
rodata 114800 114588 -212 -0.2
text 717784 717684 -100 -0.0
p6 all-clusters-app default (read/write) 2492960 2492728 -232 -0.0
.text 1451224 1450992 -232 -0.0
light-app default (read/write) 2396360 2396112 -248 -0.0
.text 1354624 1354376 -248 -0.0
lock-app default (read/write) 2359896 2359664 -232 -0.0
.text 1318160 1317928 -232 -0.0
Full report (26 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 193b4d0 f1f9fba change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603854 603962 108 0.0
.app_xip_area 510952 511060 108 0.0
.bss 75656 75656 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 561642 561750 108 0.0
.app_xip_area 470268 470376 108 0.0
.bss 74160 74160 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 571494 571646 152 0.0
.app_xip_area 470472 470624 152 0.0
.bss 83488 83488 0 0.0
.data 500 500 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 921976 921676 -300 -0.0
(read/write) 128760 128756 -4 -0.0
.bss 126768 126768 0 0.0
.data 1988 1988 0 0.0
.text 921968 921668 -300 -0.0
BRD4161A+rpc (read only) 950788 950480 -308 -0.0
(read/write) 144712 144712 0 0.0
.bss 142544 142544 0 0.0
.data 2168 2168 0 0.0
.text 950780 950472 -308 -0.0
window-app BRD4161A (read only) 852304 851980 -324 -0.0
(read/write) 126712 126712 0 0.0
.bss 124848 124848 0 0.0
.data 1864 1864 0 0.0
.text 852296 851972 -324 -0.0
esp32 all-clusters-app c3devkit (read only) 961988 961896 -92 -0.0
(read/write) 1393306 1393138 -168 -0.0
.dram0.bss 62048 62048 0 0.0
.dram0.data 14188 14188 0 0.0
.flash.rodata 198160 197992 -168 -0.1
.flash.text 961988 961896 -92 -0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1018119 1018039 -80 -0.0
(read/write) 461148 460988 -160 -0.0
.dram0.bss 67576 67576 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 227720 227560 -160 -0.1
.flash.text 1012735 1012655 -80 -0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 701092 700776 -316 -0.0
.bss 77656 77656 0 0.0
.data 1868 1868 0 0.0
.text 615768 615452 -316 -0.1
lock k32w061+release (read/write) 700948 700632 -316 -0.0
.bss 77624 77624 0 0.0
.data 1908 1908 0 0.0
.text 615616 615300 -316 -0.1
linux chip-tool-ipv6only arm64 (read only) 9769516 9769132 -384 -0.0
(read/write) 472689 472689 0 0.0
.bss 40609 40609 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371824 371824 0 0.0
.dynamic 560 560 0 0.0
.got 55328 55328 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 493844 493668 -176 -0.0
.text 8224308 8224100 -208 -0.0
thermostat-no-ble arm64 (read only) 2224356 2223988 -368 -0.0
(read/write) 146385 146385 0 0.0
.bss 62289 62289 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75728 75728 0 0.0
.dynamic 560 560 0 0.0
.got 4352 4352 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 138452 138292 -160 -0.1
.text 1865840 1865632 -208 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2353452 2353220 -232 -0.0
.bss 184652 184652 0 0.0
.data 5752 5752 0 0.0
.text 1316052 1315820 -232 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1155907 1155599 -308 -0.0
bss 146716 146716 0 0.0
rodata 145956 145744 -212 -0.1
text 788072 787972 -100 -0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1142587 1142243 -344 -0.0
bss 143160 143160 0 0.0
rodata 123612 123364 -248 -0.2
text 796976 796876 -100 -0.0
nrf52840dk_nrf52840+rpc (read/write) 1091183 1090839 -344 -0.0
bss 139244 139244 0 0.0
rodata 111200 110952 -248 -0.2
text 761796 761696 -100 -0.0
nrf52840dongle_nrf52840 (read/write) 1155063 1154703 -360 -0.0
bss 144152 144152 0 0.0
rodata 122292 122044 -248 -0.2
text 798812 798712 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1048558 1048214 -344 -0.0
bss 140224 140224 0 0.0
rodata 115756 115508 -248 -0.2
text 710672 710572 -100 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 1042763 1042439 -324 -0.0
bss 133108 133108 0 0.0
rodata 116276 116064 -212 -0.2
text 714760 714660 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 949122 948798 -324 -0.0
bss 130204 130204 0 0.0
rodata 108472 108260 -212 -0.2
text 628608 628508 -100 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 1060915 1060607 -308 -0.0
bss 133020 133020 0 0.0
rodata 118220 118008 -212 -0.2
text 730860 730760 -100 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1044167 1043843 -324 -0.0
bss 132768 132768 0 0.0
rodata 114800 114588 -212 -0.2
text 717784 717684 -100 -0.0
p6 all-clusters-app default (read/write) 2492960 2492728 -232 -0.0
.bss 118072 118072 0 0.0
.data 2632 2632 0 0.0
.text 1451224 1450992 -232 -0.0
light-app default (read/write) 2396360 2396112 -248 -0.0
.bss 111544 111544 0 0.0
.data 2488 2488 0 0.0
.text 1354624 1354376 -248 -0.0
lock-app default (read/write) 2359896 2359664 -232 -0.0
.bss 111288 111288 0 0.0
.data 2448 2448 0 0.0
.text 1318160 1317928 -232 -0.0
telink lighting-app tlsr9518adk80d (read/write) 895806 896330 524 0.1
bss 87424 87424 0 0.0
noinit 37160 37160 0 0.0
text 633382 633830 448 0.1

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.

Thank you for cleaning this up!

src/app/server/Dnssd.cpp Show resolved Hide resolved
src/app/server/Dnssd.cpp Show resolved Hide resolved
src/lib/support/DefaultStorageKeyAllocator.h Outdated Show resolved Hide resolved
According to the spec, each time a commissionable node
service is advertised and the device is not in the
commissioning mode, the advertising should be treated as
Extended Discovery. The current code, however, makes
a distinction whether the device is on any fabric or not.
The spec recommends that the extended discovery by default
time out after a period recommended in the "Announcement
duration" section. Change the default from "no timeout" to
15 minutes.

Use DefaultStorageKeyAllocator when persisting the timeout.

Make extended discovery logs more meaningful for a
non-implementer and remove some irrelevant messages.
Discriminator must be now explicitly specified in Linux apps.
Previously the Cirque tests were passing only by chance.
Most platforms have it enabled, by default, and those that
don't, have extended discovery disabled, too, which covers
the case when the commissioning window is closed. On the
other hand, when the commissioning window is open, the
device should always try to advertise over DNS-SD.
@github-actions
Copy link

github-actions bot commented Mar 22, 2022

PR #16290: Size comparison from 2e658fb to deeb2fd

Increases (4 builds for cyw30739, telink)
platform target config section 2e658fb deeb2fd change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603870 603978 108 0.0
.app_xip_area 510968 511076 108 0.0
lock cyw930739m2evb_01 (read/write) 561658 561766 108 0.0
.app_xip_area 470284 470392 108 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 571494 571646 152 0.0
.app_xip_area 470472 470624 152 0.0
telink lighting-app tlsr9518adk80d (read/write) 895830 896354 524 0.1
text 633404 633852 448 0.1
Decreases (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6)
platform target config section 2e658fb deeb2fd change % change
efr32 lighting-app BRD4161A (read only) 922008 921692 -316 -0.0
(read/write) 128760 128756 -4 -0.0
.text 922000 921684 -316 -0.0
BRD4161A+rpc (read only) 950820 950496 -324 -0.0
.text 950812 950488 -324 -0.0
window-app BRD4161A (read only) 852384 852060 -324 -0.0
.text 852376 852052 -324 -0.0
esp32 all-clusters-app c3devkit (read only) 963776 963684 -92 -0.0
(read/write) 1393690 1393522 -168 -0.0
.flash.rodata 198512 198344 -168 -0.1
.flash.text 963776 963684 -92 -0.0
m5stack (read only) 1020319 1020239 -80 -0.0
(read/write) 461460 461300 -160 -0.0
.flash.rodata 228016 227856 -160 -0.1
.flash.text 1014935 1014855 -80 -0.0
k32w light k32w061+release (read/write) 701092 700776 -316 -0.0
.text 615768 615452 -316 -0.1
lock k32w061+release (read/write) 700964 700648 -316 -0.0
.text 615632 615316 -316 -0.1
linux all-clusters-app debug (read only) 2477089 2476689 -400 -0.0
.rodata 212005 211845 -160 -0.1
.text 2101634 2101394 -240 -0.0
bridge-app debug+rpc (read only) 1752637 1752237 -400 -0.0
.rodata 144684 144524 -160 -0.1
.text 1492741 1492501 -240 -0.0
chip-tool debug (read only) 10145893 10145493 -400 -0.0
.rodata 517813 517653 -160 -0.0
.text 8845477 8845237 -240 -0.0
chip-tool-ipv6only arm64 (read only) 9769404 9769020 -384 -0.0
.rodata 493604 493428 -176 -0.0
.text 8224436 8224228 -208 -0.0
door-lock-app debug (read only) 2004473 2004073 -400 -0.0
.rodata 181180 181020 -160 -0.1
.text 1673634 1673394 -240 -0.0
lighting-app debug+rpc (read only) 2178137 2177737 -400 -0.0
.rodata 175484 175228 -256 -0.1
.text 1843634 1843490 -144 -0.0
ota-provider-app debug (read only) 1938833 1938433 -400 -0.0
.rodata 166571 166411 -160 -0.1
.text 1620498 1620258 -240 -0.0
ota-requestor-app debug (read only) 1969001 1968601 -400 -0.0
.rodata 162980 162820 -160 -0.1
.text 1654034 1653794 -240 -0.0
shell debug (read only) 2426433 2426033 -400 -0.0
.rodata 209426 209266 -160 -0.1
.text 2060306 2060066 -240 -0.0
thermostat-no-ble arm64 (read only) 2262500 2262132 -368 -0.0
.rodata 140036 139876 -160 -0.1
.text 1899152 1898944 -208 -0.0
tv-app debug (read only) 2677657 2677369 -288 -0.0
.rodata 207413 207157 -256 -0.1
.text 2295394 2295362 -32 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2353452 2353220 -232 -0.0
.text 1316052 1315820 -232 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1155987 1155679 -308 -0.0
rodata 145956 145744 -212 -0.1
text 788148 788048 -100 -0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1142603 1142259 -344 -0.0
rodata 123612 123364 -248 -0.2
text 796992 796892 -100 -0.0
nrf52840dk_nrf52840+rpc (read/write) 1091199 1090855 -344 -0.0
rodata 111200 110952 -248 -0.2
text 761812 761712 -100 -0.0
nrf52840dongle_nrf52840 (read/write) 1155079 1154719 -360 -0.0
rodata 122292 122044 -248 -0.2
text 798828 798728 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1048574 1048230 -344 -0.0
rodata 115756 115508 -248 -0.2
text 710688 710588 -100 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 1042763 1042455 -308 -0.0
rodata 116276 116064 -212 -0.2
text 714772 714672 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 949138 948814 -324 -0.0
rodata 108472 108260 -212 -0.2
text 628624 628524 -100 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 1060931 1060607 -324 -0.0
rodata 118220 118008 -212 -0.2
text 730872 730772 -100 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1044167 1043843 -324 -0.0
rodata 114800 114588 -212 -0.2
text 717784 717684 -100 -0.0
p6 all-clusters-app default (read/write) 2492976 2492728 -248 -0.0
.text 1451240 1450992 -248 -0.0
light-app default (read/write) 2396376 2396144 -232 -0.0
.text 1354640 1354408 -232 -0.0
lock-app default (read/write) 2359928 2359680 -248 -0.0
.text 1318192 1317944 -248 -0.0
Full report (35 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 2e658fb deeb2fd change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603870 603978 108 0.0
.app_xip_area 510968 511076 108 0.0
.bss 75656 75656 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 561658 561766 108 0.0
.app_xip_area 470284 470392 108 0.0
.bss 74160 74160 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 571494 571646 152 0.0
.app_xip_area 470472 470624 152 0.0
.bss 83488 83488 0 0.0
.data 500 500 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 922008 921692 -316 -0.0
(read/write) 128760 128756 -4 -0.0
.bss 126768 126768 0 0.0
.data 1988 1988 0 0.0
.text 922000 921684 -316 -0.0
BRD4161A+rpc (read only) 950820 950496 -324 -0.0
(read/write) 144712 144712 0 0.0
.bss 142544 142544 0 0.0
.data 2168 2168 0 0.0
.text 950812 950488 -324 -0.0
window-app BRD4161A (read only) 852384 852060 -324 -0.0
(read/write) 126720 126720 0 0.0
.bss 124856 124856 0 0.0
.data 1864 1864 0 0.0
.text 852376 852052 -324 -0.0
esp32 all-clusters-app c3devkit (read only) 963776 963684 -92 -0.0
(read/write) 1393690 1393522 -168 -0.0
.dram0.bss 62072 62072 0 0.0
.dram0.data 14188 14188 0 0.0
.flash.rodata 198512 198344 -168 -0.1
.flash.text 963776 963684 -92 -0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1020319 1020239 -80 -0.0
(read/write) 461460 461300 -160 -0.0
.dram0.bss 67592 67592 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 228016 227856 -160 -0.1
.flash.text 1014935 1014855 -80 -0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 701092 700776 -316 -0.0
.bss 77656 77656 0 0.0
.data 1868 1868 0 0.0
.text 615768 615452 -316 -0.1
lock k32w061+release (read/write) 700964 700648 -316 -0.0
.bss 77624 77624 0 0.0
.data 1908 1908 0 0.0
.text 615632 615316 -316 -0.1
linux all-clusters-app debug (read only) 2477089 2476689 -400 -0.0
(read/write) 143152 143152 0 0.0
.bss 57312 57312 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78840 78840 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 212005 211845 -160 -0.1
.text 2101634 2101394 -240 -0.0
bridge-app debug+rpc (read only) 1752637 1752237 -400 -0.0
(read/write) 89424 89424 0 0.0
.bss 44456 44456 0 0.0
.data 1952 1952 0 0.0
.data.rel.ro 37944 37944 0 0.0
.dynamic 592 592 0 0.0
.got 3920 3920 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 144684 144524 -160 -0.1
.text 1492741 1492501 -240 -0.0
chip-tool debug (read only) 10145893 10145493 -400 -0.0
(read/write) 354848 354848 0 0.0
.bss 22304 22304 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 325408 325408 0 0.0
.dynamic 608 608 0 0.0
.got 4784 4784 0 0.0
.init 27 27 0 0.0
.init_array 632 632 0 0.0
.rodata 517813 517653 -160 -0.0
.text 8845477 8845237 -240 -0.0
chip-tool-ipv6only arm64 (read only) 9769404 9769020 -384 -0.0
(read/write) 472689 472689 0 0.0
.bss 40609 40609 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371824 371824 0 0.0
.dynamic 560 560 0 0.0
.got 55328 55328 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 493604 493428 -176 -0.0
.text 8224436 8224228 -208 -0.0
door-lock-app debug (read only) 2004473 2004073 -400 -0.0
(read/write) 116832 116832 0 0.0
.bss 47584 47584 0 0.0
.data 992 992 0 0.0
.data.rel.ro 62856 62856 0 0.0
.dynamic 592 592 0 0.0
.got 4120 4120 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 181180 181020 -160 -0.1
.text 1673634 1673394 -240 -0.0
lighting-app debug+rpc (read only) 2178137 2177737 -400 -0.0
(read/write) 123792 123792 0 0.0
.bss 48864 48864 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 67928 67928 0 0.0
.dynamic 608 608 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 744 744 0 0.0
.rodata 175484 175228 -256 -0.1
.text 1843634 1843490 -144 -0.0
ota-provider-app debug (read only) 1938833 1938433 -400 -0.0
(read/write) 112624 112624 0 0.0
.bss 47488 47488 0 0.0
.data 1288 1288 0 0.0
.data.rel.ro 58200 58200 0 0.0
.dynamic 608 608 0 0.0
.got 4376 4376 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 166571 166411 -160 -0.1
.text 1620498 1620258 -240 -0.0
ota-requestor-app debug (read only) 1969001 1968601 -400 -0.0
(read/write) 115592 115592 0 0.0
.bss 48480 48480 0 0.0
.data 1416 1416 0 0.0
.data.rel.ro 60264 60264 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 162980 162820 -160 -0.1
.text 1654034 1653794 -240 -0.0
shell debug (read only) 2426433 2426033 -400 -0.0
(read/write) 147208 147208 0 0.0
.bss 67240 67240 0 0.0
.data 784 784 0 0.0
.data.rel.ro 73472 73472 0 0.0
.dynamic 592 592 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 209426 209266 -160 -0.1
.text 2060306 2060066 -240 -0.0
thermostat-no-ble arm64 (read only) 2262500 2262132 -368 -0.0
(read/write) 148273 148273 0 0.0
.bss 62753 62753 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 77000 77000 0 0.0
.dynamic 560 560 0 0.0
.got 4480 4480 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 140036 139876 -160 -0.1
.text 1899152 1898944 -208 -0.0
tv-app debug (read only) 2677657 2677369 -288 -0.0
(read/write) 247712 247712 0 0.0
.bss 164384 164384 0 0.0
.data 3104 3104 0 0.0
.data.rel.ro 74168 74168 0 0.0
.dynamic 592 592 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 207413 207157 -256 -0.1
.text 2295394 2295362 -32 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2353452 2353220 -232 -0.0
.bss 184652 184652 0 0.0
.data 5752 5752 0 0.0
.text 1316052 1315820 -232 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1155987 1155679 -308 -0.0
bss 146716 146716 0 0.0
rodata 145956 145744 -212 -0.1
text 788148 788048 -100 -0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1142603 1142259 -344 -0.0
bss 143160 143160 0 0.0
rodata 123612 123364 -248 -0.2
text 796992 796892 -100 -0.0
nrf52840dk_nrf52840+rpc (read/write) 1091199 1090855 -344 -0.0
bss 139244 139244 0 0.0
rodata 111200 110952 -248 -0.2
text 761812 761712 -100 -0.0
nrf52840dongle_nrf52840 (read/write) 1155079 1154719 -360 -0.0
bss 144152 144152 0 0.0
rodata 122292 122044 -248 -0.2
text 798828 798728 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1048574 1048230 -344 -0.0
bss 140224 140224 0 0.0
rodata 115756 115508 -248 -0.2
text 710688 710588 -100 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 1042763 1042455 -308 -0.0
bss 133108 133108 0 0.0
rodata 116276 116064 -212 -0.2
text 714772 714672 -100 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 949138 948814 -324 -0.0
bss 130204 130204 0 0.0
rodata 108472 108260 -212 -0.2
text 628624 628524 -100 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 1060931 1060607 -324 -0.0
bss 133020 133020 0 0.0
rodata 118220 118008 -212 -0.2
text 730872 730772 -100 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1044167 1043843 -324 -0.0
bss 132768 132768 0 0.0
rodata 114800 114588 -212 -0.2
text 717784 717684 -100 -0.0
p6 all-clusters-app default (read/write) 2492976 2492728 -248 -0.0
.bss 118072 118072 0 0.0
.data 2632 2632 0 0.0
.text 1451240 1450992 -248 -0.0
light-app default (read/write) 2396376 2396144 -232 -0.0
.bss 111544 111544 0 0.0
.data 2488 2488 0 0.0
.text 1354640 1354408 -232 -0.0
lock-app default (read/write) 2359928 2359680 -248 -0.0
.bss 111288 111288 0 0.0
.data 2448 2448 0 0.0
.text 1318192 1317944 -248 -0.0
telink lighting-app tlsr9518adk80d (read/write) 895830 896354 524 0.1
bss 87424 87424 0 0.0
noinit 37160 37160 0 0.0
text 633404 633852 448 0.1

Copy link
Contributor

@chrisdecenzo chrisdecenzo left a comment

Choose a reason for hiding this comment

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

changes look good, thanks

@bzbarsky-apple bzbarsky-apple merged commit 5d510f1 into project-chip:master Mar 23, 2022
@Damian-Nordic Damian-Nordic deleted the discovery branch March 23, 2022 07:38
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
* [dns-sd] Change extended discovery condition

According to the spec, each time a commissionable node
service is advertised and the device is not in the
commissioning mode, the advertising should be treated as
Extended Discovery. The current code, however, makes
a distinction whether the device is on any fabric or not.

* [dns-sd] Set default extended discovery timeout to 15 minutes

The spec recommends that the extended discovery by default
time out after a period recommended in the "Announcement
duration" section. Change the default from "no timeout" to
15 minutes.

Use DefaultStorageKeyAllocator when persisting the timeout.

Make extended discovery logs more meaningful for a
non-implementer and remove some irrelevant messages.

* Fix Cirque tests

Discriminator must be now explicitly specified in Linux apps.
Previously the Cirque tests were passing only by chance.

* Remove CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DISCOVERY

Most platforms have it enabled, by default, and those that
don't, have extended discovery disabled, too, which covers
the case when the commissioning window is closed. On the
other hand, when the commissioning window is open, the
device should always try to advertise over DNS-SD.

* Fix build

* Follow KVS key convention
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.

Extended timeout configuration value not initialized ?
5 participants