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: Split UDPEndPoint and TCPEndPoint #11681

Merged
merged 1 commit into from
Nov 15, 2021

Conversation

kpschoedel
Copy link
Contributor

Problem

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

Change overview

  • The per-implementation subclasses (formerly #if sections) of
    EndPointBase didn't actually depend on EndPointBase at all,
    so they are split off into EndPointState${IMPL} classes,
    separately inherited by the leaf classes.

  • UDPEndPoint and TCPEndPoint are split into base classes and
    per-implementation subclasses. Transitionally, the implementation
    classes remain in the main files, and are instantiated using a single
    concrete name by #if.

Testing

CI; no changes to functionality.

#### Problem

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

#### Change overview

- The per-implementation subclasses (formerly `#if` sections) of
  `EndPointBase` didn't actually depend on `EndPointBase` at all,
  so they are split off into `EndPointState${IMPL}` classes,
  separately inherited by the leaf classes.

- `UDPEndPoint` and `TCPEndPoint` are split into base classes and
  per-implementation subclasses. Transitionally, the implementation
  classes remain the main files, and are instantiated using a single
  concrete name by `#if`.

#### Testing

CI; no changes to functionality.
@kpschoedel kpschoedel force-pushed the x7715-endpoint-split-2 branch from 99003b8 to 0d80fc9 Compare November 11, 2021 22:55
@github-actions
Copy link

github-actions bot commented Nov 11, 2021

PR #11681: Size comparison from 4ae5f21 to 0d80fc9

Increases above 0.2%:

platform target config section 4ae5f21 0d80fc9 change % change
linux all-clusters-app debug .data.rel.ro 62256 62416 160 0.3
bridge-app debug+rpc .data.rel.ro 27928 28088 160 0.6
lighting-app debug+rpc .data.rel.ro 55456 55616 160 0.3
ota-provider-app debug .data.rel.ro 24776 24936 160 0.6
ota-requestor-app debug .data.rel.ro 26040 26200 160 0.6
shell debug (read only) 788905 793529 4624 0.6
(read/write) 65064 65544 480 0.7
.data.rel.ro 36928 37392 464 1.3
.text 609170 612514 3344 0.5
tv-app debug .data.rel.ro 59600 59760 160 0.3
Increases (35 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 4ae5f21 0d80fc9 change % change
efr32 lighting-app BRD4161A (read only) 745392 745464 72 0.0
.text 745384 745456 72 0.0
BRD4161A+rpc (read only) 732916 733004 88 0.0
.text 732908 732996 88 0.0
lock-app BRD4161A (read only) 722208 722296 88 0.0
.text 722200 722288 88 0.0
window-app BRD4161A (read only) 723136 723208 72 0.0
.text 723128 723200 72 0.0
esp32 all-clusters-app c3devkit (read only) 821900 821988 88 0.0
(read/write) 1221938 1221986 48 0.0
.flash.rodata 166760 166808 48 0.0
.flash.text 821900 821988 88 0.0
m5stack (read only) 892991 893127 136 0.0
(read/write) 420112 420160 48 0.0
.flash.rodata 193812 193860 48 0.0
.flash.text 887607 887743 136 0.0
k32w lighting-app k32w061+se05x+release (read/write) 700508 700660 152 0.0
.text 615324 615476 152 0.0
lock-app k32w061+debug (read/write) 591728 591880 152 0.0
.text 516056 516208 152 0.0
shell k32w061+debug (read/write) 657408 657548 140 0.0
.text 570976 571116 140 0.0
linux all-clusters-app debug (read only) 1701033 1701641 608 0.0
(read/write) 125856 126016 160 0.1
.data.rel.ro 62256 62416 160 0.3
.text 1428066 1428194 128 0.0
bridge-app debug+rpc (read only) 1300629 1301221 592 0.0
(read/write) 77264 77424 160 0.2
.data.rel.ro 27928 28088 160 0.6
.text 1092933 1093045 112 0.0
chip-tool debug (read only) 4914173 4914797 624 0.0
(read/write) 154120 154280 160 0.1
.data.rel.ro 105312 105472 160 0.2
.rodata 258474 258506 32 0.0
.text 4375525 4375637 112 0.0
lighting-app debug+rpc (read only) 1567289 1567897 608 0.0
(read/write) 109936 110096 160 0.1
.data.rel.ro 55456 55616 160 0.3
.text 1303890 1304018 128 0.0
ota-provider-app debug (read only) 1260345 1260937 592 0.0
(read/write) 75048 75208 160 0.2
.data.rel.ro 24776 24936 160 0.6
.text 1050706 1050818 112 0.0
ota-requestor-app debug (read only) 1345417 1346009 592 0.0
(read/write) 78816 78976 160 0.2
.data.rel.ro 26040 26200 160 0.6
.text 1122114 1122226 112 0.0
shell debug (read only) 788905 793529 4624 0.6
(read/write) 65064 65544 480 0.7
.data.rel.ro 36928 37392 464 1.3
.text 609170 612514 3344 0.5
tv-app debug (read only) 1845017 1845641 624 0.0
(read/write) 407640 407800 160 0.0
.data.rel.ro 59600 59760 160 0.3
.rodata 156173 156205 32 0.0
.text 1544370 1544482 112 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2289352 2289592 240 0.0
.text 1251952 1252192 240 0.0
lighting-app CY8CPROTO_062_4343W+release (read/write) 2272824 2273064 240 0.0
.text 1235424 1235664 240 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2248448 2248752 304 0.0
.text 1211048 1211352 304 0.0
shell CY8CPROTO_062_4343W+release (read/write) 2048376 2049144 768 0.0
.text 1010976 1011744 768 0.1
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 863015 863155 140 0.0
rodata 96888 96932 44 0.0
text 579568 579664 96 0.0
nrf52840dk_nrf52840+rpc (read/write) 825391 825531 140 0.0
rodata 88080 88124 44 0.0
text 553740 553836 96 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 788058 788198 140 0.0
rodata 92148 92192 44 0.0
text 509036 509132 96 0.0
lock-app nrf52840dk_nrf52840 (read/write) 838235 838375 140 0.0
rodata 92956 93000 44 0.0
text 559868 559968 100 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 763546 763686 140 0.0
rodata 88260 88304 44 0.0
text 489428 489528 100 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844327 844467 140 0.0
rodata 94664 94708 44 0.0
text 564032 564128 96 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 838087 838243 156 0.0
rodata 92952 92996 44 0.0
text 559604 559704 100 0.0
shell nrf52840dk_nrf52840 (read/write) 775483 775655 172 0.0
bss 108736 108744 8 0.0
rodata 72160 72204 44 0.1
text 520008 520108 100 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 690538 690678 140 0.0
bss 109720 109728 8 0.0
rodata 66804 66848 44 0.1
text 440616 440716 100 0.0
p6 all-clusters-app default (read/write) 2297296 2297344 48 0.0
.text 1255560 1255608 48 0.0
lock-app default (read/write) 2211896 2211960 64 0.0
.text 1170160 1170224 64 0.0
qpg lighting-app qpg6100+debug (read only) 492324 492476 152 0.0
.text 487004 487156 152 0.0
lock-app qpg6100+debug (read only) 467060 467212 152 0.0
.text 461740 461892 152 0.0
telink lighting-app tlsr9518adk80d (read/write) 665202 665342 140 0.0
text 460046 460142 96 0.0
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 4ae5f21 0d80fc9 change % change
efr32 lighting-app BRD4161A (read only) 745392 745464 72 0.0
(read/write) 115764 115764 0 0.0
.bss 113980 113980 0 0.0
.data 1784 1784 0 0.0
.text 745384 745456 72 0.0
BRD4161A+rpc (read only) 732916 733004 88 0.0
(read/write) 132392 132392 0 0.0
.bss 130484 130484 0 0.0
.data 1908 1908 0 0.0
.text 732908 732996 88 0.0
lock-app BRD4161A (read only) 722208 722296 88 0.0
(read/write) 113548 113548 0 0.0
.bss 111804 111804 0 0.0
.data 1740 1740 0 0.0
.text 722200 722288 88 0.0
window-app BRD4161A (read only) 723136 723208 72 0.0
(read/write) 113868 113868 0 0.0
.bss 112124 112124 0 0.0
.data 1744 1744 0 0.0
.text 723128 723200 72 0.0
esp32 all-clusters-app c3devkit (read only) 821900 821988 88 0.0
(read/write) 1221938 1221986 48 0.0
.dram0.bss 55832 55832 0 0.0
.dram0.data 14092 14092 0 0.0
.flash.rodata 166760 166808 48 0.0
.flash.text 821900 821988 88 0.0
.iram0.text 61394 61394 0 0.0
m5stack (read only) 892991 893127 136 0.0
(read/write) 420112 420160 48 0.0
.dram0.bss 60920 60920 0 0.0
.dram0.data 34056 34056 0 0.0
.flash.rodata 193812 193860 48 0.0
.flash.text 887607 887743 136 0.0
.iram0.text 122987 122987 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 700508 700660 152 0.0
.bss 77476 77476 0 0.0
.data 1908 1908 0 0.0
.text 615324 615476 152 0.0
lock-app k32w061+debug (read/write) 591728 591880 152 0.0
.bss 67996 67996 0 0.0
.data 1876 1876 0 0.0
.text 516056 516208 152 0.0
shell k32w061+debug (read/write) 657408 657548 140 0.0
.bss 78788 78788 0 0.0
.data 1844 1844 0 0.0
.text 570976 571116 140 0.0
linux all-clusters-app debug (read only) 1701033 1701641 608 0.0
(read/write) 125856 126016 160 0.1
.bss 57328 57328 0 0.0
.data 1010 1010 0 0.0
.data.rel.ro 62256 62416 160 0.3
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 139477 139477 0 0.0
.text 1428066 1428194 128 0.0
bridge-app debug+rpc (read only) 1300629 1301221 592 0.0
(read/write) 77264 77424 160 0.2
.bss 42800 42800 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 27928 28088 160 0.6
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 408 408 0 0.0
.rodata 111252 111252 0 0.0
.text 1092933 1093045 112 0.0
chip-tool debug (read only) 4914173 4914797 624 0.0
(read/write) 154120 154280 160 0.1
.bss 41096 41096 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 105312 105472 160 0.2
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 258474 258506 32 0.0
.text 4375525 4375637 112 0.0
lighting-app debug+rpc (read only) 1567289 1567897 608 0.0
(read/write) 109936 110096 160 0.1
.bss 47984 47984 0 0.0
.data 1202 1202 0 0.0
.data.rel.ro 55456 55616 160 0.3
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 536 536 0 0.0
.rodata 129169 129169 0 0.0
.text 1303890 1304018 128 0.0
ota-provider-app debug (read only) 1260345 1260937 592 0.0
(read/write) 75048 75208 160 0.2
.bss 44416 44416 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24776 24936 160 0.6
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 448 448 0 0.0
.rodata 112839 112839 0 0.0
.text 1050706 1050818 112 0.0
ota-requestor-app debug (read only) 1345417 1346009 592 0.0
(read/write) 78816 78976 160 0.2
.bss 46880 46880 0 0.0
.data 816 816 0 0.0
.data.rel.ro 26040 26200 160 0.6
.dynamic 592 592 0 0.0
.got 3992 3992 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 123952 123952 0 0.0
.text 1122114 1122226 112 0.0
shell debug (read only) 788905 793529 4624 0.6
(read/write) 65064 65544 480 0.7
.bss 23400 23400 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36928 37392 464 1.3
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 344 344 0 0.0
.rodata 77839 77839 0 0.0
.text 609170 612514 3344 0.5
tv-app debug (read only) 1845017 1845641 624 0.0
(read/write) 407640 407800 160 0.0
.bss 339656 339656 0 0.0
.data 2736 2736 0 0.0
.data.rel.ro 59600 59760 160 0.3
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 156173 156205 32 0.0
.text 1544370 1544482 112 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2289352 2289592 240 0.0
.bss 179412 179412 0 0.0
.data 5216 5216 0 0.0
.heap 851816 851816 0 0.0
.text 1251952 1252192 240 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2272824 2273064 240 0.0
.bss 172524 172524 0 0.0
.data 5576 5576 0 0.0
.heap 858344 858344 0 0.0
.text 1235424 1235664 240 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2248448 2248752 304 0.0
.bss 171404 171404 0 0.0
.data 5568 5568 0 0.0
.heap 859472 859472 0 0.0
.text 1211048 1211352 304 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) 2048376 2049144 768 0.0
.bss 155912 155912 0 0.0
.data 4968 4968 0 0.0
.heap 875568 875568 0 0.0
.text 1010976 1011744 768 0.1
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 863015 863155 140 0.0
bss 110932 110932 0 0.0
rodata 96888 96932 44 0.0
text 579568 579664 96 0.0
nrf52840dk_nrf52840+rpc (read/write) 825391 825531 140 0.0
bss 107284 107284 0 0.0
rodata 88080 88124 44 0.0
text 553740 553836 96 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 788058 788198 140 0.0
bss 112304 112304 0 0.0
rodata 92148 92192 44 0.0
text 509036 509132 96 0.0
lock-app nrf52840dk_nrf52840 (read/write) 838235 838375 140 0.0
bss 109956 109956 0 0.0
rodata 92956 93000 44 0.0
text 559868 559968 100 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 763546 763686 140 0.0
bss 111368 111368 0 0.0
rodata 88260 88304 44 0.0
text 489428 489528 100 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497327 497327 0 0.0
bss 51824 51824 0 0.0
rodata 45780 45780 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844327 844467 140 0.0
bss 110096 110096 0 0.0
rodata 94664 94708 44 0.0
text 564032 564128 96 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 838087 838243 156 0.0
bss 109992 109992 0 0.0
rodata 92952 92996 44 0.0
text 559604 559704 100 0.0
shell nrf52840dk_nrf52840 (read/write) 775483 775655 172 0.0
bss 108736 108744 8 0.0
rodata 72160 72204 44 0.1
text 520008 520108 100 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 690538 690678 140 0.0
bss 109720 109728 8 0.0
rodata 66804 66848 44 0.1
text 440616 440716 100 0.0
p6 all-clusters-app default (read/write) 2297296 2297344 48 0.0
.bss 112416 112416 0 0.0
.data 2520 2520 0 0.0
.heap 918408 918408 0 0.0
.text 1255560 1255608 48 0.0
lock-app default (read/write) 2211896 2211960 64 0.0
.bss 101264 101264 0 0.0
.data 2400 2400 0 0.0
.heap 929680 929680 0 0.0
.text 1170160 1170224 64 0.0
qpg lighting-app qpg6100+debug (read only) 492324 492476 152 0.0
(read/write) 114144 114144 0 0.0
.bss 50624 50624 0 0.0
.data 1008 1008 0 0.0
.text 487004 487156 152 0.0
lock-app qpg6100+debug (read only) 467060 467212 152 0.0
(read/write) 114140 114140 0 0.0
.bss 49560 49560 0 0.0
.data 964 964 0 0.0
.text 461740 461892 152 0.0
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8978 8978 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 665202 665342 140 0.0
bss 69304 69304 0 0.0
noinit 33216 33216 0 0.0
text 460046 460142 96 0.0

@andy31415
Copy link
Contributor

fast track: PR up long enough for cross-timezone review, has several checkmarks without comments already.

@andy31415 andy31415 merged commit 6417231 into project-chip:master Nov 15, 2021
@kpschoedel kpschoedel deleted the x7715-endpoint-split-2 branch November 15, 2021 15:26
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
#### Problem

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

#### Change overview

- The per-implementation subclasses (formerly `#if` sections) of
  `EndPointBase` didn't actually depend on `EndPointBase` at all,
  so they are split off into `EndPointState${IMPL}` classes,
  separately inherited by the leaf classes.

- `UDPEndPoint` and `TCPEndPoint` are split into base classes and
  per-implementation subclasses. Transitionally, the implementation
  classes remain the main files, and are instantiated using a single
  concrete name by `#if`.

#### Testing

CI; no changes to functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants