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

Merge former IPEndPointBasis code with UDPEndPoint #11145

Merged
merged 1 commit into from
Nov 1, 2021

Conversation

kpschoedel
Copy link
Contributor

Problem

PR #11135 moved code from IPEndPointBasis into UDPEndPoint
without otherwise touching it, leaving various redundancies.

Change overview

This change merges corresponding functions, with a small amount of
refactoring of resulting bodies.

This is a step toward #7715 Virtualize System and Inet interfaces.

Testing

CI; no changes to functionality.

#### Problem

PR project-chip#11135 moved code from IPEndPointBasis into UDPEndPoint
without otherwise touching it, leaving various redundancies.

#### Change overview

This change merges corresponding functions, with a small amount of
refactoring of resulting bodies.

This is a step toward project-chip#7715 _Virtualize System and Inet interfaces_.

#### Testing

CI; no changes to functionality.
@todo
Copy link

todo bot commented Oct 28, 2021

IPAddress ANY has only one constant state, however addressType

// TODO: IPAddress ANY has only one constant state, however addressType
// has separate IPV4 and IPV6 'any' settings. This tries to correct
// for this as LWIP default if IPv4 is compiled in is to consider
// 'any == any_v4'
//
// We may want to consider having separate AnyV4 and AnyV6 constants
// inside CHIP to resolve this ambiguity
if ((address.Type() == IPAddressType::kAny) && (addressType == IPAddressType::kIPv6))
{
ipAddr = *IP6_ADDR_ANY;
}


This comment was generated by todo based on a TODO comment in 26449ef in #11145. cc @kpschoedel.

@github-actions
Copy link

github-actions bot commented Oct 28, 2021

PR #11145: Size comparison from 52db0e4 to 26449ef

Increases (2 builds for esp32)
platform target config section 52db0e4 26449ef change % change
esp32 all-clusters-app c3devkit (read only) 875926 875946 20 0.0
.flash.text 875926 875946 20 0.0
m5stack (read only) 907183 907275 92 0.0
.flash.text 907183 907275 92 0.0
Decreases (29 builds for efr32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 52db0e4 26449ef change % change
efr32 lighting-app BRD4161A (read only) 737460 737444 -16 -0.0
.text 737452 737436 -16 -0.0
BRD4161A+rpc (read only) 724900 724884 -16 -0.0
.text 724892 724876 -16 -0.0
lock-app BRD4161A (read only) 716756 716724 -32 -0.0
.text 716748 716716 -32 -0.0
window-app BRD4161A (read only) 717660 717628 -32 -0.0
.text 717652 717620 -32 -0.0
k32w lock-app k32w061+debug (read/write) 592980 592964 -16 -0.0
.text 516144 516128 -16 -0.0
linux all-clusters-app debug (read only) 1653185 1652705 -480 -0.0
.text 1383170 1382690 -480 -0.0
bridge-app debug+rpc (read only) 1282125 1281629 -496 -0.0
.text 1076085 1075589 -496 -0.0
chip-tool debug (read only) 4262181 4261685 -496 -0.0
.text 3785413 3784917 -496 -0.0
lighting-app debug+rpc (read only) 1541097 1540601 -496 -0.0
.text 1279762 1279266 -496 -0.0
ota-provider-app debug (read only) 1238617 1238137 -480 -0.0
.text 1031554 1031074 -480 -0.0
ota-requestor-app debug (read only) 1300713 1300233 -480 -0.0
.text 1075314 1074834 -480 -0.0
shell debug (read only) 787089 786593 -496 -0.1
.text 608098 607602 -496 -0.1
tv-app debug (read only) 1774209 1773713 -496 -0.0
.text 1477266 1476770 -496 -0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2290656 2290592 -64 -0.0
.text 1253256 1253192 -64 -0.0
lighting-app CY8CPROTO_062_4343W+release (read/write) 2274992 2274928 -64 -0.0
.text 1237592 1237528 -64 -0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2252712 2252584 -128 -0.0
.text 1215312 1215184 -128 -0.0
shell CY8CPROTO_062_4343W+release (read/write) 2048976 2048848 -128 -0.0
.text 1011576 1011448 -128 -0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862911 862847 -64 -0.0
text 577624 577556 -68 -0.0
nrf52840dk_nrf52840+rpc (read/write) 823735 823671 -64 -0.0
text 550800 550728 -72 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 787902 787838 -64 -0.0
text 507092 507024 -68 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 839583 839503 -80 -0.0
text 559108 559040 -68 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 764882 764818 -64 -0.0
text 488668 488600 -68 -0.0
pump-app nrf52840dk_nrf52840 (read/write) 844287 844223 -64 -0.0
text 562320 562248 -72 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 839575 839495 -80 -0.0
text 558952 558880 -72 -0.0
shell nrf52840dk_nrf52840 (read/write) 776435 776371 -64 -0.0
text 520236 520168 -68 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 691490 691426 -64 -0.0
text 440848 440776 -72 -0.0
p6 lock-app default (read/write) 2169096 2169016 -80 -0.0
.text 1127360 1127280 -80 -0.0
qpg lighting-app qpg6100+debug (read only) 491224 491216 -8 -0.0
.text 485904 485896 -8 -0.0
telink lighting-app tlsr9518adk80d (read/write) 664518 664422 -96 -0.0
text 458070 457970 -100 -0.0
Full report (37 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 52db0e4 26449ef change % change
efr32 lighting-app BRD4161A (read only) 737460 737444 -16 -0.0
(read/write) 115428 115428 0 0.0
.bss 113676 113676 0 0.0
.data 1752 1752 0 0.0
.text 737452 737436 -16 -0.0
BRD4161A+rpc (read only) 724900 724884 -16 -0.0
(read/write) 132032 132032 0 0.0
.bss 130180 130180 0 0.0
.data 1852 1852 0 0.0
.text 724892 724876 -16 -0.0
lock-app BRD4161A (read only) 716756 716724 -32 -0.0
(read/write) 113244 113244 0 0.0
.bss 111532 111532 0 0.0
.data 1712 1712 0 0.0
.text 716748 716716 -32 -0.0
window-app BRD4161A (read only) 717660 717628 -32 -0.0
(read/write) 113568 113568 0 0.0
.bss 111852 111852 0 0.0
.data 1716 1716 0 0.0
.text 717652 717620 -32 -0.0
esp32 all-clusters-app c3devkit (read only) 875926 875946 20 0.0
(read/write) 1308672 1308672 0 0.0
.dram0.bss 59248 59248 0 0.0
.dram0.data 16448 16448 0 0.0
.flash.rodata 199744 199744 0 0.0
.flash.text 875926 875946 20 0.0
.iram0.text 57554 57554 0 0.0
m5stack (read only) 907183 907275 92 0.0
(read/write) 428460 428460 0 0.0
.dram0.bss 61744 61744 0 0.0
.dram0.data 32084 32084 0 0.0
.flash.rodata 208468 208468 0 0.0
.flash.text 907183 907275 92 0.0
.iram0.text 125115 125115 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 701024 701024 0 0.0
.bss 78688 78688 0 0.0
.data 1900 1900 0 0.0
.text 614636 614636 0 0.0
lock-app k32w061+debug (read/write) 592980 592964 -16 -0.0
.bss 69172 69172 0 0.0
.data 1864 1864 0 0.0
.text 516144 516128 -16 -0.0
shell k32w061+debug (read/write) 425252 425252 0 0.0
.bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359620 359620 0 0.0
linux all-clusters-app debug (read only) 1653185 1652705 -480 -0.0
(read/write) 119104 119104 0 0.0
.bss 51376 51376 0 0.0
.data 978 978 0 0.0
.data.rel.ro 61504 61504 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 520 520 0 0.0
.rodata 137749 137749 0 0.0
.text 1383170 1382690 -480 -0.0
bridge-app debug+rpc (read only) 1282125 1281629 -496 -0.0
(read/write) 85160 85160 0 0.0
.bss 51856 51856 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27336 27336 0 0.0
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 110724 110724 0 0.0
.text 1076085 1075589 -496 -0.0
chip-tool debug (read only) 4262181 4261685 -496 -0.0
(read/write) 122176 122176 0 0.0
.bss 17680 17680 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 97504 97504 0 0.0
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 424 424 0 0.0
.rodata 213968 213968 0 0.0
.text 3785413 3784917 -496 -0.0
lighting-app debug+rpc (read only) 1541097 1540601 -496 -0.0
(read/write) 102000 102000 0 0.0
.bss 41208 41208 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 54416 54416 0 0.0
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 128881 128881 0 0.0
.text 1279762 1279266 -496 -0.0
ota-provider-app debug (read only) 1238617 1238137 -480 -0.0
(read/write) 67872 67872 0 0.0
.bss 37440 37440 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24584 24584 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 110888 110888 0 0.0
.text 1031554 1031074 -480 -0.0
ota-requestor-app debug (read only) 1300713 1300233 -480 -0.0
(read/write) 76616 76616 0 0.0
.bss 45216 45216 0 0.0
.data 816 816 0 0.0
.data.rel.ro 25464 25464 0 0.0
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 127584 127584 0 0.0
.text 1075314 1074834 -480 -0.0
shell debug (read only) 787089 786593 -496 -0.1
(read/write) 57760 57760 0 0.0
.bss 16168 16168 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36848 36848 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 77455 77455 0 0.0
.text 608098 607602 -496 -0.1
tv-app debug (read only) 1774209 1773713 -496 -0.0
(read/write) 289624 289624 0 0.0
.bss 223280 223280 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 58672 58672 0 0.0
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 154680 154680 0 0.0
.text 1477266 1476770 -496 -0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2290656 2290592 -64 -0.0
.bss 180620 180620 0 0.0
.data 5192 5192 0 0.0
.heap 850632 850632 0 0.0
.text 1253256 1253192 -64 -0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2274992 2274928 -64 -0.0
.bss 172820 172820 0 0.0
.data 5568 5568 0 0.0
.heap 858056 858056 0 0.0
.text 1237592 1237528 -64 -0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2252712 2252584 -128 -0.0
.bss 171724 171724 0 0.0
.data 5552 5552 0 0.0
.heap 859168 859168 0 0.0
.text 1215312 1215184 -128 -0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2048976 2048848 -128 -0.0
.bss 156208 156208 0 0.0
.data 4968 4968 0 0.0
.heap 875272 875272 0 0.0
.text 1011576 1011448 -128 -0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862911 862847 -64 -0.0
bss 112132 112132 0 0.0
rodata 97528 97528 0 0.0
text 577624 577556 -68 -0.0
nrf52840dk_nrf52840+rpc (read/write) 823735 823671 -64 -0.0
bss 108372 108372 0 0.0
rodata 88304 88304 0 0.0
text 550800 550728 -72 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 787902 787838 -64 -0.0
bss 113504 113504 0 0.0
rodata 92768 92768 0 0.0
text 507092 507024 -68 -0.0
lock-app nrf52840dk_nrf52840 (read/write) 839583 839503 -80 -0.0
bss 111168 111168 0 0.0
rodata 93880 93880 0 0.0
text 559108 559040 -68 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 764882 764818 -64 -0.0
bss 112576 112576 0 0.0
rodata 89188 89188 0 0.0
text 488668 488600 -68 -0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497323 497323 0 0.0
bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844287 844223 -64 -0.0
bss 111304 111304 0 0.0
rodata 95128 95128 0 0.0
text 562320 562248 -72 -0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 839575 839495 -80 -0.0
bss 111200 111200 0 0.0
rodata 93904 93904 0 0.0
text 558952 558880 -72 -0.0
shell nrf52840dk_nrf52840 (read/write) 776435 776371 -64 -0.0
bss 109072 109072 0 0.0
rodata 72536 72536 0 0.0
text 520236 520168 -68 -0.0
nrf5340dk_nrf5340_cpuapp (read/write) 691490 691426 -64 -0.0
bss 110056 110056 0 0.0
rodata 67180 67180 0 0.0
text 440848 440776 -72 -0.0
p6 lock-app default (read/write) 2169096 2169016 -80 -0.0
.bss 67168 67168 0 0.0
.data 2416 2416 0 0.0
.heap 963760 963760 0 0.0
.text 1127360 1127280 -80 -0.0
qpg lighting-app qpg6100+debug (read only) 491224 491216 -8 -0.0
(read/write) 114144 114144 0 0.0
.bss 51288 51288 0 0.0
.data 1000 1000 0 0.0
.text 485904 485896 -8 -0.0
lock-app qpg6100+debug (read only) 467556 467556 0 0.0
(read/write) 114140 114140 0 0.0
.bss 50240 50240 0 0.0
.data 956 956 0 0.0
.text 462236 462236 0 0.0
persistent-storage-app qpg6100+debug (read only) 155236 155236 0 0.0
(read/write) 114140 114140 0 0.0
.bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149916 149916 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 664518 664422 -96 -0.0
bss 69944 69944 0 0.0
noinit 33216 33216 0 0.0
text 458070 457970 -100 -0.0

kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Oct 28, 2021
#### Problem

For historical reasons, Inet EndPoints had unnecessarily deep
class hierarchy, originally:

    InetLayerBasis
      EndPointBasis
        TCPEndPoint
        IPEndPointBasis
          UDPEndPoint

Previous PRs project-chip#11135 and project-chip#11145 merged `IPEndPointBasis` with `UDPEndPoint`.

#### Change overview

This change merges `InetLayerBasis` with `EndPointBasis`, so that the
EndPoint class hierarchy is now:

    EndPointBasis
      TCPEndPoint
      UDPEndPoint

#### Testing

CI; no changes to functionality.
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Oct 29, 2021
#### Problem

For historical reasons, Inet EndPoints had unnecessarily deep
class hierarchy, originally:

    InetLayerBasis
      EndPointBasis
        TCPEndPoint
        IPEndPointBasis
          UDPEndPoint

Previous PRs project-chip#11135 and project-chip#11145 merged `IPEndPointBasis` with `UDPEndPoint`.

#### Change overview

This change merges `InetLayerBasis` with `EndPointBasis`, so that the
EndPoint class hierarchy is now:

    EndPointBasis
      TCPEndPoint
      UDPEndPoint

#### Testing

CI; no changes to functionality.
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Oct 29, 2021
#### Problem

For historical reasons, Inet EndPoints had unnecessarily deep
class hierarchy, originally:

    InetLayerBasis
      EndPointBasis
        TCPEndPoint
        IPEndPointBasis
          UDPEndPoint

Previous PRs project-chip#11135 and project-chip#11145 merged `IPEndPointBasis` with `UDPEndPoint`.

#### Change overview

This change merges `InetLayerBasis` with `EndPointBasis`, so that the
EndPoint class hierarchy is now:

    EndPointBasis
      TCPEndPoint
      UDPEndPoint

#### Testing

CI; no changes to functionality.
@andy31415 andy31415 merged commit 1722625 into project-chip:master Nov 1, 2021
Damian-Nordic pushed a commit that referenced this pull request Nov 2, 2021
* Collapse InetLayerBasis into EndPointBasis

#### Problem

For historical reasons, Inet EndPoints had unnecessarily deep
class hierarchy, originally:

    InetLayerBasis
      EndPointBasis
        TCPEndPoint
        IPEndPointBasis
          UDPEndPoint

Previous PRs #11135 and #11145 merged `IPEndPointBasis` with `UDPEndPoint`.

#### Change overview

This change merges `InetLayerBasis` with `EndPointBasis`, so that the
EndPoint class hierarchy is now:

    EndPointBasis
      TCPEndPoint
      UDPEndPoint

#### Testing

CI; no changes to functionality.

* reorder members to avoid structure size increase on some platforms
@kpschoedel kpschoedel deleted the x7715-ipendpointbasis-2 branch November 4, 2021 14:48
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
#### Problem

PR project-chip#11135 moved code from IPEndPointBasis into UDPEndPoint
without otherwise touching it, leaving various redundancies.

#### Change overview

This change merges corresponding functions, with a small amount of
refactoring of resulting bodies.

This is a step toward project-chip#7715 _Virtualize System and Inet interfaces_.

#### Testing

CI; no changes to functionality.
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
* Collapse InetLayerBasis into EndPointBasis

#### Problem

For historical reasons, Inet EndPoints had unnecessarily deep
class hierarchy, originally:

    InetLayerBasis
      EndPointBasis
        TCPEndPoint
        IPEndPointBasis
          UDPEndPoint

Previous PRs project-chip#11135 and project-chip#11145 merged `IPEndPointBasis` with `UDPEndPoint`.

#### Change overview

This change merges `InetLayerBasis` with `EndPointBasis`, so that the
EndPoint class hierarchy is now:

    EndPointBasis
      TCPEndPoint
      UDPEndPoint

#### Testing

CI; no changes to functionality.

* reorder members to avoid structure size increase on some platforms
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.

5 participants