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

Listen for group messages on all relevant interfaces in the sockets implementation. #21611

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

We were listening on the "default" interface if MulticastGroupJoinLeave got called for an enpoint that was bound to the wildcard interface. But that does not work in some situation (e.g. on Mac).

Instead, detect that we're dealing with the wildcard interface, and
explicitly iterate over all viable interfaces.

Problem

See above.

Change overview

See above.

Testing

Should now be able to run the groups tests in CI on Mac.

…mplementation.

We were listening on the "default" interface if MulticastGroupJoinLeave got
called for an enpoint that was bound to the wildcard interface.  But that does
not work in some situation (e.g. on Mac).

Instead, detect that we're dealing with the wildcard interface, and
explicitly iterate over all viable interfaces.
@github-actions
Copy link

github-actions bot commented Aug 3, 2022

PR #21611: Size comparison from a494ddf to 8eca981

Increases (4 builds for bl602, linux)
platform target config section a494ddf 8eca981 change % change
bl602 lighting-app bl602 .text 1048208 1048212 4 0.0
bl602+rpc (read/write) 1425274 1425282 8 0.0
.text 1079708 1079712 4 0.0
linux chip-tool-ipv6only arm64 (read only) 9843900 9844636 736 0.0
.rodata 463052 463196 144 0.0
.text 7754020 7754612 592 0.0
thermostat-no-ble arm64 (read only) 2346556 2347324 768 0.0
.rodata 139348 139492 144 0.1
.text 1969792 1970416 624 0.0
Decreases (1 build for cyw30739)
platform target config section a494ddf 8eca981 change % change
cyw30739 lock cyw930739m2evb_01 (read/write) 590646 590638 -8 -0.0
.app_xip_area 462672 462664 -8 -0.0
Full report (13 builds for bl602, cyw30739, k32w, linux, nrfconnect, telink)
platform target config section a494ddf 8eca981 change % change
bl602 lighting-app bl602 (read/write) 1380026 1380026 0 0.0
.bss 119746 119746 0 0.0
.data 4480 4480 0 0.0
.text 1048208 1048212 4 0.0
bl602+rpc (read/write) 1425274 1425282 8 0.0
.bss 127186 127186 0 0.0
.data 4600 4600 0 0.0
.text 1079708 1079712 4 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584750 584750 0 0.0
.app_xip_area 461560 461560 0 0.0
.bss 65632 65632 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 590646 590638 -8 -0.0
.app_xip_area 462672 462664 -8 -0.0
.bss 70416 70416 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 589874 589874 0 0.0
.app_xip_area 467492 467492 0 0.0
.bss 64880 64880 0 0.0
.data 688 688 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
k32w light k32w0+release (read/write) 644312 644312 0 0.0
.bss 69720 69720 0 0.0
.data 2044 2044 0 0.0
.text 569820 569820 0 0.0
lock k32w0+release (read/write) 701568 701568 0 0.0
.bss 70184 70184 0 0.0
.data 2052 2052 0 0.0
.text 626604 626604 0 0.0
linux chip-tool-ipv6only arm64 (read only) 9843900 9844636 736 0.0
(read/write) 694017 694017 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 639264 639264 0 0.0
.dynamic 560 560 0 0.0
.got 13624 13624 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 463052 463196 144 0.0
.text 7754020 7754612 592 0.0
thermostat-no-ble arm64 (read only) 2346556 2347324 768 0.0
(read/write) 141601 141601 0 0.0
.bss 55313 55313 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75832 75832 0 0.0
.dynamic 560 560 0 0.0
.got 5016 5016 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 139348 139492 144 0.1
.text 1969792 1970416 624 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177303 1177303 0 0.0
bss 143222 143222 0 0.0
rodata 142664 142664 0 0.0
text 812568 812568 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157359 1157359 0 0.0
bss 142460 142460 0 0.0
rodata 134360 134360 0 0.0
text 801724 801724 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 805592 805592 0 0.0
bss 70976 70976 0 0.0
noinit 43488 43488 0 0.0
text 569448 569448 0 0.0
lighting-app tlsr9518adk80d (read/write) 827264 827264 0 0.0
bss 71820 71820 0 0.0
noinit 43488 43488 0 0.0
text 587288 587288 0 0.0

@github-actions
Copy link

github-actions bot commented Aug 3, 2022

PR #21611: Size comparison from a494ddf to 1ba0288

Increases (16 builds for bl602, cc13x2_26x2, linux)
platform target config section a494ddf 1ba0288 change % change
bl602 lighting-app bl602+rpc (read/write) 1425274 1425282 8 0.0
.text 1079708 1079712 4 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 180876 180884 8 0.0
lock-mtd LP_CC2652R7 (read only) 655387 655395 8 0.0
.text 553512 553520 8 0.0
linux all-clusters-app debug (read only) 3018673 3019649 976 0.0
.rodata 272267 272427 160 0.1
.text 2567522 2568338 816 0.0
all-clusters-minimal-app debug (read only) 2860521 2861465 944 0.0
.rodata 272331 272459 128 0.0
.text 2411938 2412754 816 0.0
bridge-app debug+rpc (read only) 2366329 2367305 976 0.0
.rodata 203048 203208 160 0.1
.text 2000274 2001090 816 0.0
chip-tool debug (read only) 10435929 10436873 944 0.0
.rodata 530933 531061 128 0.0
.text 8409044 8409860 816 0.0
chip-tool-ipv6only arm64 (read only) 9843900 9844636 736 0.0
.rodata 463052 463196 144 0.0
.text 7754020 7754612 592 0.0
lighting-app debug+rpc (read only) 2589009 2589953 944 0.0
.rodata 218896 219024 128 0.1
.text 2199042 2199858 816 0.0
lock-app debug (read only) 2573209 2574169 960 0.0
.rodata 235824 235984 160 0.1
.text 2170370 2171170 800 0.0
ota-provider-app debug (read only) 2353313 2354257 944 0.0
.rodata 208952 209080 128 0.1
.text 1980482 1981298 816 0.0
ota-requestor-app debug (read only) 2473905 2474865 960 0.0
.rodata 212480 212640 160 0.1
.text 2088930 2089730 800 0.0
shell debug (read only) 2589897 2590873 976 0.0
.rodata 233202 233362 160 0.1
.text 2198466 2199282 816 0.0
thermostat-no-ble arm64 (read only) 2346556 2347324 768 0.0
.rodata 139348 139492 144 0.1
.text 1969792 1970416 624 0.0
tv-app debug (read only) 3159937 3160881 944 0.0
.rodata 256744 256872 128 0.0
.text 2713618 2714434 816 0.0
tv-casting-app debug (read only) 5397105 5398049 944 0.0
.rodata 340113 340241 128 0.0
.text 4789698 4790514 816 0.0
Decreases (5 builds for cc13x2_26x2, cyw30739, esp32)
platform target config section a494ddf 1ba0288 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 670507 670499 -8 -0.0
.text 581724 581716 -8 -0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 636035 636027 -8 -0.0
.text 557988 557980 -8 -0.0
lock-mtd LP_CC2652R7 (read/write) 181868 181860 -8 -0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584750 584742 -8 -0.0
.app_xip_area 461560 461552 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1025400 1025398 -2 -0.0
.flash.text 1025400 1025398 -2 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section a494ddf 1ba0288 change % change
bl602 lighting-app bl602 (read/write) 1380026 1380026 0 0.0
.bss 119746 119746 0 0.0
.data 4480 4480 0 0.0
.text 1048208 1048208 0 0.0
bl602+rpc (read/write) 1425274 1425282 8 0.0
.bss 127186 127186 0 0.0
.data 4600 4600 0 0.0
.text 1079708 1079712 4 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 670507 670499 -8 -0.0
(read/write) 180876 180884 8 0.0
.bss 74276 74276 0 0.0
.data 3372 3372 0 0.0
.rodata 88467 88467 0 0.0
.text 581724 581716 -8 -0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 636035 636027 -8 -0.0
(read/write) 157844 157844 0 0.0
.bss 73556 73556 0 0.0
.data 3372 3372 0 0.0
.rodata 77723 77723 0 0.0
.text 557988 557980 -8 -0.0
lock-ftd LP_CC2652R7 (read only) 672991 672991 0 0.0
(read/write) 168576 168576 0 0.0
.bss 71348 71348 0 0.0
.data 3296 3296 0 0.0
.rodata 76535 76535 0 0.0
.text 595976 595976 0 0.0
lock-mtd LP_CC2652R7 (read only) 655387 655395 8 0.0
(read/write) 181868 181860 -8 -0.0
.bss 67036 67036 0 0.0
.data 3296 3296 0 0.0
.rodata 101395 101395 0 0.0
.text 553512 553520 8 0.0
pump-app LP_CC2652R7 (read only) 682583 682583 0 0.0
(read/write) 159792 159792 0 0.0
.bss 71388 71388 0 0.0
.data 3296 3296 0 0.0
.rodata 89199 89199 0 0.0
.text 592900 592900 0 0.0
pump-controller-app LP_CC2652R7 (read only) 667047 667047 0 0.0
(read/write) 175464 175464 0 0.0
.bss 71524 71524 0 0.0
.data 3292 3292 0 0.0
.rodata 84743 84743 0 0.0
.text 581824 581824 0 0.0
shell LP_CC2652R7 (read only) 663174 663174 0 0.0
(read/write) 183728 183728 0 0.0
.bss 76596 76596 0 0.0
.data 3376 3376 0 0.0
.rodata 85414 85414 0 0.0
.text 577444 577444 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584750 584742 -8 -0.0
.app_xip_area 461560 461552 -8 -0.0
.bss 65632 65632 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 590646 590646 0 0.0
.app_xip_area 462672 462672 0 0.0
.bss 70416 70416 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 589874 589874 0 0.0
.app_xip_area 467492 467492 0 0.0
.bss 64880 64880 0 0.0
.data 688 688 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1090712 1090712 0 0.0
.bss 133292 133292 0 0.0
.data 2064 2064 0 0.0
.text 955336 955336 0 0.0
BRD4161A+rpc (read/write) 1145004 1145004 0 0.0
.bss 149972 149972 0 0.0
.data 2276 2276 0 0.0
.text 992736 992736 0 0.0
BRD4161A+rs911x (read/write) 977200 977200 0 0.0
.bss 161784 161784 0 0.0
.data 2052 2052 0 0.0
.text 813340 813340 0 0.0
lock-app BRD4161A+wf200 (read/write) 1130728 1130728 0 0.0
.bss 144416 144416 0 0.0
.data 2060 2060 0 0.0
.text 984228 984228 0 0.0
window-app BRD4161A (read/write) 1082460 1082460 0 0.0
.bss 134748 134748 0 0.0
.data 2092 2092 0 0.0
.text 945596 945596 0 0.0
esp32 all-clusters-app c3devkit (read only) 1025400 1025398 -2 -0.0
(read/write) 1487154 1487154 0 0.0
.dram0.bss 70336 70336 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216784 216784 0 0.0
.flash.text 1025400 1025398 -2 -0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1078859 1078859 0 0.0
(read/write) 489160 489160 0 0.0
.dram0.bss 75832 75832 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 247188 247188 0 0.0
.flash.text 1073475 1073475 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 644312 644312 0 0.0
.bss 69720 69720 0 0.0
.data 2044 2044 0 0.0
.text 569820 569820 0 0.0
lock k32w0+release (read/write) 701568 701568 0 0.0
.bss 70184 70184 0 0.0
.data 2052 2052 0 0.0
.text 626604 626604 0 0.0
linux all-clusters-app debug (read only) 3018673 3019649 976 0.0
(read/write) 155688 155688 0 0.0
.bss 61888 61888 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 85352 85352 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1152 1152 0 0.0
.rodata 272267 272427 160 0.1
.text 2567522 2568338 816 0.0
all-clusters-minimal-app debug (read only) 2860521 2861465 944 0.0
(read/write) 147488 147488 0 0.0
.bss 61152 61152 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77992 77992 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 272331 272459 128 0.0
.text 2411938 2412754 816 0.0
bridge-app debug+rpc (read only) 2366329 2367305 976 0.0
(read/write) 127584 127584 0 0.0
.bss 50592 50592 0 0.0
.data 3600 3600 0 0.0
.data.rel.ro 67544 67544 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 203048 203208 160 0.1
.text 2000274 2001090 816 0.0
chip-tool debug (read only) 10435929 10436873 944 0.0
(read/write) 646336 646336 0 0.0
.bss 24856 24856 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 611704 611704 0 0.0
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 530933 531061 128 0.0
.text 8409044 8409860 816 0.0
chip-tool-ipv6only arm64 (read only) 9843900 9844636 736 0.0
(read/write) 694017 694017 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 639264 639264 0 0.0
.dynamic 560 560 0 0.0
.got 13624 13624 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 463052 463196 144 0.0
.text 7754020 7754612 592 0.0
lighting-app debug+rpc (read only) 2589009 2589953 944 0.0
(read/write) 130232 130232 0 0.0
.bss 49728 49728 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72456 72456 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 912 912 0 0.0
.rodata 218896 219024 128 0.1
.text 2199042 2199858 816 0.0
lock-app debug (read only) 2573209 2574169 960 0.0
(read/write) 125568 125568 0 0.0
.bss 48256 48256 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69592 69592 0 0.0
.dynamic 608 608 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 235824 235984 160 0.1
.text 2170370 2171170 800 0.0
ota-provider-app debug (read only) 2353313 2354257 944 0.0
(read/write) 119048 119048 0 0.0
.bss 47808 47808 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63416 63416 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 208952 209080 128 0.1
.text 1980482 1981298 816 0.0
ota-requestor-app debug (read only) 2473905 2474865 960 0.0
(read/write) 126440 126440 0 0.0
.bss 50176 50176 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 68072 68072 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 212480 212640 160 0.1
.text 2088930 2089730 800 0.0
shell debug (read only) 2589897 2590873 976 0.0
(read/write) 141840 141840 0 0.0
.bss 57800 57800 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 76976 76976 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 1024 1024 0 0.0
.rodata 233202 233362 160 0.1
.text 2198466 2199282 816 0.0
thermostat-no-ble arm64 (read only) 2346556 2347324 768 0.0
(read/write) 141601 141601 0 0.0
.bss 55313 55313 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75832 75832 0 0.0
.dynamic 560 560 0 0.0
.got 5016 5016 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 139348 139492 144 0.1
.text 1969792 1970416 624 0.0
tv-app debug (read only) 3159937 3160881 944 0.0
(read/write) 257736 257736 0 0.0
.bss 167352 167352 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 79104 79104 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 256744 256872 128 0.0
.text 2713618 2714434 816 0.0
tv-casting-app debug (read only) 5397105 5398049 944 0.0
(read/write) 158728 158728 0 0.0
.bss 51384 51384 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98504 98504 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 340113 340241 128 0.0
.text 4789698 4790514 816 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2453288 2453288 0 0.0
.bss 214548 214548 0 0.0
.data 5872 5872 0 0.0
.text 1415932 1415932 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177303 1177303 0 0.0
bss 143222 143222 0 0.0
rodata 142664 142664 0 0.0
text 812568 812568 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157359 1157359 0 0.0
bss 142460 142460 0 0.0
rodata 134360 134360 0 0.0
text 801724 801724 0 0.0
p6 all-clusters-app default (read only) 881528 881528 0 0.0
(read/write) 1690316 1690316 0 0.0
.bss 149168 149168 0 0.0
.data 2648 2648 0 0.0
.text 1530112 1530112 0 0.0
all-clusters-minimal-app default (read only) 882248 882248 0 0.0
(read/write) 1634524 1634524 0 0.0
.bss 148448 148448 0 0.0
.data 2648 2648 0 0.0
.text 1475040 1475040 0 0.0
light-app default (read only) 890568 890568 0 0.0
(read/write) 1554812 1554812 0 0.0
.bss 140336 140336 0 0.0
.data 2440 2440 0 0.0
.text 1403648 1403648 0 0.0
lock-app default (read only) 886072 886072 0 0.0
(read/write) 1592084 1592084 0 0.0
.bss 144816 144816 0 0.0
.data 2456 2456 0 0.0
.text 1436424 1436424 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 805592 805592 0 0.0
bss 70976 70976 0 0.0
noinit 43488 43488 0 0.0
text 569448 569448 0 0.0
lighting-app tlsr9518adk80d (read/write) 827264 827264 0 0.0
bss 71820 71820 0 0.0
noinit 43488 43488 0 0.0
text 587288 587288 0 0.0

@woody-apple woody-apple merged commit 0103e8b into project-chip:master Aug 4, 2022
@bzbarsky-apple bzbarsky-apple deleted the listen-on-all-interfaces branch August 4, 2022 01:54
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
…mplementation. (project-chip#21611)

* Listen for group messages on all relevant interfaces in the sockets implementation.

We were listening on the "default" interface if MulticastGroupJoinLeave got
called for an enpoint that was bound to the wildcard interface.  But that does
not work in some situation (e.g. on Mac).

Instead, detect that we're dealing with the wildcard interface, and
explicitly iterate over all viable interfaces.

* Fix build on MbedOS.
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