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

Fix handling of short discriminator in Linux BLE scan. #21187

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

A few changes here:

  1. Implement a SetupDiscriminator class that commons up logic like "does this
    discriminator, which might be short or long, match the given long
    discriminator?" and "extract short discriminator from long discriminator".
  2. Change SetupPayload to more clearly indicate whether it's storing a short or
    long discriminator, instead of storing a short discriminator the same way as
    a long discriminator with the low bits all 0 and hoping consumers check
    isShortDiscriminator.
  3. Update BLE scanning APIs to take SetupDiscriminator.
  4. Fix the Linux and Tizen BLE code to properly handle short discriminators
    (which used to not match if the long discriminator happened to have the low 8
    bits nonzero).
  5. Fix the Darwin BLE code to properly handle long discriminators that have 0
    low bits. Before this change they used to incorrectly match a long
    discriminator which had the same 4 high bits but different 8 low bits.

Fixes #21160

Problem

See above.

Change overview

See above.

Testing

Ensured that BLE commissioning still works on Darwin (which is where I can test) and that chip-tool payload parsing commands work right.

@github-actions
Copy link

github-actions bot commented Jul 25, 2022

PR #21187: Size comparison from 1ff2174 to 39ebc91

Increases above 0.2%:

platform target config section 1ff2174 39ebc91 change % change
linux bridge-app debug+rpc .rodata 200168 200680 512 0.3
chip-tool debug .rodata 531637 532949 1312 0.2
lighting-app debug+rpc .rodata 215888 216368 480 0.2
ota-provider-app debug .rodata 205880 206328 448 0.2
ota-requestor-app debug .rodata 209440 209952 512 0.2
tv-app debug .rodata 251560 252392 832 0.3
tv-casting-app debug .rodata 335713 337633 1920 0.6
Increases (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 1ff2174 39ebc91 change % change
bl602 lighting-app bl602 (read/write) 1381914 1382018 104 0.0
.text 1051960 1052064 104 0.0
bl602+rpc (read/write) 1427322 1427434 112 0.0
.text 1083616 1083732 116 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668799 668839 40 0.0
.text 580100 580140 40 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 634391 634439 48 0.0
.text 556460 556508 48 0.0
lock-ftd LP_CC2652R7 (read only) 671915 671963 48 0.0
.text 594968 595016 48 0.0
lock-mtd LP_CC2652R7 (read only) 654175 654223 48 0.0
.text 552512 552560 48 0.0
pump-app LP_CC2652R7 (read only) 681599 681639 40 0.0
.text 591892 591932 40 0.0
pump-controller-app LP_CC2652R7 (read only) 667343 667383 40 0.0
.text 581808 581848 40 0.0
shell LP_CC2652R7 (read only) 661274 661314 40 0.0
.text 575796 575836 40 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583666 583698 32 0.0
.app_xip_area 460800 460832 32 0.0
lock cyw930739m2evb_01 (read/write) 589574 589614 40 0.0
.app_xip_area 461980 462020 40 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 588094 588134 40 0.0
.app_xip_area 466076 466116 40 0.0
efr32 lighting-app BRD4161A (read/write) 1088808 1088856 48 0.0
.text 953456 953504 48 0.0
BRD4161A+rpc (read/write) 1143100 1143132 32 0.0
.text 990860 990892 32 0.0
BRD4161A+rs911x (read/write) 953324 953372 48 0.0
.text 810264 810312 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128792 1128824 32 0.0
.text 982348 982380 32 0.0
window-app BRD4161A (read/write) 1082292 1082340 48 0.0
.text 945440 945488 48 0.0
esp32 all-clusters-app c3devkit (read only) 1022414 1022500 86 0.0
.flash.text 1022414 1022500 86 0.0
m5stack (read only) 1075999 1076099 100 0.0
.flash.text 1070615 1070715 100 0.0
k32w light k32w0+release (read/write) 641888 641920 32 0.0
.text 567404 567436 32 0.0
lock k32w0+release (read/write) 699192 699224 32 0.0
.text 624260 624292 32 0.0
linux all-clusters-app debug (read only) 2986273 2987361 1088 0.0
.rodata 267787 268299 512 0.2
.text 2540322 2540898 576 0.0
all-clusters-minimal-app debug (read only) 2829217 2830305 1088 0.0
.rodata 267851 268363 512 0.2
.text 2385810 2386386 576 0.0
bridge-app debug+rpc (read only) 2343601 2344689 1088 0.0
.rodata 200168 200680 512 0.3
.text 1981026 1981602 576 0.0
chip-tool debug (read only) 10384297 10386457 2160 0.0
.rodata 531637 532949 1312 0.2
.text 8401204 8402052 848 0.0
chip-tool-ipv6only arm64 (read only) 9808868 9810068 1200 0.0
.rodata 466356 466660 304 0.1
.text 7760308 7761204 896 0.0
lighting-app debug+rpc (read only) 2566705 2567761 1056 0.0
.rodata 215888 216368 480 0.2
.text 2180322 2180898 576 0.0
lock-app debug (read only) 2531745 2532753 1008 0.0
.rodata 230864 231312 448 0.2
.text 2135186 2135746 560 0.0
ota-provider-app debug (read only) 2335553 2336561 1008 0.0
.rodata 205880 206328 448 0.2
.text 1966370 1966930 560 0.0
ota-requestor-app debug (read only) 2453737 2454825 1088 0.0
.rodata 209440 209952 512 0.2
.text 2072594 2073170 576 0.0
shell debug (read only) 2569945 2570793 848 0.0
.rodata 230194 230514 320 0.1
.text 2182098 2182626 528 0.0
thermostat-no-ble arm64 (read only) 2342284 2342972 688 0.0
.rodata 139588 139764 176 0.1
.text 1965792 1966304 512 0.0
tv-app debug (read only) 3116753 3118225 1472 0.0
.rodata 251560 252392 832 0.3
.text 2676674 2677314 640 0.0
tv-casting-app debug (read only) 5371105 5373569 2464 0.0
.rodata 335713 337633 1920 0.6
.text 4768770 4769314 544 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2449472 2449536 64 0.0
.text 1412116 1412180 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177691 1177739 48 0.0
text 812940 812988 48 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157743 1157791 48 0.0
text 802248 802296 48 0.0
p6 all-clusters-app default (read/write) 1687532 1687580 48 0.0
.text 1527368 1527416 48 0.0
all-clusters-minimal-app default (read/write) 1631628 1631692 64 0.0
.text 1472184 1472248 64 0.0
light-app default (read/write) 1551724 1551788 64 0.0
.text 1400584 1400648 64 0.0
lock-app default (read/write) 1589316 1589364 48 0.0
.text 1433704 1433752 48 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799988 800028 40 0.0
text 567502 567544 42 0.0
lighting-app tlsr9518adk80d (read/write) 820072 820112 40 0.0
text 584054 584096 42 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section 1ff2174 39ebc91 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 182560 182520 -40 -0.0
lock-ftd LP_CC2652R7 (read/write) 169636 169588 -48 -0.0
lock-mtd LP_CC2652R7 (read/write) 183064 183016 -48 -0.0
pump-app LP_CC2652R7 (read/write) 160792 160752 -40 -0.0
pump-controller-app LP_CC2652R7 (read/write) 175184 175144 -40 -0.0
shell LP_CC2652R7 (read/write) 185604 185564 -40 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 1ff2174 39ebc91 change % change
bl602 lighting-app bl602 (read/write) 1381914 1382018 104 0.0
.bss 117538 117538 0 0.0
.data 4480 4480 0 0.0
.text 1051960 1052064 104 0.0
bl602+rpc (read/write) 1427322 1427434 112 0.0
.bss 124986 124986 0 0.0
.data 4600 4600 0 0.0
.text 1083616 1083732 116 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668799 668839 40 0.0
(read/write) 182560 182520 -40 -0.0
.bss 74252 74252 0 0.0
.data 3356 3356 0 0.0
.rodata 88383 88383 0 0.0
.text 580100 580140 40 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 634391 634439 48 0.0
(read/write) 157820 157820 0 0.0
.bss 73548 73548 0 0.0
.data 3356 3356 0 0.0
.rodata 77607 77607 0 0.0
.text 556460 556508 48 0.0
lock-ftd LP_CC2652R7 (read only) 671915 671963 48 0.0
(read/write) 169636 169588 -48 -0.0
.bss 71332 71332 0 0.0
.data 3280 3280 0 0.0
.rodata 76467 76467 0 0.0
.text 594968 595016 48 0.0
lock-mtd LP_CC2652R7 (read only) 654175 654223 48 0.0
(read/write) 183064 183016 -48 -0.0
.bss 67020 67020 0 0.0
.data 3280 3280 0 0.0
.rodata 101183 101183 0 0.0
.text 552512 552560 48 0.0
pump-app LP_CC2652R7 (read only) 681599 681639 40 0.0
(read/write) 160792 160752 -40 -0.0
.bss 71404 71404 0 0.0
.data 3280 3280 0 0.0
.rodata 89223 89223 0 0.0
.text 591892 591932 40 0.0
pump-controller-app LP_CC2652R7 (read only) 667343 667383 40 0.0
(read/write) 175184 175144 -40 -0.0
.bss 71540 71540 0 0.0
.data 3276 3276 0 0.0
.rodata 85055 85055 0 0.0
.text 581808 581848 40 0.0
shell LP_CC2652R7 (read only) 661274 661314 40 0.0
(read/write) 185604 185564 -40 -0.0
.bss 76572 76572 0 0.0
.data 3360 3360 0 0.0
.rodata 85162 85162 0 0.0
.text 575796 575836 40 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583666 583698 32 0.0
.app_xip_area 460800 460832 32 0.0
.bss 65660 65660 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 589574 589614 40 0.0
.app_xip_area 461980 462020 40 0.0
.bss 70388 70388 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 588094 588134 40 0.0
.app_xip_area 466076 466116 40 0.0
.bss 64868 64868 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1088808 1088856 48 0.0
.bss 133284 133284 0 0.0
.data 2048 2048 0 0.0
.text 953456 953504 48 0.0
BRD4161A+rpc (read/write) 1143100 1143132 32 0.0
.bss 149956 149956 0 0.0
.data 2260 2260 0 0.0
.text 990860 990892 32 0.0
BRD4161A+rs911x (read/write) 953324 953372 48 0.0
.bss 140992 140992 0 0.0
.data 2048 2048 0 0.0
.text 810264 810312 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128792 1128824 32 0.0
.bss 144368 144368 0 0.0
.data 2056 2056 0 0.0
.text 982348 982380 32 0.0
window-app BRD4161A (read/write) 1082292 1082340 48 0.0
.bss 134756 134756 0 0.0
.data 2076 2076 0 0.0
.text 945440 945488 48 0.0
esp32 all-clusters-app c3devkit (read only) 1022414 1022500 86 0.0
(read/write) 1486618 1486618 0 0.0
.dram0.bss 70288 70288 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216296 216296 0 0.0
.flash.text 1022414 1022500 86 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1075999 1076099 100 0.0
(read/write) 488624 488624 0 0.0
.dram0.bss 75808 75808 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246676 246676 0 0.0
.flash.text 1070615 1070715 100 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 641888 641920 32 0.0
.bss 69728 69728 0 0.0
.data 2028 2028 0 0.0
.text 567404 567436 32 0.0
lock k32w0+release (read/write) 699192 699224 32 0.0
.bss 70168 70168 0 0.0
.data 2036 2036 0 0.0
.text 624260 624292 32 0.0
linux all-clusters-app debug (read only) 2986273 2987361 1088 0.0
(read/write) 155408 155408 0 0.0
.bss 61856 61856 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 85224 85224 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 267787 268299 512 0.2
.text 2540322 2540898 576 0.0
all-clusters-minimal-app debug (read only) 2829217 2830305 1088 0.0
(read/write) 147112 147112 0 0.0
.bss 61056 61056 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77816 77816 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1056 1056 0 0.0
.rodata 267851 268363 512 0.2
.text 2385810 2386386 576 0.0
bridge-app debug+rpc (read only) 2343601 2344689 1088 0.0
(read/write) 127016 127016 0 0.0
.bss 50144 50144 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 67272 67272 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 200168 200680 512 0.3
.text 1981026 1981602 576 0.0
chip-tool debug (read only) 10384297 10386457 2160 0.0
(read/write) 631048 631048 0 0.0
.bss 24824 24824 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 596568 596568 0 0.0
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 531637 532949 1312 0.2
.text 8401204 8402052 848 0.0
chip-tool-ipv6only arm64 (read only) 9808868 9810068 1200 0.0
(read/write) 678561 678561 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 623904 623904 0 0.0
.dynamic 560 560 0 0.0
.got 13536 13536 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 466356 466660 304 0.1
.text 7760308 7761204 896 0.0
lighting-app debug+rpc (read only) 2566705 2567761 1056 0.0
(read/write) 129984 129984 0 0.0
.bss 49696 49696 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72328 72328 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 215888 216368 480 0.2
.text 2180322 2180898 576 0.0
lock-app debug (read only) 2531745 2532753 1008 0.0
(read/write) 124968 124968 0 0.0
.bss 48096 48096 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69304 69304 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 230864 231312 448 0.2
.text 2135186 2135746 560 0.0
ota-provider-app debug (read only) 2335553 2336561 1008 0.0
(read/write) 118768 118768 0 0.0
.bss 47744 47744 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63288 63288 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 680 680 0 0.0
.rodata 205880 206328 448 0.2
.text 1966370 1966930 560 0.0
ota-requestor-app debug (read only) 2453737 2454825 1088 0.0
(read/write) 125672 125672 0 0.0
.bss 50080 50080 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 67512 67512 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 209440 209952 512 0.2
.text 2072594 2073170 576 0.0
shell debug (read only) 2569945 2570793 848 0.0
(read/write) 141496 141496 0 0.0
.bss 57672 57672 0 0.0
.data 1248 1248 0 0.0
.data.rel.ro 76888 76888 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 230194 230514 320 0.1
.text 2182098 2182626 528 0.0
thermostat-no-ble arm64 (read only) 2342284 2342972 688 0.0
(read/write) 141345 141345 0 0.0
.bss 55297 55297 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75624 75624 0 0.0
.dynamic 560 560 0 0.0
.got 4984 4984 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 139588 139764 176 0.1
.text 1965792 1966304 512 0.0
tv-app debug (read only) 3116753 3118225 1472 0.0
(read/write) 257120 257120 0 0.0
.bss 167128 167128 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 78824 78824 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 251560 252392 832 0.3
.text 2676674 2677314 640 0.0
tv-casting-app debug (read only) 5371105 5373569 2464 0.0
(read/write) 158424 158424 0 0.0
.bss 51320 51320 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98384 98384 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 335713 337633 1920 0.6
.text 4768770 4769314 544 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2449472 2449536 64 0.0
.bss 214508 214508 0 0.0
.data 5872 5872 0 0.0
.text 1412116 1412180 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177691 1177739 48 0.0
bss 143132 143132 0 0.0
rodata 142692 142692 0 0.0
text 812940 812988 48 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157743 1157791 48 0.0
bss 142368 142368 0 0.0
rodata 134224 134224 0 0.0
text 802248 802296 48 0.0
p6 all-clusters-app default (read only) 881568 881568 0 0.0
(read/write) 1687532 1687580 48 0.0
.bss 149128 149128 0 0.0
.data 2648 2648 0 0.0
.text 1527368 1527416 48 0.0
all-clusters-minimal-app default (read only) 882288 882288 0 0.0
(read/write) 1631628 1631692 64 0.0
.bss 148408 148408 0 0.0
.data 2648 2648 0 0.0
.text 1472184 1472248 64 0.0
light-app default (read only) 890592 890592 0 0.0
(read/write) 1551724 1551788 64 0.0
.bss 140312 140312 0 0.0
.data 2440 2440 0 0.0
.text 1400584 1400648 64 0.0
lock-app default (read only) 886120 886120 0 0.0
(read/write) 1589316 1589364 48 0.0
.bss 144768 144768 0 0.0
.data 2456 2456 0 0.0
.text 1433704 1433752 48 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799988 800028 40 0.0
bss 70808 70808 0 0.0
noinit 40416 40416 0 0.0
text 567502 567544 42 0.0
lighting-app tlsr9518adk80d (read/write) 820072 820112 40 0.0
bss 71652 71652 0 0.0
noinit 40416 40416 0 0.0
text 584054 584096 42 0.0

@bzbarsky-apple bzbarsky-apple force-pushed the fix-ble-short-discriminator branch from 39ebc91 to fce79f0 Compare July 26, 2022 03:38
@github-actions
Copy link

github-actions bot commented Jul 26, 2022

PR #21187: Size comparison from 2987329 to fce79f0

Increases above 0.2%:

platform target config section 2987329 fce79f0 change % change
linux bridge-app debug+rpc .rodata 200008 200520 512 0.3
chip-tool debug .rodata 531477 532789 1312 0.2
lighting-app debug+rpc .rodata 215728 216208 480 0.2
ota-provider-app debug .rodata 205688 206168 480 0.2
ota-requestor-app debug .rodata 209248 209760 512 0.2
tv-app debug .rodata 251400 252232 832 0.3
tv-casting-app debug .rodata 335521 337441 1920 0.6
Increases (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 2987329 fce79f0 change % change
bl602 lighting-app bl602 (read/write) 1381762 1381858 96 0.0
.text 1051808 1051908 100 0.0
bl602+rpc (read/write) 1427170 1427282 112 0.0
.text 1083464 1083576 112 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668791 668831 40 0.0
.text 580084 580124 40 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 634391 634431 40 0.0
.text 556452 556492 40 0.0
lock-ftd LP_CC2652R7 (read only) 671907 671955 48 0.0
.text 594952 595000 48 0.0
lock-mtd LP_CC2652R7 (read only) 654167 654215 48 0.0
.text 552504 552552 48 0.0
pump-app LP_CC2652R7 (read only) 681579 681619 40 0.0
.text 591876 591916 40 0.0
pump-controller-app LP_CC2652R7 (read only) 667331 667371 40 0.0
.text 581792 581832 40 0.0
shell LP_CC2652R7 (read only) 661250 661298 48 0.0
.text 575772 575820 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583642 583666 24 0.0
.app_xip_area 460780 460804 24 0.0
lock cyw930739m2evb_01 (read/write) 589554 589594 40 0.0
.app_xip_area 461964 462004 40 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 588078 588110 32 0.0
.app_xip_area 466064 466096 32 0.0
efr32 lighting-app BRD4161A (read/write) 1088680 1088728 48 0.0
.text 953336 953384 48 0.0
BRD4161A+rpc (read/write) 1142980 1143028 48 0.0
.text 990744 990792 48 0.0
BRD4161A+rs911x (read/write) 953224 953272 48 0.0
.text 810164 810212 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128668 1128700 32 0.0
.text 982232 982264 32 0.0
window-app BRD4161A (read/write) 1082172 1082220 48 0.0
.text 945324 945372 48 0.0
esp32 all-clusters-app c3devkit (read only) 1022416 1022504 88 0.0
.flash.text 1022416 1022504 88 0.0
m5stack (read only) 1075959 1076059 100 0.0
.flash.text 1070575 1070675 100 0.0
k32w light k32w0+release (read/write) 641876 641924 48 0.0
.text 567392 567440 48 0.0
lock k32w0+release (read/write) 699180 699212 32 0.0
.text 624248 624280 32 0.0
linux all-clusters-app debug (read only) 2986169 2987241 1072 0.0
.rodata 267627 268139 512 0.2
.text 2540354 2540914 560 0.0
all-clusters-minimal-app debug (read only) 2829081 2830153 1072 0.0
.rodata 267659 268171 512 0.2
.text 2385842 2386402 560 0.0
bridge-app debug+rpc (read only) 2343497 2344585 1088 0.0
.rodata 200008 200520 512 0.3
.text 1981058 1981634 576 0.0
chip-tool debug (read only) 10384193 10386337 2144 0.0
.rodata 531477 532789 1312 0.2
.text 8401236 8402068 832 0.0
chip-tool-ipv6only arm64 (read only) 9808692 9809876 1184 0.0
.rodata 466244 466532 288 0.1
.text 7760244 7761140 896 0.0
lighting-app debug+rpc (read only) 2566601 2567657 1056 0.0
.rodata 215728 216208 480 0.2
.text 2180354 2180930 576 0.0
lock-app debug (read only) 2531625 2532649 1024 0.0
.rodata 230704 231152 448 0.2
.text 2135202 2135778 576 0.0
ota-provider-app debug (read only) 2335401 2336457 1056 0.0
.rodata 205688 206168 480 0.2
.text 1966386 1966962 576 0.0
ota-requestor-app debug (read only) 2453601 2454689 1088 0.0
.rodata 209248 209760 512 0.2
.text 2072626 2073202 576 0.0
shell debug (read only) 2569825 2570689 864 0.0
.rodata 230034 230354 320 0.1
.text 2182114 2182658 544 0.0
thermostat-no-ble arm64 (read only) 2342092 2342780 688 0.0
.rodata 139460 139636 176 0.1
.text 1965728 1966240 512 0.0
tv-app debug (read only) 3116649 3118105 1456 0.0
.rodata 251400 252232 832 0.3
.text 2676706 2677330 624 0.0
tv-casting-app debug (read only) 5370969 5373433 2464 0.0
.rodata 335521 337441 1920 0.6
.text 4768802 4769346 544 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2449472 2449536 64 0.0
.text 1412116 1412180 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177675 1177723 48 0.0
text 812924 812972 48 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157727 1157775 48 0.0
text 802232 802280 48 0.0
p6 all-clusters-app default (read/write) 1687524 1687572 48 0.0
.text 1527360 1527408 48 0.0
all-clusters-minimal-app default (read/write) 1631636 1631684 48 0.0
.text 1472192 1472240 48 0.0
light-app default (read/write) 1551708 1551756 48 0.0
.text 1400568 1400616 48 0.0
lock-app default (read/write) 1589300 1589348 48 0.0
.text 1433688 1433736 48 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799980 800020 40 0.0
text 567494 567536 42 0.0
lighting-app tlsr9518adk80d (read/write) 820064 820104 40 0.0
text 584046 584088 42 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section 2987329 fce79f0 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 182568 182528 -40 -0.0
lock-ftd LP_CC2652R7 (read/write) 169644 169596 -48 -0.0
lock-mtd LP_CC2652R7 (read/write) 183072 183024 -48 -0.0
pump-app LP_CC2652R7 (read/write) 160804 160764 -40 -0.0
pump-controller-app LP_CC2652R7 (read/write) 175188 175148 -40 -0.0
shell LP_CC2652R7 (read/write) 185628 185580 -48 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 2987329 fce79f0 change % change
bl602 lighting-app bl602 (read/write) 1381762 1381858 96 0.0
.bss 117538 117538 0 0.0
.data 4480 4480 0 0.0
.text 1051808 1051908 100 0.0
bl602+rpc (read/write) 1427170 1427282 112 0.0
.bss 124978 124978 0 0.0
.data 4600 4600 0 0.0
.text 1083464 1083576 112 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668791 668831 40 0.0
(read/write) 182568 182528 -40 -0.0
.bss 74252 74252 0 0.0
.data 3356 3356 0 0.0
.rodata 88391 88391 0 0.0
.text 580084 580124 40 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 634391 634431 40 0.0
(read/write) 157820 157820 0 0.0
.bss 73548 73548 0 0.0
.data 3356 3356 0 0.0
.rodata 77615 77615 0 0.0
.text 556452 556492 40 0.0
lock-ftd LP_CC2652R7 (read only) 671907 671955 48 0.0
(read/write) 169644 169596 -48 -0.0
.bss 71332 71332 0 0.0
.data 3280 3280 0 0.0
.rodata 76475 76475 0 0.0
.text 594952 595000 48 0.0
lock-mtd LP_CC2652R7 (read only) 654167 654215 48 0.0
(read/write) 183072 183024 -48 -0.0
.bss 67020 67020 0 0.0
.data 3280 3280 0 0.0
.rodata 101183 101183 0 0.0
.text 552504 552552 48 0.0
pump-app LP_CC2652R7 (read only) 681579 681619 40 0.0
(read/write) 160804 160764 -40 -0.0
.bss 71396 71396 0 0.0
.data 3280 3280 0 0.0
.rodata 89219 89219 0 0.0
.text 591876 591916 40 0.0
pump-controller-app LP_CC2652R7 (read only) 667331 667371 40 0.0
(read/write) 175188 175148 -40 -0.0
.bss 71532 71532 0 0.0
.data 3276 3276 0 0.0
.rodata 85059 85059 0 0.0
.text 581792 581832 40 0.0
shell LP_CC2652R7 (read only) 661250 661298 48 0.0
(read/write) 185628 185580 -48 -0.0
.bss 76572 76572 0 0.0
.data 3360 3360 0 0.0
.rodata 85162 85162 0 0.0
.text 575772 575820 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583642 583666 24 0.0
.app_xip_area 460780 460804 24 0.0
.bss 65656 65656 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 589554 589594 40 0.0
.app_xip_area 461964 462004 40 0.0
.bss 70384 70384 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 588078 588110 32 0.0
.app_xip_area 466064 466096 32 0.0
.bss 64864 64864 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1088680 1088728 48 0.0
.bss 133276 133276 0 0.0
.data 2048 2048 0 0.0
.text 953336 953384 48 0.0
BRD4161A+rpc (read/write) 1142980 1143028 48 0.0
.bss 149956 149956 0 0.0
.data 2260 2260 0 0.0
.text 990744 990792 48 0.0
BRD4161A+rs911x (read/write) 953224 953272 48 0.0
.bss 140992 140992 0 0.0
.data 2048 2048 0 0.0
.text 810164 810212 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128668 1128700 32 0.0
.bss 144360 144360 0 0.0
.data 2056 2056 0 0.0
.text 982232 982264 32 0.0
window-app BRD4161A (read/write) 1082172 1082220 48 0.0
.bss 134748 134748 0 0.0
.data 2076 2076 0 0.0
.text 945324 945372 48 0.0
esp32 all-clusters-app c3devkit (read only) 1022416 1022504 88 0.0
(read/write) 1486618 1486618 0 0.0
.dram0.bss 70288 70288 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216296 216296 0 0.0
.flash.text 1022416 1022504 88 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1075959 1076059 100 0.0
(read/write) 488616 488616 0 0.0
.dram0.bss 75800 75800 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246676 246676 0 0.0
.flash.text 1070575 1070675 100 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 641876 641924 48 0.0
.bss 69728 69728 0 0.0
.data 2028 2028 0 0.0
.text 567392 567440 48 0.0
lock k32w0+release (read/write) 699180 699212 32 0.0
.bss 70168 70168 0 0.0
.data 2036 2036 0 0.0
.text 624248 624280 32 0.0
linux all-clusters-app debug (read only) 2986169 2987241 1072 0.0
(read/write) 155416 155416 0 0.0
.bss 61856 61856 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 85224 85224 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1072 1072 0 0.0
.rodata 267627 268139 512 0.2
.text 2540354 2540914 560 0.0
all-clusters-minimal-app debug (read only) 2829081 2830153 1072 0.0
(read/write) 147120 147120 0 0.0
.bss 61056 61056 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77816 77816 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 267659 268171 512 0.2
.text 2385842 2386402 560 0.0
bridge-app debug+rpc (read only) 2343497 2344585 1088 0.0
(read/write) 127024 127024 0 0.0
.bss 50144 50144 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 67272 67272 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 744 744 0 0.0
.rodata 200008 200520 512 0.3
.text 1981058 1981634 576 0.0
chip-tool debug (read only) 10384193 10386337 2144 0.0
(read/write) 631056 631056 0 0.0
.bss 24824 24824 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 596568 596568 0 0.0
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 531477 532789 1312 0.2
.text 8401236 8402068 832 0.0
chip-tool-ipv6only arm64 (read only) 9808692 9809876 1184 0.0
(read/write) 678561 678561 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 623904 623904 0 0.0
.dynamic 560 560 0 0.0
.got 13536 13536 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 466244 466532 288 0.1
.text 7760244 7761140 896 0.0
lighting-app debug+rpc (read only) 2566601 2567657 1056 0.0
(read/write) 129992 129992 0 0.0
.bss 49696 49696 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72328 72328 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 215728 216208 480 0.2
.text 2180354 2180930 576 0.0
lock-app debug (read only) 2531625 2532649 1024 0.0
(read/write) 124976 124976 0 0.0
.bss 48096 48096 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69304 69304 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 808 808 0 0.0
.rodata 230704 231152 448 0.2
.text 2135202 2135778 576 0.0
ota-provider-app debug (read only) 2335401 2336457 1056 0.0
(read/write) 118776 118776 0 0.0
.bss 47744 47744 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63288 63288 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 688 688 0 0.0
.rodata 205688 206168 480 0.2
.text 1966386 1966962 576 0.0
ota-requestor-app debug (read only) 2453601 2454689 1088 0.0
(read/write) 125680 125680 0 0.0
.bss 50080 50080 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 67512 67512 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 744 744 0 0.0
.rodata 209248 209760 512 0.2
.text 2072626 2073202 576 0.0
shell debug (read only) 2569825 2570689 864 0.0
(read/write) 141568 141568 0 0.0
.bss 57704 57704 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 76888 76888 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 944 944 0 0.0
.rodata 230034 230354 320 0.1
.text 2182114 2182658 544 0.0
thermostat-no-ble arm64 (read only) 2342092 2342780 688 0.0
(read/write) 141345 141345 0 0.0
.bss 55297 55297 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75624 75624 0 0.0
.dynamic 560 560 0 0.0
.got 4984 4984 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 139460 139636 176 0.1
.text 1965728 1966240 512 0.0
tv-app debug (read only) 3116649 3118105 1456 0.0
(read/write) 257160 257160 0 0.0
.bss 167160 167160 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 78824 78824 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 968 968 0 0.0
.rodata 251400 252232 832 0.3
.text 2676706 2677330 624 0.0
tv-casting-app debug (read only) 5370969 5373433 2464 0.0
(read/write) 158432 158432 0 0.0
.bss 51320 51320 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98384 98384 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 335521 337441 1920 0.6
.text 4768802 4769346 544 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2449472 2449536 64 0.0
.bss 214508 214508 0 0.0
.data 5872 5872 0 0.0
.text 1412116 1412180 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177675 1177723 48 0.0
bss 143132 143132 0 0.0
rodata 142692 142692 0 0.0
text 812924 812972 48 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157727 1157775 48 0.0
bss 142368 142368 0 0.0
rodata 134224 134224 0 0.0
text 802232 802280 48 0.0
p6 all-clusters-app default (read only) 881568 881568 0 0.0
(read/write) 1687524 1687572 48 0.0
.bss 149128 149128 0 0.0
.data 2648 2648 0 0.0
.text 1527360 1527408 48 0.0
all-clusters-minimal-app default (read only) 882288 882288 0 0.0
(read/write) 1631636 1631684 48 0.0
.bss 148408 148408 0 0.0
.data 2648 2648 0 0.0
.text 1472192 1472240 48 0.0
light-app default (read only) 890592 890592 0 0.0
(read/write) 1551708 1551756 48 0.0
.bss 140312 140312 0 0.0
.data 2440 2440 0 0.0
.text 1400568 1400616 48 0.0
lock-app default (read only) 886120 886120 0 0.0
(read/write) 1589300 1589348 48 0.0
.bss 144768 144768 0 0.0
.data 2456 2456 0 0.0
.text 1433688 1433736 48 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799980 800020 40 0.0
bss 70808 70808 0 0.0
noinit 40416 40416 0 0.0
text 567494 567536 42 0.0
lighting-app tlsr9518adk80d (read/write) 820064 820104 40 0.0
bss 71652 71652 0 0.0
noinit 40416 40416 0 0.0
text 584046 584088 42 0.0

@bzbarsky-apple bzbarsky-apple force-pushed the fix-ble-short-discriminator branch from 0afbe29 to f84e2d4 Compare July 26, 2022 13:29
@github-actions
Copy link

github-actions bot commented Jul 26, 2022

PR #21187: Size comparison from 925cff6 to f84e2d4

Increases above 0.2%:

platform target config section 925cff6 f84e2d4 change % change
linux bridge-app debug+rpc .rodata 200008 200520 512 0.3
chip-tool debug .rodata 531477 532789 1312 0.2
lighting-app debug+rpc .rodata 215728 216208 480 0.2
ota-provider-app debug .rodata 205688 206168 480 0.2
ota-requestor-app debug .rodata 209664 210176 512 0.2
tv-app debug .rodata 251400 252232 832 0.3
tv-casting-app debug .rodata 335521 337441 1920 0.6
Increases (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 925cff6 f84e2d4 change % change
bl602 lighting-app bl602 (read/write) 1381762 1381866 104 0.0
.text 1051808 1051912 104 0.0
bl602+rpc (read/write) 1427170 1427282 112 0.0
.text 1083464 1083576 112 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668791 668831 40 0.0
.text 580084 580124 40 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 634391 634431 40 0.0
.text 556452 556492 40 0.0
lock-ftd LP_CC2652R7 (read only) 671907 671955 48 0.0
.text 594952 595000 48 0.0
lock-mtd LP_CC2652R7 (read only) 654167 654215 48 0.0
.text 552504 552552 48 0.0
pump-app LP_CC2652R7 (read only) 681579 681619 40 0.0
.text 591876 591916 40 0.0
pump-controller-app LP_CC2652R7 (read only) 667331 667371 40 0.0
.text 581792 581832 40 0.0
shell LP_CC2652R7 (read only) 661258 661298 40 0.0
.text 575780 575820 40 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583642 583674 32 0.0
.app_xip_area 460780 460812 32 0.0
lock cyw930739m2evb_01 (read/write) 589554 589594 40 0.0
.app_xip_area 461964 462004 40 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 589454 589486 32 0.0
.app_xip_area 467408 467440 32 0.0
efr32 lighting-app BRD4161A (read/write) 1088680 1088728 48 0.0
.text 953336 953384 48 0.0
BRD4161A+rpc (read/write) 1142980 1143028 48 0.0
.text 990744 990792 48 0.0
BRD4161A+rs911x (read/write) 953224 953272 48 0.0
.text 810164 810212 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128668 1128700 32 0.0
.text 982232 982264 32 0.0
window-app BRD4161A (read/write) 1082172 1082220 48 0.0
.text 945324 945372 48 0.0
esp32 all-clusters-app c3devkit (read only) 1022414 1022504 90 0.0
.flash.text 1022414 1022504 90 0.0
m5stack (read only) 1075959 1076059 100 0.0
.flash.text 1070575 1070675 100 0.0
k32w light k32w0+release (read/write) 641876 641924 48 0.0
.text 567392 567440 48 0.0
lock k32w0+release (read/write) 699180 699212 32 0.0
.text 624248 624280 32 0.0
linux all-clusters-app debug (read only) 2986169 2987241 1072 0.0
.rodata 267627 268139 512 0.2
.text 2540354 2540914 560 0.0
all-clusters-minimal-app debug (read only) 2829081 2830153 1072 0.0
.rodata 267659 268171 512 0.2
.text 2385842 2386402 560 0.0
bridge-app debug+rpc (read only) 2343497 2344585 1088 0.0
.rodata 200008 200520 512 0.3
.text 1981058 1981634 576 0.0
chip-tool debug (read only) 10384369 10386529 2160 0.0
.rodata 531477 532789 1312 0.2
.text 8401412 8402260 848 0.0
chip-tool-ipv6only arm64 (read only) 9808852 9810020 1168 0.0
.rodata 466244 466532 288 0.1
.text 7760404 7761284 880 0.0
lighting-app debug+rpc (read only) 2566601 2567657 1056 0.0
.rodata 215728 216208 480 0.2
.text 2180354 2180930 576 0.0
lock-app debug (read only) 2531625 2532649 1024 0.0
.rodata 230704 231152 448 0.2
.text 2135202 2135778 576 0.0
ota-provider-app debug (read only) 2335401 2336457 1056 0.0
.rodata 205688 206168 480 0.2
.text 1966386 1966962 576 0.0
ota-requestor-app debug (read only) 2460809 2461897 1088 0.0
.rodata 209664 210176 512 0.2
.text 2079202 2079778 576 0.0
shell debug (read only) 2569825 2570689 864 0.0
.rodata 230034 230354 320 0.1
.text 2182114 2182658 544 0.0
thermostat-no-ble arm64 (read only) 2342092 2342780 688 0.0
.rodata 139460 139636 176 0.1
.text 1965728 1966240 512 0.0
tv-app debug (read only) 3116649 3118105 1456 0.0
.rodata 251400 252232 832 0.3
.text 2676706 2677330 624 0.0
tv-casting-app debug (read only) 5370969 5373433 2464 0.0
.rodata 335521 337441 1920 0.6
.text 4768802 4769346 544 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2449472 2449536 64 0.0
.text 1412116 1412180 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177675 1177723 48 0.0
text 812924 812972 48 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157727 1157775 48 0.0
text 802232 802280 48 0.0
p6 all-clusters-app default (read/write) 1687524 1687572 48 0.0
.text 1527360 1527408 48 0.0
all-clusters-minimal-app default (read/write) 1631636 1631684 48 0.0
.text 1472192 1472240 48 0.0
light-app default (read/write) 1551708 1551756 48 0.0
.text 1400568 1400616 48 0.0
lock-app default (read/write) 1589300 1589348 48 0.0
.text 1433688 1433736 48 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799980 800028 48 0.0
text 567492 567538 46 0.0
lighting-app tlsr9518adk80d (read/write) 820064 820104 40 0.0
text 584048 584088 40 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section 925cff6 f84e2d4 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 182568 182528 -40 -0.0
lock-ftd LP_CC2652R7 (read/write) 169644 169596 -48 -0.0
lock-mtd LP_CC2652R7 (read/write) 183072 183024 -48 -0.0
pump-app LP_CC2652R7 (read/write) 160804 160764 -40 -0.0
pump-controller-app LP_CC2652R7 (read/write) 175188 175148 -40 -0.0
shell LP_CC2652R7 (read/write) 185620 185580 -40 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 925cff6 f84e2d4 change % change
bl602 lighting-app bl602 (read/write) 1381762 1381866 104 0.0
.bss 117538 117538 0 0.0
.data 4480 4480 0 0.0
.text 1051808 1051912 104 0.0
bl602+rpc (read/write) 1427170 1427282 112 0.0
.bss 124978 124978 0 0.0
.data 4600 4600 0 0.0
.text 1083464 1083576 112 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668791 668831 40 0.0
(read/write) 182568 182528 -40 -0.0
.bss 74252 74252 0 0.0
.data 3356 3356 0 0.0
.rodata 88391 88391 0 0.0
.text 580084 580124 40 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 634391 634431 40 0.0
(read/write) 157820 157820 0 0.0
.bss 73548 73548 0 0.0
.data 3356 3356 0 0.0
.rodata 77615 77615 0 0.0
.text 556452 556492 40 0.0
lock-ftd LP_CC2652R7 (read only) 671907 671955 48 0.0
(read/write) 169644 169596 -48 -0.0
.bss 71332 71332 0 0.0
.data 3280 3280 0 0.0
.rodata 76475 76475 0 0.0
.text 594952 595000 48 0.0
lock-mtd LP_CC2652R7 (read only) 654167 654215 48 0.0
(read/write) 183072 183024 -48 -0.0
.bss 67020 67020 0 0.0
.data 3280 3280 0 0.0
.rodata 101183 101183 0 0.0
.text 552504 552552 48 0.0
pump-app LP_CC2652R7 (read only) 681579 681619 40 0.0
(read/write) 160804 160764 -40 -0.0
.bss 71396 71396 0 0.0
.data 3280 3280 0 0.0
.rodata 89219 89219 0 0.0
.text 591876 591916 40 0.0
pump-controller-app LP_CC2652R7 (read only) 667331 667371 40 0.0
(read/write) 175188 175148 -40 -0.0
.bss 71532 71532 0 0.0
.data 3276 3276 0 0.0
.rodata 85059 85059 0 0.0
.text 581792 581832 40 0.0
shell LP_CC2652R7 (read only) 661258 661298 40 0.0
(read/write) 185620 185580 -40 -0.0
.bss 76572 76572 0 0.0
.data 3360 3360 0 0.0
.rodata 85162 85162 0 0.0
.text 575780 575820 40 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583642 583674 32 0.0
.app_xip_area 460780 460812 32 0.0
.bss 65656 65656 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 589554 589594 40 0.0
.app_xip_area 461964 462004 40 0.0
.bss 70384 70384 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 589454 589486 32 0.0
.app_xip_area 467408 467440 32 0.0
.bss 64896 64896 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1088680 1088728 48 0.0
.bss 133276 133276 0 0.0
.data 2048 2048 0 0.0
.text 953336 953384 48 0.0
BRD4161A+rpc (read/write) 1142980 1143028 48 0.0
.bss 149956 149956 0 0.0
.data 2260 2260 0 0.0
.text 990744 990792 48 0.0
BRD4161A+rs911x (read/write) 953224 953272 48 0.0
.bss 140992 140992 0 0.0
.data 2048 2048 0 0.0
.text 810164 810212 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128668 1128700 32 0.0
.bss 144360 144360 0 0.0
.data 2056 2056 0 0.0
.text 982232 982264 32 0.0
window-app BRD4161A (read/write) 1082172 1082220 48 0.0
.bss 134748 134748 0 0.0
.data 2076 2076 0 0.0
.text 945324 945372 48 0.0
esp32 all-clusters-app c3devkit (read only) 1022414 1022504 90 0.0
(read/write) 1486618 1486618 0 0.0
.dram0.bss 70288 70288 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216296 216296 0 0.0
.flash.text 1022414 1022504 90 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1075959 1076059 100 0.0
(read/write) 488616 488616 0 0.0
.dram0.bss 75800 75800 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246676 246676 0 0.0
.flash.text 1070575 1070675 100 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 641876 641924 48 0.0
.bss 69728 69728 0 0.0
.data 2028 2028 0 0.0
.text 567392 567440 48 0.0
lock k32w0+release (read/write) 699180 699212 32 0.0
.bss 70168 70168 0 0.0
.data 2036 2036 0 0.0
.text 624248 624280 32 0.0
linux all-clusters-app debug (read only) 2986169 2987241 1072 0.0
(read/write) 155416 155416 0 0.0
.bss 61856 61856 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 85224 85224 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1072 1072 0 0.0
.rodata 267627 268139 512 0.2
.text 2540354 2540914 560 0.0
all-clusters-minimal-app debug (read only) 2829081 2830153 1072 0.0
(read/write) 147120 147120 0 0.0
.bss 61056 61056 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77816 77816 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 267659 268171 512 0.2
.text 2385842 2386402 560 0.0
bridge-app debug+rpc (read only) 2343497 2344585 1088 0.0
(read/write) 127024 127024 0 0.0
.bss 50144 50144 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 67272 67272 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 744 744 0 0.0
.rodata 200008 200520 512 0.3
.text 1981058 1981634 576 0.0
chip-tool debug (read only) 10384369 10386529 2160 0.0
(read/write) 631056 631056 0 0.0
.bss 24824 24824 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 596568 596568 0 0.0
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 531477 532789 1312 0.2
.text 8401412 8402260 848 0.0
chip-tool-ipv6only arm64 (read only) 9808852 9810020 1168 0.0
(read/write) 678561 678561 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 623904 623904 0 0.0
.dynamic 560 560 0 0.0
.got 13536 13536 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 466244 466532 288 0.1
.text 7760404 7761284 880 0.0
lighting-app debug+rpc (read only) 2566601 2567657 1056 0.0
(read/write) 129992 129992 0 0.0
.bss 49696 49696 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72328 72328 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 215728 216208 480 0.2
.text 2180354 2180930 576 0.0
lock-app debug (read only) 2531625 2532649 1024 0.0
(read/write) 124976 124976 0 0.0
.bss 48096 48096 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69304 69304 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 808 808 0 0.0
.rodata 230704 231152 448 0.2
.text 2135202 2135778 576 0.0
ota-provider-app debug (read only) 2335401 2336457 1056 0.0
(read/write) 118776 118776 0 0.0
.bss 47744 47744 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63288 63288 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 688 688 0 0.0
.rodata 205688 206168 480 0.2
.text 1966386 1966962 576 0.0
ota-requestor-app debug (read only) 2460809 2461897 1088 0.0
(read/write) 126168 126168 0 0.0
.bss 50112 50112 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 67960 67960 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 752 752 0 0.0
.rodata 209664 210176 512 0.2
.text 2079202 2079778 576 0.0
shell debug (read only) 2569825 2570689 864 0.0
(read/write) 141568 141568 0 0.0
.bss 57704 57704 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 76888 76888 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 944 944 0 0.0
.rodata 230034 230354 320 0.1
.text 2182114 2182658 544 0.0
thermostat-no-ble arm64 (read only) 2342092 2342780 688 0.0
(read/write) 141345 141345 0 0.0
.bss 55297 55297 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75624 75624 0 0.0
.dynamic 560 560 0 0.0
.got 4984 4984 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 139460 139636 176 0.1
.text 1965728 1966240 512 0.0
tv-app debug (read only) 3116649 3118105 1456 0.0
(read/write) 257160 257160 0 0.0
.bss 167160 167160 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 78824 78824 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 968 968 0 0.0
.rodata 251400 252232 832 0.3
.text 2676706 2677330 624 0.0
tv-casting-app debug (read only) 5370969 5373433 2464 0.0
(read/write) 158432 158432 0 0.0
.bss 51320 51320 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98384 98384 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 335521 337441 1920 0.6
.text 4768802 4769346 544 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2449472 2449536 64 0.0
.bss 214508 214508 0 0.0
.data 5872 5872 0 0.0
.text 1412116 1412180 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177675 1177723 48 0.0
bss 143132 143132 0 0.0
rodata 142692 142692 0 0.0
text 812924 812972 48 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157727 1157775 48 0.0
bss 142368 142368 0 0.0
rodata 134224 134224 0 0.0
text 802232 802280 48 0.0
p6 all-clusters-app default (read only) 881568 881568 0 0.0
(read/write) 1687524 1687572 48 0.0
.bss 149128 149128 0 0.0
.data 2648 2648 0 0.0
.text 1527360 1527408 48 0.0
all-clusters-minimal-app default (read only) 882288 882288 0 0.0
(read/write) 1631636 1631684 48 0.0
.bss 148408 148408 0 0.0
.data 2648 2648 0 0.0
.text 1472192 1472240 48 0.0
light-app default (read only) 890592 890592 0 0.0
(read/write) 1551708 1551756 48 0.0
.bss 140312 140312 0 0.0
.data 2440 2440 0 0.0
.text 1400568 1400616 48 0.0
lock-app default (read only) 886120 886120 0 0.0
(read/write) 1589300 1589348 48 0.0
.bss 144768 144768 0 0.0
.data 2456 2456 0 0.0
.text 1433688 1433736 48 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799980 800028 48 0.0
bss 70808 70808 0 0.0
noinit 40416 40416 0 0.0
text 567492 567538 46 0.0
lighting-app tlsr9518adk80d (read/write) 820064 820104 40 0.0
bss 71652 71652 0 0.0
noinit 40416 40416 0 0.0
text 584048 584088 40 0.0

A few changes here:

1. Implement a SetupDiscriminator class that commons up logic like "does this
   discriminator, which might be short or long, match the given long
   discriminator?" and "extract short discriminator from long discriminator".
2. Change SetupPayload to more clearly indicate whether it's storing a short or
   long discriminator, instead of storing a short discriminator the same way as
   a long discriminator with the low bits all 0 and hoping consumers check
   isShortDiscriminator.
3. Update BLE scanning APIs to take SetupDiscriminator.
4. Fix the Linux and Tizen BLE code to properly handle short discriminators
   (which used to not match if the long discriminator happened to have the low 8
   bits nonzero).
5. Fix the Darwin BLE code to properly handle long discriminators that have 0
   low bits.  Before this change they used to incorrectly match a long
   discriminator which had the same 4 high bits but different 8 low bits.

Fixes project-chip#21160
@bzbarsky-apple bzbarsky-apple force-pushed the fix-ble-short-discriminator branch from f84e2d4 to bfea979 Compare July 26, 2022 15:13
@github-actions
Copy link

github-actions bot commented Jul 26, 2022

PR #21187: Size comparison from d94cbdc to bfea979

Increases above 0.2%:

platform target config section d94cbdc bfea979 change % change
linux bridge-app debug+rpc .rodata 199976 200456 480 0.2
chip-tool debug .rodata 531413 532757 1344 0.3
lighting-app debug+rpc .rodata 215664 216144 480 0.2
ota-provider-app debug .rodata 205656 206136 480 0.2
ota-requestor-app debug .rodata 209600 210112 512 0.2
tv-app debug .rodata 251336 252168 832 0.3
tv-casting-app debug .rodata 335393 337313 1920 0.6
Increases (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section d94cbdc bfea979 change % change
bl602 lighting-app bl602 (read/write) 1381290 1381394 104 0.0
.text 1051376 1051480 104 0.0
bl602+rpc (read/write) 1426698 1426810 112 0.0
.text 1083032 1083148 116 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668319 668367 48 0.0
.text 579620 579668 48 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633911 633959 48 0.0
.text 555980 556028 48 0.0
lock-ftd LP_CC2652R7 (read only) 671475 671515 40 0.0
.text 594552 594592 40 0.0
lock-mtd LP_CC2652R7 (read only) 653711 653751 40 0.0
.text 552088 552128 40 0.0
pump-app LP_CC2652R7 (read only) 680907 680955 48 0.0
.text 591276 591324 48 0.0
pump-controller-app LP_CC2652R7 (read only) 666659 666707 48 0.0
.text 581192 581240 48 0.0
shell LP_CC2652R7 (read only) 660802 660850 48 0.0
.text 575332 575380 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583234 583282 48 0.0
.app_xip_area 460372 460420 48 0.0
lock cyw930739m2evb_01 (read/write) 589162 589194 32 0.0
.app_xip_area 461572 461604 32 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 588998 589038 40 0.0
.app_xip_area 466952 466992 40 0.0
efr32 lighting-app BRD4161A (read/write) 1088056 1088104 48 0.0
.text 952712 952760 48 0.0
BRD4161A+rpc (read/write) 1142356 1142404 48 0.0
.text 990120 990168 48 0.0
BRD4161A+rs911x (read/write) 952592 952656 64 0.0
.text 809532 809596 64 0.0
lock-app BRD4161A+wf200 (read/write) 1128188 1128220 32 0.0
.text 981752 981784 32 0.0
window-app BRD4161A (read/write) 1081540 1081588 48 0.0
.text 944692 944740 48 0.0
esp32 all-clusters-app c3devkit (read only) 1021998 1022086 88 0.0
.flash.text 1021998 1022086 88 0.0
m5stack (read only) 1075575 1075679 104 0.0
.flash.text 1070191 1070295 104 0.0
k32w light k32w0+release (read/write) 641684 641732 48 0.0
.text 567200 567248 48 0.0
lock k32w0+release (read/write) 698956 699004 48 0.0
.text 624024 624072 48 0.0
linux all-clusters-app debug (read only) 2985145 2986233 1088 0.0
.rodata 267627 268139 512 0.2
.text 2539330 2539906 576 0.0
all-clusters-minimal-app debug (read only) 2828025 2829113 1088 0.0
.rodata 267627 268139 512 0.2
.text 2384818 2385394 576 0.0
bridge-app debug+rpc (read only) 2342921 2343977 1056 0.0
.rodata 199976 200456 480 0.2
.text 1980514 1981090 576 0.0
chip-tool debug (read only) 10383585 10385761 2176 0.0
.rodata 531413 532757 1344 0.3
.text 8400692 8401524 832 0.0
chip-tool-ipv6only arm64 (read only) 9808260 9809460 1200 0.0
.rodata 466196 466500 304 0.1
.text 7759860 7760756 896 0.0
lighting-app debug+rpc (read only) 2565993 2567049 1056 0.0
.rodata 215664 216144 480 0.2
.text 2179810 2180386 576 0.0
lock-app debug (read only) 2531049 2532073 1024 0.0
.rodata 230672 231120 448 0.2
.text 2134658 2135234 576 0.0
ota-provider-app debug (read only) 2334825 2335881 1056 0.0
.rodata 205656 206136 480 0.2
.text 1965842 1966418 576 0.0
ota-requestor-app debug (read only) 2459769 2460857 1088 0.0
.rodata 209600 210112 512 0.2
.text 2078226 2078802 576 0.0
shell debug (read only) 2568785 2569633 848 0.0
.rodata 230002 230322 320 0.1
.text 2181106 2181634 528 0.0
thermostat-no-ble arm64 (read only) 2341196 2341884 688 0.0
.rodata 139428 139588 160 0.1
.text 1964864 1965392 528 0.0
tv-app debug (read only) 3115577 3117033 1456 0.0
.rodata 251336 252168 832 0.3
.text 2675698 2676322 624 0.0
tv-casting-app debug (read only) 5369609 5372073 2464 0.0
.rodata 335393 337313 1920 0.6
.text 4767570 4768114 544 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2449240 2449304 64 0.0
.text 1411884 1411948 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177023 1177071 48 0.0
text 812332 812380 48 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157075 1157123 48 0.0
text 801644 801692 48 0.0
p6 all-clusters-app default (read/write) 1686924 1686988 64 0.0
.text 1526760 1526824 64 0.0
all-clusters-minimal-app default (read/write) 1631044 1631092 48 0.0
.text 1471600 1471648 48 0.0
light-app default (read/write) 1551396 1551444 48 0.0
.text 1400256 1400304 48 0.0
lock-app default (read/write) 1588988 1589036 48 0.0
.text 1433376 1433424 48 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799556 799596 40 0.0
text 567106 567146 40 0.0
lighting-app tlsr9518adk80d (read/write) 819656 819696 40 0.0
text 583678 583718 40 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section d94cbdc bfea979 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 183040 182992 -48 -0.0
lock-ftd LP_CC2652R7 (read/write) 170076 170036 -40 -0.0
lock-mtd LP_CC2652R7 (read/write) 183528 183488 -40 -0.0
pump-app LP_CC2652R7 (read/write) 161476 161428 -48 -0.0
pump-controller-app LP_CC2652R7 (read/write) 175860 175812 -48 -0.0
shell LP_CC2652R7 (read/write) 186076 186028 -48 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section d94cbdc bfea979 change % change
bl602 lighting-app bl602 (read/write) 1381290 1381394 104 0.0
.bss 117538 117538 0 0.0
.data 4480 4480 0 0.0
.text 1051376 1051480 104 0.0
bl602+rpc (read/write) 1426698 1426810 112 0.0
.bss 124978 124978 0 0.0
.data 4600 4600 0 0.0
.text 1083032 1083148 116 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668319 668367 48 0.0
(read/write) 183040 182992 -48 -0.0
.bss 74252 74252 0 0.0
.data 3356 3356 0 0.0
.rodata 88383 88383 0 0.0
.text 579620 579668 48 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633911 633959 48 0.0
(read/write) 157820 157820 0 0.0
.bss 73548 73548 0 0.0
.data 3356 3356 0 0.0
.rodata 77607 77607 0 0.0
.text 555980 556028 48 0.0
lock-ftd LP_CC2652R7 (read only) 671475 671515 40 0.0
(read/write) 170076 170036 -40 -0.0
.bss 71332 71332 0 0.0
.data 3280 3280 0 0.0
.rodata 76443 76443 0 0.0
.text 594552 594592 40 0.0
lock-mtd LP_CC2652R7 (read only) 653711 653751 40 0.0
(read/write) 183528 183488 -40 -0.0
.bss 67020 67020 0 0.0
.data 3280 3280 0 0.0
.rodata 101143 101143 0 0.0
.text 552088 552128 40 0.0
pump-app LP_CC2652R7 (read only) 680907 680955 48 0.0
(read/write) 161476 161428 -48 -0.0
.bss 71396 71396 0 0.0
.data 3280 3280 0 0.0
.rodata 89147 89147 0 0.0
.text 591276 591324 48 0.0
pump-controller-app LP_CC2652R7 (read only) 666659 666707 48 0.0
(read/write) 175860 175812 -48 -0.0
.bss 71532 71532 0 0.0
.data 3276 3276 0 0.0
.rodata 84987 84987 0 0.0
.text 581192 581240 48 0.0
shell LP_CC2652R7 (read only) 660802 660850 48 0.0
(read/write) 186076 186028 -48 -0.0
.bss 76572 76572 0 0.0
.data 3360 3360 0 0.0
.rodata 85154 85154 0 0.0
.text 575332 575380 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583234 583282 48 0.0
.app_xip_area 460372 460420 48 0.0
.bss 65656 65656 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 589162 589194 32 0.0
.app_xip_area 461572 461604 32 0.0
.bss 70384 70384 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 588998 589038 40 0.0
.app_xip_area 466952 466992 40 0.0
.bss 64896 64896 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1088056 1088104 48 0.0
.bss 133276 133276 0 0.0
.data 2048 2048 0 0.0
.text 952712 952760 48 0.0
BRD4161A+rpc (read/write) 1142356 1142404 48 0.0
.bss 149956 149956 0 0.0
.data 2260 2260 0 0.0
.text 990120 990168 48 0.0
BRD4161A+rs911x (read/write) 952592 952656 64 0.0
.bss 140992 140992 0 0.0
.data 2048 2048 0 0.0
.text 809532 809596 64 0.0
lock-app BRD4161A+wf200 (read/write) 1128188 1128220 32 0.0
.bss 144360 144360 0 0.0
.data 2056 2056 0 0.0
.text 981752 981784 32 0.0
window-app BRD4161A (read/write) 1081540 1081588 48 0.0
.bss 134748 134748 0 0.0
.data 2076 2076 0 0.0
.text 944692 944740 48 0.0
esp32 all-clusters-app c3devkit (read only) 1021998 1022086 88 0.0
(read/write) 1486562 1486562 0 0.0
.dram0.bss 70288 70288 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216240 216240 0 0.0
.flash.text 1021998 1022086 88 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1075575 1075679 104 0.0
(read/write) 488576 488576 0 0.0
.dram0.bss 75800 75800 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246636 246636 0 0.0
.flash.text 1070191 1070295 104 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 641684 641732 48 0.0
.bss 69728 69728 0 0.0
.data 2028 2028 0 0.0
.text 567200 567248 48 0.0
lock k32w0+release (read/write) 698956 699004 48 0.0
.bss 70168 70168 0 0.0
.data 2036 2036 0 0.0
.text 624024 624072 48 0.0
linux all-clusters-app debug (read only) 2985145 2986233 1088 0.0
(read/write) 155416 155416 0 0.0
.bss 61856 61856 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 85224 85224 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1072 1072 0 0.0
.rodata 267627 268139 512 0.2
.text 2539330 2539906 576 0.0
all-clusters-minimal-app debug (read only) 2828025 2829113 1088 0.0
(read/write) 147120 147120 0 0.0
.bss 61056 61056 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77816 77816 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 267627 268139 512 0.2
.text 2384818 2385394 576 0.0
bridge-app debug+rpc (read only) 2342921 2343977 1056 0.0
(read/write) 127024 127024 0 0.0
.bss 50144 50144 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 67272 67272 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 744 744 0 0.0
.rodata 199976 200456 480 0.2
.text 1980514 1981090 576 0.0
chip-tool debug (read only) 10383585 10385761 2176 0.0
(read/write) 631056 631056 0 0.0
.bss 24824 24824 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 596568 596568 0 0.0
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 531413 532757 1344 0.3
.text 8400692 8401524 832 0.0
chip-tool-ipv6only arm64 (read only) 9808260 9809460 1200 0.0
(read/write) 678561 678561 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 623904 623904 0 0.0
.dynamic 560 560 0 0.0
.got 13536 13536 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 466196 466500 304 0.1
.text 7759860 7760756 896 0.0
lighting-app debug+rpc (read only) 2565993 2567049 1056 0.0
(read/write) 129992 129992 0 0.0
.bss 49696 49696 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72328 72328 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 215664 216144 480 0.2
.text 2179810 2180386 576 0.0
lock-app debug (read only) 2531049 2532073 1024 0.0
(read/write) 124976 124976 0 0.0
.bss 48096 48096 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69304 69304 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 808 808 0 0.0
.rodata 230672 231120 448 0.2
.text 2134658 2135234 576 0.0
ota-provider-app debug (read only) 2334825 2335881 1056 0.0
(read/write) 118776 118776 0 0.0
.bss 47744 47744 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63288 63288 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 688 688 0 0.0
.rodata 205656 206136 480 0.2
.text 1965842 1966418 576 0.0
ota-requestor-app debug (read only) 2459769 2460857 1088 0.0
(read/write) 126168 126168 0 0.0
.bss 50112 50112 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 67960 67960 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 752 752 0 0.0
.rodata 209600 210112 512 0.2
.text 2078226 2078802 576 0.0
shell debug (read only) 2568785 2569633 848 0.0
(read/write) 141568 141568 0 0.0
.bss 57704 57704 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 76888 76888 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 944 944 0 0.0
.rodata 230002 230322 320 0.1
.text 2181106 2181634 528 0.0
thermostat-no-ble arm64 (read only) 2341196 2341884 688 0.0
(read/write) 141345 141345 0 0.0
.bss 55297 55297 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75624 75624 0 0.0
.dynamic 560 560 0 0.0
.got 4984 4984 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 139428 139588 160 0.1
.text 1964864 1965392 528 0.0
tv-app debug (read only) 3115577 3117033 1456 0.0
(read/write) 257160 257160 0 0.0
.bss 167160 167160 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 78824 78824 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 968 968 0 0.0
.rodata 251336 252168 832 0.3
.text 2675698 2676322 624 0.0
tv-casting-app debug (read only) 5369609 5372073 2464 0.0
(read/write) 158432 158432 0 0.0
.bss 51320 51320 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98384 98384 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 335393 337313 1920 0.6
.text 4767570 4768114 544 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2449240 2449304 64 0.0
.bss 214508 214508 0 0.0
.data 5872 5872 0 0.0
.text 1411884 1411948 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177023 1177071 48 0.0
bss 143132 143132 0 0.0
rodata 142632 142632 0 0.0
text 812332 812380 48 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157075 1157123 48 0.0
bss 142368 142368 0 0.0
rodata 134164 134164 0 0.0
text 801644 801692 48 0.0
p6 all-clusters-app default (read only) 881568 881568 0 0.0
(read/write) 1686924 1686988 64 0.0
.bss 149128 149128 0 0.0
.data 2648 2648 0 0.0
.text 1526760 1526824 64 0.0
all-clusters-minimal-app default (read only) 882288 882288 0 0.0
(read/write) 1631044 1631092 48 0.0
.bss 148408 148408 0 0.0
.data 2648 2648 0 0.0
.text 1471600 1471648 48 0.0
light-app default (read only) 890592 890592 0 0.0
(read/write) 1551396 1551444 48 0.0
.bss 140312 140312 0 0.0
.data 2440 2440 0 0.0
.text 1400256 1400304 48 0.0
lock-app default (read only) 886120 886120 0 0.0
(read/write) 1588988 1589036 48 0.0
.bss 144768 144768 0 0.0
.data 2456 2456 0 0.0
.text 1433376 1433424 48 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799556 799596 40 0.0
bss 70808 70808 0 0.0
noinit 40416 40416 0 0.0
text 567106 567146 40 0.0
lighting-app tlsr9518adk80d (read/write) 819656 819696 40 0.0
bss 71652 71652 0 0.0
noinit 40416 40416 0 0.0
text 583678 583718 40 0.0

@bzbarsky-apple bzbarsky-apple merged commit 79e8c9e into project-chip:master Jul 26, 2022
github-actions bot pushed a commit that referenced this pull request Jul 26, 2022
* Fix handling of short discriminator in Linux BLE scan.

A few changes here:

1. Implement a SetupDiscriminator class that commons up logic like "does this
   discriminator, which might be short or long, match the given long
   discriminator?" and "extract short discriminator from long discriminator".
2. Change SetupPayload to more clearly indicate whether it's storing a short or
   long discriminator, instead of storing a short discriminator the same way as
   a long discriminator with the low bits all 0 and hoping consumers check
   isShortDiscriminator.
3. Update BLE scanning APIs to take SetupDiscriminator.
4. Fix the Linux and Tizen BLE code to properly handle short discriminators
   (which used to not match if the long discriminator happened to have the low 8
   bits nonzero).
5. Fix the Darwin BLE code to properly handle long discriminators that have 0
   low bits.  Before this change they used to incorrectly match a long
   discriminator which had the same 4 high bits but different 8 low bits.

Fixes #21160

* Address review comment.
@bzbarsky-apple bzbarsky-apple deleted the fix-ble-short-discriminator branch July 26, 2022 17:25
woody-apple added a commit that referenced this pull request Jul 27, 2022
* Fix handling of short discriminator in Linux BLE scan.

A few changes here:

1. Implement a SetupDiscriminator class that commons up logic like "does this
   discriminator, which might be short or long, match the given long
   discriminator?" and "extract short discriminator from long discriminator".
2. Change SetupPayload to more clearly indicate whether it's storing a short or
   long discriminator, instead of storing a short discriminator the same way as
   a long discriminator with the low bits all 0 and hoping consumers check
   isShortDiscriminator.
3. Update BLE scanning APIs to take SetupDiscriminator.
4. Fix the Linux and Tizen BLE code to properly handle short discriminators
   (which used to not match if the long discriminator happened to have the low 8
   bits nonzero).
5. Fix the Darwin BLE code to properly handle long discriminators that have 0
   low bits.  Before this change they used to incorrectly match a long
   discriminator which had the same 4 high bits but different 8 low bits.

Fixes #21160

* Address review comment.

Co-authored-by: Boris Zbarsky <[email protected]>
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
…21187)

* Fix handling of short discriminator in Linux BLE scan.

A few changes here:

1. Implement a SetupDiscriminator class that commons up logic like "does this
   discriminator, which might be short or long, match the given long
   discriminator?" and "extract short discriminator from long discriminator".
2. Change SetupPayload to more clearly indicate whether it's storing a short or
   long discriminator, instead of storing a short discriminator the same way as
   a long discriminator with the low bits all 0 and hoping consumers check
   isShortDiscriminator.
3. Update BLE scanning APIs to take SetupDiscriminator.
4. Fix the Linux and Tizen BLE code to properly handle short discriminators
   (which used to not match if the long discriminator happened to have the low 8
   bits nonzero).
5. Fix the Darwin BLE code to properly handle long discriminators that have 0
   low bits.  Before this change they used to incorrectly match a long
   discriminator which had the same 4 high bits but different 8 low bits.

Fixes project-chip#21160

* Address review comment.
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.

Chip-tool wrongly handle discovery via BLE with manual pairing code
3 participants