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

[Inet] ToLwIPAddr() with IPAddressType #13063

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

kpschoedel
Copy link
Contributor

Problem

Fixes #11273 IPAddress ANY has only one constant state, however addressType

Change overview

Factor similar code in UDP and TCP into a new version of
IPAddress::ToLwIPAddr() that accounts for the requested
address type (IPv4 vs IPv6).

Testing

Added a unit test.

#### Problem

Fixes project-chip#11273 _IPAddress ANY has only one constant state, however addressType_

#### Change overview

Factor similar code in UDP and TCP into a new version of
`IPAddress::ToLwIPAddr()` that accounts for the requested
address type (IPv4 vs IPv6).

#### Testing

Added a unit test.
@github-actions
Copy link

github-actions bot commented Dec 15, 2021

PR #13063: Size comparison from e1986bc to 862d63e

Increases (13 builds for efr32, esp32, k32w, p6, qpg)
platform target config section e1986bc 862d63e change % change
efr32 lighting-app BRD4161A (read only) 835748 835860 112 0.0
.text 835740 835852 112 0.0
BRD4161A+rpc (read only) 823352 823464 112 0.0
.text 823344 823456 112 0.0
window-app BRD4161A (read only) 809108 809220 112 0.0
.text 809100 809212 112 0.0
esp32 all-clusters-app c3devkit (read only) 876014 876276 262 0.0
.flash.text 876014 876276 262 0.0
m5stack (read only) 961915 962019 104 0.0
.flash.text 956531 956635 104 0.0
k32w lighting-app k32w061+se05x+release (read/write) 686412 686620 208 0.0
.text 600680 600888 208 0.0
lock-app k32w061+debug (read/write) 633976 634184 208 0.0
.text 550140 550348 208 0.0
shell k32w061+debug (read/write) 639720 639928 208 0.0
.text 553396 553604 208 0.0
p6 all-clusters-app default (read/write) 2389688 2389912 224 0.0
.text 1347952 1348176 224 0.0
light-app default (read/write) 2330000 2330224 224 0.0
.text 1288264 1288488 224 0.0
lock-app default (read/write) 2302192 2302432 240 0.0
.text 1260456 1260696 240 0.0
qpg lighting-app qpg6105+debug (read only) 532768 532976 208 0.0
.text 527448 527656 208 0.0
lock-app qpg6105+debug (read only) 504456 504664 208 0.0
.text 499136 499344 208 0.0
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section e1986bc 862d63e change % change
efr32 lighting-app BRD4161A (read only) 835748 835860 112 0.0
(read/write) 127324 127324 0 0.0
.bss 125448 125448 0 0.0
.data 1876 1876 0 0.0
.text 835740 835852 112 0.0
BRD4161A+rpc (read only) 823352 823464 112 0.0
(read/write) 143992 143992 0 0.0
.bss 142016 142016 0 0.0
.data 1976 1976 0 0.0
.text 823344 823456 112 0.0
window-app BRD4161A (read only) 809108 809220 112 0.0
(read/write) 126264 126264 0 0.0
.bss 124432 124432 0 0.0
.data 1832 1832 0 0.0
.text 809100 809212 112 0.0
esp32 all-clusters-app c3devkit (read only) 876014 876276 262 0.0
(read/write) 1312770 1312770 0 0.0
.dram0.bss 69752 69752 0 0.0
.dram0.data 14204 14204 0 0.0
.flash.rodata 175776 175776 0 0.0
.flash.text 876014 876276 262 0.0
.iram0.text 62076 62076 0 0.0
m5stack (read only) 961915 962019 104 0.0
(read/write) 453524 453524 0 0.0
.dram0.bss 76080 76080 0 0.0
.dram0.data 34056 34056 0 0.0
.flash.rodata 211600 211600 0 0.0
.flash.text 956531 956635 104 0.0
.iram0.text 123451 123451 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 686412 686620 208 0.0
.bss 78024 78024 0 0.0
.data 1908 1908 0 0.0
.text 600680 600888 208 0.0
lock-app k32w061+debug (read/write) 633976 634184 208 0.0
.bss 76176 76176 0 0.0
.data 1860 1860 0 0.0
.text 550140 550348 208 0.0
shell k32w061+debug (read/write) 639720 639928 208 0.0
.bss 78684 78684 0 0.0
.data 1840 1840 0 0.0
.text 553396 553604 208 0.0
linux chip-tool-ipv6only arm64 (read only) 6911556 6911556 0 0.0
(read/write) 322993 322993 0 0.0
.bss 54577 54577 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 207752 207752 0 0.0
.dynamic 560 560 0 0.0
.got 55864 55864 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 377636 377636 0 0.0
.text 5847924 5847924 0 0.0
thermostat-no-ble arm64 (read only) 1994052 1994052 0 0.0
(read/write) 143937 143937 0 0.0
.bss 64321 64321 0 0.0
.data 880 880 0 0.0
.data.rel.ro 72000 72000 0 0.0
.dynamic 560 560 0 0.0
.got 3840 3840 0 0.0
.init 24 24 0 0.0
.init_array 288 288 0 0.0
.rodata 127908 127908 0 0.0
.text 1654672 1654672 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2333776 2333776 0 0.0
.bss 189020 189020 0 0.0
.data 5256 5256 0 0.0
.text 1296352 1296352 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2329344 2329344 0 0.0
.bss 180872 180872 0 0.0
.data 5544 5544 0 0.0
.text 1291944 1291944 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2302376 2302376 0 0.0
.bss 179920 179920 0 0.0
.data 5536 5536 0 0.0
.text 1264976 1264976 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1140008 1140008 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103392 103392 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2054328 2054328 0 0.0
.bss 156980 156980 0 0.0
.data 4864 4864 0 0.0
.text 1016928 1016928 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 922287 922287 0 0.0
bss 118532 118532 0 0.0
rodata 104296 104296 0 0.0
text 623840 623840 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 885343 885343 0 0.0
bss 114884 114884 0 0.0
rodata 95592 95592 0 0.0
text 598580 598580 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 848246 848246 0 0.0
bss 119908 119908 0 0.0
rodata 99552 99552 0 0.0
text 554224 554224 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 894343 894343 0 0.0
bss 117712 117712 0 0.0
rodata 99608 99608 0 0.0
text 601608 601608 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 820550 820550 0 0.0
bss 119120 119120 0 0.0
rodata 94896 94896 0 0.0
text 532084 532084 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497447 497447 0 0.0
bss 51820 51820 0 0.0
rodata 45852 45852 0 0.0
text 339488 339488 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 899295 899295 0 0.0
bss 117624 117624 0 0.0
rodata 100960 100960 0 0.0
text 605208 605208 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 892503 892503 0 0.0
bss 117504 117504 0 0.0
rodata 99096 99096 0 0.0
text 600408 600408 0 0.0
shell nrf52840dk_nrf52840 (read/write) 782767 782767 0 0.0
bss 109624 109624 0 0.0
rodata 74396 74396 0 0.0
text 524232 524232 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 697838 697838 0 0.0
bss 110604 110604 0 0.0
rodata 69040 69040 0 0.0
text 444868 444868 0 0.0
p6 all-clusters-app default (read/write) 2389688 2389912 224 0.0
.bss 117212 117212 0 0.0
.data 2536 2536 0 0.0
.text 1347952 1348176 224 0.0
light-app default (read/write) 2330000 2330224 224 0.0
.bss 106128 106128 0 0.0
.data 2384 2384 0 0.0
.text 1288264 1288488 224 0.0
lock-app default (read/write) 2302192 2302432 240 0.0
.bss 105008 105008 0 0.0
.data 2336 2336 0 0.0
.text 1260456 1260696 240 0.0
qpg lighting-app qpg6105+debug (read only) 532768 532976 208 0.0
(read/write) 146936 146936 0 0.0
.bss 86800 86800 0 0.0
.data 1004 1004 0 0.0
.text 527448 527656 208 0.0
lock-app qpg6105+debug (read only) 504456 504664 208 0.0
(read/write) 146940 146940 0 0.0
.bss 85936 85936 0 0.0
.data 952 952 0 0.0
.text 499136 499344 208 0.0
persistent-storage-app qpg6105+debug (read only) 106448 106448 0 0.0
(read/write) 146938 146938 0 0.0
.bss 36146 36146 0 0.0
.data 288 288 0 0.0
.text 101128 101128 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 831110 831110 0 0.0
bss 87016 87016 0 0.0
noinit 37160 37160 0 0.0
text 579422 579422 0 0.0

@stale
Copy link

stale bot commented Dec 23, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Dec 23, 2021
@kpschoedel kpschoedel removed the stale Stale issue or PR label Dec 23, 2021
@stale
Copy link

stale bot commented Dec 30, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Dec 30, 2021
@andy31415 andy31415 added fast track and removed stale Stale issue or PR labels Jan 4, 2022
@andy31415
Copy link
Contributor

/rebase

@andy31415 andy31415 merged commit 4b9ead6 into project-chip:master Jan 4, 2022
step0035 pushed a commit to hank820/connectedhomeip that referenced this pull request Feb 8, 2022
#### Problem

Fixes project-chip#11273 _IPAddress ANY has only one constant state, however addressType_

#### Change overview

Factor similar code in UDP and TCP into a new version of
`IPAddress::ToLwIPAddr()` that accounts for the requested
address type (IPv4 vs IPv6).

#### Testing

Added a unit test.
@kpschoedel kpschoedel deleted the x11273-ipaddress-any branch February 14, 2022 16:54
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.

IPAddress ANY has only one constant state, however addressType
2 participants