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

Move UDPEndPointManager out of Globals.cpp #19784

Merged
merged 1 commit into from
Jun 21, 2022

Conversation

mspang
Copy link
Contributor

@mspang mspang commented Jun 21, 2022

Problem

Currently there is no way for platforms to provide storage for
UDPEndPointManager or to provide an alternate instance, as there is a
prescribed static instance in Globals.cpp.

Change overview

Move this instance to ConnectivityManager, which platforms provide the
implementation for.

Note to porters: You can inherit from
GenericConnectivityManagerImpl_UDP if previous
behavior was working for you.

Testing

CI for all platforms.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@mspang mspang force-pushed the for-chip/udp-endpoint-manager branch 4 times, most recently from bed1909 to f89b36e Compare June 21, 2022 02:26
@github-actions

This comment was marked as outdated.

@mspang mspang force-pushed the for-chip/udp-endpoint-manager branch from f89b36e to bfa196e Compare June 21, 2022 03:44
@github-actions

This comment was marked as outdated.

@mspang mspang force-pushed the for-chip/udp-endpoint-manager branch from bfa196e to f950fb6 Compare June 21, 2022 04:15
@github-actions

This comment was marked as outdated.

Currently there is no way for platforms to provide storage for
UDPEndPointManager or to provide an alternate instance, as there is a
prescribed static instance in Globals.cpp.

Move this instance to ConnectivityManager, which platforms provide the
implementation for.

Note to porters: You can inherit from
GenericConnectivityManagerImpl_UDP<ConnectivityManagerImpl> if previous
behavior was working for you.
@mspang mspang force-pushed the for-chip/udp-endpoint-manager branch from f950fb6 to 1a779e9 Compare June 21, 2022 05:44
@github-actions
Copy link

github-actions bot commented Jun 21, 2022

PR #19784: Size comparison from 2ac3ee7 to 1a779e9

Increases above 0.2%:

platform target config section 2ac3ee7 1a779e9 change % change
linux chip-tool debug .bss 24352 24416 64 0.3
thermostat-no-ble arm64 .got 5072 5088 16 0.3
Increases (20 builds for cyw30739, k32w, linux, nrfconnect, p6, telink)
platform target config section 2ac3ee7 1a779e9 change % change
cyw30739 ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 616130 616138 8 0.0
.bss 85456 85464 8 0.0
k32w lock k32w061+release (read/write) 720916 720924 8 0.0
.bss 69196 69204 8 0.0
linux all-clusters-app debug (read only) 2931385 2931593 208 0.0
.rodata 260029 260189 160 0.1
.text 2494914 2494962 48 0.0
all-clusters-minimal-app debug (read only) 2785097 2785337 240 0.0
.rodata 261565 261757 192 0.1
.text 2349266 2349314 48 0.0
bridge-app debug+rpc (read only) 2287665 2287889 224 0.0
(read/write) 159424 159456 32 0.0
.bss 83136 83168 32 0.0
.rodata 194848 195008 160 0.1
.text 1931730 1931794 64 0.0
chip-tool debug (read only) 10141773 10142061 288 0.0
(read/write) 609544 609608 64 0.0
.bss 24352 24416 64 0.3
.rodata 509301 509461 160 0.0
.text 8226741 8226869 128 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9882612 9882820 208 0.0
(read/write) 674225 674257 32 0.0
.got 13416 13448 32 0.2
.text 7873860 7873972 112 0.0
lighting-app debug+rpc (read only) 2520433 2520657 224 0.0
(read/write) 163448 163480 32 0.0
.bss 83616 83648 32 0.0
.rodata 210632 210792 160 0.1
.text 2140098 2140162 64 0.0
lock-app debug (read only) 2459113 2459321 208 0.0
(read/write) 158096 158128 32 0.0
.bss 82016 82048 32 0.0
.rodata 224328 224488 160 0.1
.text 2070482 2070530 48 0.0
ota-provider-app debug (read only) 2296993 2297249 256 0.0
(read/write) 152232 152264 32 0.0
.bss 81696 81728 32 0.0
.rodata 200504 200696 192 0.1
.text 1934338 1934402 64 0.0
ota-requestor-app debug (read only) 2412705 2412929 224 0.0
(read/write) 158976 159008 32 0.0
.bss 84000 84032 32 0.0
.rodata 204192 204352 160 0.1
.text 2038130 2038194 64 0.0
shell debug (read only) 2604865 2605105 240 0.0
.rodata 230290 230418 128 0.1
.text 2214818 2214930 112 0.0
thermostat-no-ble arm64 (read only) 2571580 2571676 96 0.0
(read/write) 192193 192209 16 0.0
.got 5072 5088 16 0.3
.text 2169120 2169168 48 0.0
tv-app debug (read only) 3068849 3069137 288 0.0
(read/write) 289352 289384 32 0.0
.bss 199240 199272 32 0.0
.rodata 246176 246336 160 0.1
.text 2635810 2635938 128 0.0
tv-casting-app debug (read only) 5534513 5534769 256 0.0
(read/write) 195664 195696 32 0.0
.bss 84424 84456 32 0.0
.rodata 340137 340329 192 0.1
.text 4918146 4918210 64 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 text 813628 813632 4 0.0
p6 light-app default (read/write) 2430520 2430536 16 0.0
.text 1388784 1388800 16 0.0
lock-app default (read/write) 2451216 2451232 16 0.0
.text 1409480 1409496 16 0.0
telink light-switch-app tlsr9518adk80d (read/write) 789088 789096 8 0.0
text 559674 559684 10 0.0
lighting-app tlsr9518adk80d (read/write) 808792 808808 16 0.0
text 576134 576148 14 0.0
Decreases (14 builds for cc13x2_26x2, cyw30739, mbed, p6)
platform target config section 2ac3ee7 1a779e9 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 191296 191288 -8 -0.0
.bss 73756 73748 -8 -0.0
all-clusters-minimal-app LP_CC2652R7 (read/write) 157316 157308 -8 -0.0
.bss 73044 73036 -8 -0.0
lock-ftd LP_CC2652R7 (read only) 690531 690523 -8 -0.0
.bss 70756 70748 -8 -0.0
.text 590884 590876 -8 -0.0
lock-mtd LP_CC2652R7 (read/write) 143888 143880 -8 -0.0
.bss 66492 66484 -8 -0.0
cyw30739 lock cyw930739m2evb_01 (read/write) 610122 610114 -8 -0.0
.app_xip_area 466612 466604 -8 -0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release .bss 215976 215968 -8 -0.0
all-clusters-minimal-app CY8CPROTO_062_4343W+release .bss 215264 215256 -8 -0.0
lighting-app CY8CPROTO_062_4343W+release .bss 209372 209364 -8 -0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2438104 2438040 -64 -0.0
.bss 208204 208196 -8 -0.0
.text 1400748 1400684 -64 -0.0
shell CY8CPROTO_062_4343W+release .bss 208096 208088 -8 -0.0
p6 all-clusters-app default .bss 143384 143376 -8 -0.0
all-clusters-minimal-app default .bss 142664 142656 -8 -0.0
light-app default .bss 134744 134736 -8 -0.0
lock-app default .bss 134568 134560 -8 -0.0
Full report (46 builds for cc13x2_26x2, cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 2ac3ee7 1a779e9 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 659567 659567 0 0.0
(read/write) 191296 191288 -8 -0.0
.bss 73756 73748 -8 -0.0
.data 3356 3356 0 0.0
.rodata 87087 87087 0 0.0
.text 572168 572168 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 648055 648055 0 0.0
(read/write) 157316 157308 -8 -0.0
.bss 73044 73036 -8 -0.0
.data 3356 3356 0 0.0
.rodata 90407 90407 0 0.0
.text 557328 557328 0 0.0
lock-ftd LP_CC2652R7 (read only) 690531 690523 -8 -0.0
(read/write) 150444 150444 0 0.0
.bss 70756 70748 -8 -0.0
.data 3280 3280 0 0.0
.rodata 99163 99163 0 0.0
.text 590884 590876 -8 -0.0
lock-mtd LP_CC2652R7 (read only) 639931 639931 0 0.0
(read/write) 143888 143880 -8 -0.0
.bss 66492 66484 -8 -0.0
.data 3280 3280 0 0.0
.rodata 99043 99043 0 0.0
.text 540396 540396 0 0.0
pump-app LP_CC2652R7 (read only) 671467 671467 0 0.0
(read/write) 170396 170396 0 0.0
.bss 70876 70876 0 0.0
.data 3280 3280 0 0.0
.rodata 87259 87259 0 0.0
.text 583724 583724 0 0.0
pump-controller-app LP_CC2652R7 (read only) 657359 657359 0 0.0
(read/write) 184616 184616 0 0.0
.bss 70988 70988 0 0.0
.data 3276 3276 0 0.0
.rodata 83103 83103 0 0.0
.text 573776 573776 0 0.0
shell LP_CC2652R7 (read only) 688994 688994 0 0.0
(read/write) 157364 157364 0 0.0
.bss 76052 76052 0 0.0
.data 3360 3360 0 0.0
.rodata 109658 109658 0 0.0
.text 579024 579024 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 612766 612766 0 0.0
.app_xip_area 469432 469432 0 0.0
.bss 86288 86288 0 0.0
.data 728 728 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 610122 610114 -8 -0.0
.app_xip_area 466612 466604 -8 -0.0
.bss 86464 86464 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 616130 616138 8 0.0
.app_xip_area 473684 473684 0 0.0
.bss 85456 85464 8 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
k32w light k32w061+release (read/write) 658940 658940 0 0.0
.bss 68756 68756 0 0.0
.data 1992 1992 0 0.0
.text 582392 582392 0 0.0
lock k32w061+release (read/write) 720916 720924 8 0.0
.bss 69196 69204 8 0.0
.data 2000 2000 0 0.0
.text 643920 643920 0 0.0
linux all-clusters-app debug (read only) 2931385 2931593 208 0.0
(read/write) 188656 188656 0 0.0
.bss 95744 95744 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 84664 84664 0 0.0
.dynamic 608 608 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 260029 260189 160 0.1
.text 2494914 2494962 48 0.0
all-clusters-minimal-app debug (read only) 2785097 2785337 240 0.0
(read/write) 180560 180560 0 0.0
.bss 95072 95072 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 77304 77304 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 261565 261757 192 0.1
.text 2349266 2349314 48 0.0
bridge-app debug+rpc (read only) 2287665 2287889 224 0.0
(read/write) 159424 159456 32 0.0
.bss 83136 83168 32 0.0
.data 3792 3792 0 0.0
.data.rel.ro 66728 66728 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 194848 195008 160 0.1
.text 1931730 1931794 64 0.0
chip-tool debug (read only) 10141773 10142061 288 0.0
(read/write) 609544 609608 64 0.0
.bss 24352 24416 64 0.3
.data 1088 1088 0 0.0
.data.rel.ro 577808 577808 0 0.0
.dynamic 624 624 0 0.0
.got 5008 5008 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 509301 509461 160 0.0
.text 8226741 8226869 128 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9882612 9882820 208 0.0
(read/write) 674225 674257 32 0.0
.bss 42641 42641 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 613208 613208 0 0.0
.dynamic 528 528 0 0.0
.got 13416 13448 32 0.2
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 472324 472324 0 0.0
.text 7873860 7873972 112 0.0
lighting-app debug+rpc (read only) 2520433 2520657 224 0.0
(read/write) 163448 163480 32 0.0
.bss 83616 83648 32 0.0
.data 2064 2064 0 0.0
.data.rel.ro 71896 71896 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 210632 210792 160 0.1
.text 2140098 2140162 64 0.0
lock-app debug (read only) 2459113 2459321 208 0.0
(read/write) 158096 158128 32 0.0
.bss 82016 82048 32 0.0
.data 1680 1680 0 0.0
.data.rel.ro 68568 68568 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 776 776 0 0.0
.rodata 224328 224488 160 0.1
.text 2070482 2070530 48 0.0
ota-provider-app debug (read only) 2296993 2297249 256 0.0
(read/write) 152232 152264 32 0.0
.bss 81696 81728 32 0.0
.data 1912 1912 0 0.0
.data.rel.ro 62840 62840 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 200504 200696 192 0.1
.text 1934338 1934402 64 0.0
ota-requestor-app debug (read only) 2412705 2412929 224 0.0
(read/write) 158976 159008 32 0.0
.bss 84000 84032 32 0.0
.data 2200 2200 0 0.0
.data.rel.ro 66936 66936 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 204192 204352 160 0.1
.text 2038130 2038194 64 0.0
shell debug (read only) 2604865 2605105 240 0.0
(read/write) 219288 219288 0 0.0
.bss 134504 134504 0 0.0
.data 1232 1232 0 0.0
.data.rel.ro 77808 77808 0 0.0
.dynamic 608 608 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 230290 230418 128 0.1
.text 2214818 2214930 112 0.0
thermostat-no-ble arm64 (read only) 2571580 2571676 96 0.0
(read/write) 192193 192209 16 0.0
.bss 99489 99489 0 0.0
.data 1688 1688 0 0.0
.data.rel.ro 82928 82928 0 0.0
.dynamic 528 528 0 0.0
.got 5072 5088 16 0.3
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 163340 163340 0 0.0
.text 2169120 2169168 48 0.0
tv-app debug (read only) 3068849 3069137 288 0.0
(read/write) 289352 289384 32 0.0
.bss 199240 199272 32 0.0
.data 4656 4656 0 0.0
.data.rel.ro 79016 79016 0 0.0
.dynamic 608 608 0 0.0
.got 4840 4840 0 0.0
.init 27 27 0 0.0
.init_array 952 952 0 0.0
.rodata 246176 246336 160 0.1
.text 2635810 2635938 128 0.0
tv-casting-app debug (read only) 5534513 5534769 256 0.0
(read/write) 195664 195696 32 0.0
.bss 84424 84456 32 0.0
.data 2448 2448 0 0.0
.data.rel.ro 102576 102576 0 0.0
.dynamic 608 608 0 0.0
.got 4712 4712 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 340137 340329 192 0.1
.text 4918146 4918210 64 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2511900 2511900 0 0.0
.bss 215976 215968 -8 -0.0
.data 5576 5576 0 0.0
.text 1474516 1474516 0 0.0
all-clusters-minimal-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2460680 2460680 0 0.0
.bss 215264 215256 -8 -0.0
.data 5552 5552 0 0.0
.text 1423276 1423276 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2450972 2450972 0 0.0
.bss 209372 209364 -8 -0.0
.data 5840 5840 0 0.0
.text 1413588 1413588 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2438104 2438040 -64 -0.0
.bss 208204 208196 -8 -0.0
.data 5864 5864 0 0.0
.text 1400748 1400684 -64 -0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2391740 2391740 0 0.0
.bss 208096 208088 -8 -0.0
.data 5712 5712 0 0.0
.text 1354356 1354356 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1198747 1198747 0 0.0
bss 141598 141598 0 0.0
rodata 155676 155676 0 0.0
text 822552 822552 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1146703 1146703 0 0.0
bss 140850 140850 0 0.0
rodata 132200 132200 0 0.0
text 794772 794772 0 0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1158271 1158271 0 0.0
bss 143177 143177 0 0.0
rodata 122616 122616 0 0.0
text 813628 813632 4 0.0
nrf52840dk_nrf52840+rpc (read/write) 1127567 1127567 0 0.0
bss 143622 143622 0 0.0
rodata 114232 114232 0 0.0
text 790376 790376 0 0.0
nrf52840dongle_nrf52840 (read/write) 1065431 1065431 0 0.0
bss 150408 150408 0 0.0
rodata 91760 91760 0 0.0
text 742140 742140 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1061978 1061978 0 0.0
bss 139548 139548 0 0.0
rodata 115024 115024 0 0.0
text 726368 726368 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1111359 1111359 0 0.0
bss 133125 133125 0 0.0
rodata 139344 139344 0 0.0
text 760020 760020 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1015222 1015222 0 0.0
bss 129528 129528 0 0.0
rodata 131812 131812 0 0.0
text 672808 672808 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1071239 1071239 0 0.0
bss 133072 133072 0 0.0
rodata 116000 116000 0 0.0
text 743340 743340 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1059287 1059287 0 0.0
bss 132867 132867 0 0.0
rodata 112784 112784 0 0.0
text 734724 734724 0 0.0
p6 all-clusters-app default (read/write) 2553928 2553928 0 0.0
.bss 143384 143376 -8 -0.0
.data 2776 2776 0 0.0
.text 1512192 1512192 0 0.0
all-clusters-minimal-app default (read/write) 2499776 2499776 0 0.0
.bss 142664 142656 -8 -0.0
.data 2776 2776 0 0.0
.text 1458040 1458040 0 0.0
light-app default (read/write) 2430520 2430536 16 0.0
.bss 134744 134736 -8 -0.0
.data 2592 2592 0 0.0
.text 1388784 1388800 16 0.0
lock-app default (read/write) 2451216 2451232 16 0.0
.bss 134568 134560 -8 -0.0
.data 2600 2600 0 0.0
.text 1409480 1409496 16 0.0
telink light-switch-app tlsr9518adk80d (read/write) 789088 789096 8 0.0
bss 69892 69892 0 0.0
noinit 40416 40416 0 0.0
text 559674 559684 10 0.0
lighting-app tlsr9518adk80d (read/write) 808792 808808 16 0.0
bss 70140 70140 0 0.0
noinit 40416 40416 0 0.0
text 576134 576148 14 0.0

@mspang mspang marked this pull request as ready for review June 21, 2022 14:08
@andy31415 andy31415 merged commit 65bea66 into project-chip:master Jun 21, 2022
@mspang mspang deleted the for-chip/udp-endpoint-manager branch June 21, 2022 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants