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 InetLayer class #12291

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

kpschoedel
Copy link
Contributor

Problem

This is a step toward #7715 Virtualize System and Inet interfaces
for mockability, building on recent virtualization of Inet endpoints
and changes to object allocation pools.

The InetLayer class acts as a factory for UDPEndPoint and TCPEndPoint.
Merely making its methods virtual would result in an unacceptable code
size increase for applications that do not use TCP on platforms that
offer it, since the vtable would introduce a dependency that normal
linking doesn't remove.

Change overview

  • Split the EndPoint factory/iteration code into its own class,
    EndPointManager. InetLayer remains as a stub wrapper for the pair
    of Managers.
  • EndPointBasis now templated on EndPoint type to reduce code duplication.
  • Move the code for TCP idle timeout from InetLayer to TCPEndPoint.
  • Move IPPacketInfo from InetLayer.h to its own files.

NOTE that applications that use CHIP TCP must now explicitly initialize
it via InetLayer::InitTCP().

Testing

CI; no changes to external functionality. Tests revised where necessary

#### Problem

This is a step toward project-chip#7715 _Virtualize System and Inet interfaces_
for mockability, building on recent virtualization of Inet endpoints
and changes to object allocation pools.

The `InetLayer` class acts as a factory for `UDPEndPoint` and `TCPEndPoint`.
Merely making its methods virtual would result in an unacceptable code
size increase for applications that do not use TCP on platforms that
offer it, since the vtable would introduce a dependency that normal
linking doesn't remove.

#### Change overview

- Split the `EndPoint` factory/iteration code into its own class,
  `EndPointManager`. `InetLayer` remains as a stub wrapper for the pair
  of Managers.
- Move the code for TCP idle timeout from `InetLayer` to `TCPEndPoint`.
- Move `IPPacketInfo` from `InetLayer.h` to its own files.

**NOTE** that applications that use CHIP TCP must now explicitly initialize
it via `InetLayer::InitTCP()`.

#### Testing

CI; no changes to external functionality. Tests revised where necessary
to initialize TCP.
@todo
Copy link

todo bot commented Nov 26, 2021

Use the Impl's underlying ObjectPool statistics

// TODO: Use the Impl's underlying ObjectPool statistics
SYSTEM_STATS_INCREMENT(EndPointProperties<EndPointType>::SystemStatsKey);
return CHIP_NO_ERROR;
}
virtual EndPoint * CreateEndPoint() = 0;
virtual void DeleteEndPoint(EndPoint * endPoint) = 0;
virtual bool ForEachEndPoint(const EndPointVisitor visitor) = 0;
private:
System::Layer * mSystemLayer;


This comment was generated by todo based on a TODO comment in 5dd2f93 in #12291. cc @kpschoedel.

@kpschoedel
Copy link
Contributor Author

Potential followups:

  • Most code that stores or passes an InetLayer only uses the UDPEndPoint factory; consider passing the latter directly to remove an unneeded indirection.
  • EndPointManager isn't really EndPoint-specific; it's just a virtualized ObjectPool wrapper. There might be a useful generalization.

@github-actions
Copy link

github-actions bot commented Nov 26, 2021

PR #12291: Size comparison from 514cf19 to 5dd2f93

Increases above 0.2%:

platform target config section 514cf19 5dd2f93 change % change
linux bridge-app debug+rpc .data.rel.ro 29384 29488 104 0.4
ota-provider-app debug .data.rel.ro 25944 26024 80 0.3
ota-requestor-app debug .data.rel.ro 27272 27352 80 0.3
shell debug .data 338 370 32 9.5
.rodata 79023 79759 736 0.9
p6 all-clusters-app default .heap 916112 921264 5152 0.6
lock-app default .heap 929952 935104 5152 0.6
Increases (36 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 514cf19 5dd2f93 change % change
efr32 lighting-app BRD4161A (read only) 762072 762152 80 0.0
.text 762064 762144 80 0.0
BRD4161A+rpc (read only) 749740 749820 80 0.0
.text 749732 749812 80 0.0
lock-app BRD4161A (read only) 736032 736112 80 0.0
.text 736024 736104 80 0.0
window-app BRD4161A (read only) 739096 739160 64 0.0
.text 739088 739152 64 0.0
esp32 all-clusters-app c3devkit (read only) 836422 836632 210 0.0
.flash.rodata 165968 165976 8 0.0
.flash.text 836422 836632 210 0.0
m5stack (read only) 907823 907951 128 0.0
.flash.rodata 193804 193820 16 0.0
.flash.text 902439 902567 128 0.0
k32w lighting-app k32w061+se05x+release (read/write) 723208 723360 152 0.0
.bss 78292 78308 16 0.0
.text 637160 637300 140 0.0
lock-app k32w061+debug (read/write) 612280 612424 144 0.0
.bss 68740 68748 8 0.0
.text 535820 535960 140 0.0
shell k32w061+debug (read/write) 677600 677744 144 0.0
.bss 79892 79908 16 0.0
.text 590016 590148 132 0.0
linux all-clusters-app debug .data.rel.ro 64928 65024 96 0.1
.rodata 138869 138997 128 0.1
bridge-app debug+rpc .data.rel.ro 29384 29488 104 0.4
.rodata 113500 113660 160 0.1
chip-tool debug .data.rel.ro 151888 151992 104 0.1
.rodata 291816 291944 128 0.0
lighting-app debug+rpc .data.rel.ro 56976 57072 96 0.2
.rodata 131793 131889 96 0.1
ota-provider-app debug .data.rel.ro 25944 26024 80 0.3
.rodata 114832 115024 192 0.2
ota-requestor-app debug .data.rel.ro 27272 27352 80 0.3
.rodata 126304 126496 192 0.2
shell debug .data 338 370 32 9.5
.rodata 79023 79759 736 0.9
tv-app debug .data.rel.ro 61368 61456 88 0.1
.rodata 159848 159976 128 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2294736 2294888 152 0.0
.heap 849320 849648 328 0.0
.text 1257336 1257488 152 0.0
lighting-app CY8CPROTO_062_4343W+release (read/write) 2279952 2280104 152 0.0
.heap 858352 858680 328 0.0
.text 1242552 1242704 152 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2253096 2253248 152 0.0
.heap 859552 859880 328 0.0
.text 1215696 1215848 152 0.0
shell CY8CPROTO_062_4343W+release .heap 874968 875304 336 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 875499 875635 136 0.0
bss 112660 112672 12 0.0
rodata 97188 97212 24 0.0
text 590008 590124 116 0.0
nrf52840dk_nrf52840+rpc (read/write) 838075 838195 120 0.0
bss 109012 109024 12 0.0
rodata 88436 88460 24 0.0
text 564312 564424 112 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 800538 800674 136 0.0
bss 114036 114048 12 0.0
rodata 92444 92468 24 0.0
text 519472 519588 116 0.0
lock-app nrf52840dk_nrf52840 (read/write) 846427 846563 136 0.0
bss 109700 109712 12 0.0
rodata 92972 92996 24 0.0
text 568280 568396 116 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 771698 771850 152 0.0
bss 111108 111120 12 0.0
rodata 88260 88284 24 0.0
text 497832 497952 120 0.0
pump-app nrf52840dk_nrf52840 (read/write) 852399 852535 136 0.0
bss 109836 109848 12 0.0
rodata 94680 94704 24 0.0
text 572324 572440 116 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 845523 845659 136 0.0
bss 109712 109724 12 0.0
rodata 92844 92868 24 0.0
text 567408 567528 120 0.0
shell nrf52840dk_nrf52840 (read/write) 778447 778599 152 0.0
bss 109180 109192 12 0.0
rodata 73084 73108 24 0.0
text 521576 521684 108 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 693482 693618 136 0.0
bss 110164 110176 12 0.0
rodata 67724 67748 24 0.0
text 442184 442296 112 0.0
p6 all-clusters-app default (read/write) 2311176 2311296 120 0.0
.heap 916112 921264 5152 0.6
.text 1269440 1269560 120 0.0
lock-app default (read/write) 2222992 2223136 144 0.0
.heap 929952 935104 5152 0.6
.text 1181256 1181400 144 0.0
qpg lighting-app qpg6100+debug (read only) 502992 503124 132 0.0
.bss 50400 50416 16 0.0
.text 497672 497804 132 0.0
lock-app qpg6100+debug (read only) 475708 475840 132 0.0
(read/write) 114140 114144 4 0.0
.bss 49272 49288 16 0.0
.text 470388 470520 132 0.0
persistent-storage-app qpg6100+debug (read/write) 114138 114142 4 0.0
telink lighting-app tlsr9518adk80d (read/write) 777286 777446 160 0.0
bss 79236 79252 16 0.0
text 540616 540740 124 0.0
Decreases (26 builds for efr32, esp32, k32w, linux, mbed, p6, qpg)
platform target config section 514cf19 5dd2f93 change % change
efr32 lighting-app BRD4161A (read/write) 119836 119492 -344 -0.3
.bss 118012 117676 -336 -0.3
.data 1820 1812 -8 -0.4
BRD4161A+rpc (read/write) 136460 136116 -344 -0.3
.bss 134516 134180 -336 -0.2
.data 1944 1936 -8 -0.4
lock-app BRD4161A (read/write) 117540 117196 -344 -0.3
.bss 115764 115428 -336 -0.3
.data 1776 1768 -8 -0.5
window-app BRD4161A (read/write) 117972 117628 -344 -0.3
.bss 116188 115852 -336 -0.3
.data 1784 1776 -8 -0.4
esp32 all-clusters-app c3devkit (read/write) 1224474 1223826 -648 -0.1
.dram0.bss 59144 58488 -656 -1.1
m5stack (read/write) 423692 423060 -632 -0.1
.dram0.bss 64536 63888 -648 -1.0
k32w lighting-app k32w061+se05x+release .data 1956 1952 -4 -0.2
lock-app k32w061+debug .data 1920 1916 -4 -0.2
shell k32w061+debug .data 1892 1888 -4 -0.2
linux all-clusters-app debug (read only) 1774185 1773497 -688 -0.0
(read/write) 131544 124424 -7120 -5.4
.bss 60144 52944 -7200 -12.0
.init_array 576 560 -16 -2.8
.text 1496946 1496034 -912 -0.1
bridge-app debug+rpc (read only) 1348509 1347821 -688 -0.1
(read/write) 77856 70768 -7088 -9.1
.bss 41744 34576 -7168 -17.2
.init_array 424 408 -16 -3.8
.text 1134917 1133973 -944 -0.1
chip-tool debug (read only) 6085653 6084965 -688 -0.0
(read/write) 199920 192808 -7112 -3.6
.bss 40064 32872 -7192 -18.0
.init_array 488 472 -16 -3.3
.text 5404709 5403797 -912 -0.0
lighting-app debug+rpc (read only) 1628153 1627433 -720 -0.0
(read/write) 111104 103984 -7120 -6.4
.bss 47440 40240 -7200 -15.2
.init_array 552 536 -16 -2.9
.text 1358642 1357730 -912 -0.1
ota-provider-app debug (read only) 1309537 1308913 -624 -0.0
(read/write) 76312 69224 -7088 -9.3
.bss 44320 37152 -7168 -16.2
.init_array 464 448 -16 -3.4
.text 1094354 1093442 -912 -0.1
ota-requestor-app debug (read only) 1405977 1405353 -624 -0.0
(read/write) 80144 73056 -7088 -8.8
.bss 46752 39584 -7168 -15.3
.init_array 488 472 -16 -3.3
.text 1176530 1175618 -912 -0.1
shell debug (read only) 820321 804441 -15880 -1.9
(read/write) 66936 59496 -7440 -11.1
.bss 23496 16328 -7168 -30.5
.data.rel.ro 38560 38320 -240 -0.6
.got 3560 3504 -56 -1.6
.init_array 360 344 -16 -4.4
.text 634610 619362 -15248 -2.4
tv-app debug (read only) 1918385 1917697 -688 -0.0
(read/write) 320152 313032 -7120 -2.2
.bss 250232 243032 -7200 -2.9
.init_array 632 616 -16 -2.5
.text 1610338 1609426 -912 -0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release .bss 181884 181564 -320 -0.2
.data 5240 5232 -8 -0.2
lighting-app CY8CPROTO_062_4343W+release .bss 172492 172172 -320 -0.2
.data 5600 5592 -8 -0.1
lock-app CY8CPROTO_062_4343W+release .bss 171308 170988 -320 -0.2
.data 5584 5576 -8 -0.1
shell CY8CPROTO_062_4343W+release (read/write) 2050936 2045856 -5080 -0.2
.bss 156496 156168 -328 -0.2
.data 4984 4976 -8 -0.2
.text 1013536 1008456 -5080 -0.5
p6 all-clusters-app default .bss 114688 109544 -5144 -4.5
.data 2544 2536 -8 -0.3
lock-app default .bss 100976 95832 -5144 -5.1
.data 2416 2408 -8 -0.3
qpg lighting-app qpg6100+debug (read/write) 114144 114140 -4 -0.0
.data 1024 1020 -4 -0.4
lock-app qpg6100+debug .data 980 976 -4 -0.4
persistent-storage-app qpg6100+debug (read only) 105424 105368 -56 -0.1
.bss 12002 11826 -176 -1.5
.data 276 272 -4 -1.4
.text 100104 100048 -56 -0.1
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 514cf19 5dd2f93 change % change
efr32 lighting-app BRD4161A (read only) 762072 762152 80 0.0
(read/write) 119836 119492 -344 -0.3
.bss 118012 117676 -336 -0.3
.data 1820 1812 -8 -0.4
.text 762064 762144 80 0.0
BRD4161A+rpc (read only) 749740 749820 80 0.0
(read/write) 136460 136116 -344 -0.3
.bss 134516 134180 -336 -0.2
.data 1944 1936 -8 -0.4
.text 749732 749812 80 0.0
lock-app BRD4161A (read only) 736032 736112 80 0.0
(read/write) 117540 117196 -344 -0.3
.bss 115764 115428 -336 -0.3
.data 1776 1768 -8 -0.5
.text 736024 736104 80 0.0
window-app BRD4161A (read only) 739096 739160 64 0.0
(read/write) 117972 117628 -344 -0.3
.bss 116188 115852 -336 -0.3
.data 1784 1776 -8 -0.4
.text 739088 739152 64 0.0
esp32 all-clusters-app c3devkit (read only) 836422 836632 210 0.0
(read/write) 1224474 1223826 -648 -0.1
.dram0.bss 59144 58488 -656 -1.1
.dram0.data 14100 14100 0 0.0
.flash.rodata 165968 165976 8 0.0
.flash.text 836422 836632 210 0.0
.iram0.text 61394 61394 0 0.0
m5stack (read only) 907823 907951 128 0.0
(read/write) 423692 423060 -632 -0.1
.dram0.bss 64536 63888 -648 -1.0
.dram0.data 34072 34072 0 0.0
.flash.rodata 193804 193820 16 0.0
.flash.text 902439 902567 128 0.0
.iram0.text 122943 122943 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 723208 723360 152 0.0
.bss 78292 78308 16 0.0
.data 1956 1952 -4 -0.2
.text 637160 637300 140 0.0
lock-app k32w061+debug (read/write) 612280 612424 144 0.0
.bss 68740 68748 8 0.0
.data 1920 1916 -4 -0.2
.text 535820 535960 140 0.0
shell k32w061+debug (read/write) 677600 677744 144 0.0
.bss 79892 79908 16 0.0
.data 1892 1888 -4 -0.2
.text 590016 590148 132 0.0
linux all-clusters-app debug (read only) 1774185 1773497 -688 -0.0
(read/write) 131544 124424 -7120 -5.4
.bss 60144 52944 -7200 -12.0
.data 1170 1170 0 0.0
.data.rel.ro 64928 65024 96 0.1
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 576 560 -16 -2.8
.rodata 138869 138997 128 0.1
.text 1496946 1496034 -912 -0.1
bridge-app debug+rpc (read only) 1348509 1347821 -688 -0.1
(read/write) 77856 70768 -7088 -9.1
.bss 41744 34576 -7168 -17.2
.data 1680 1680 0 0.0
.data.rel.ro 29384 29488 104 0.4
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 424 408 -16 -3.8
.rodata 113500 113660 160 0.1
.text 1134917 1133973 -944 -0.1
chip-tool debug (read only) 6085653 6084965 -688 -0.0
(read/write) 199920 192808 -7112 -3.6
.bss 40064 32872 -7192 -18.0
.data 2384 2384 0 0.0
.data.rel.ro 151888 151992 104 0.1
.dynamic 592 592 0 0.0
.got 4456 4456 0 0.0
.init 27 27 0 0.0
.init_array 488 472 -16 -3.3
.rodata 291816 291944 128 0.0
.text 5404709 5403797 -912 -0.0
lighting-app debug+rpc (read only) 1628153 1627433 -720 -0.0
(read/write) 111104 103984 -7120 -6.4
.bss 47440 40240 -7200 -15.2
.data 1362 1362 0 0.0
.data.rel.ro 56976 57072 96 0.2
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 552 536 -16 -2.9
.rodata 131793 131889 96 0.1
.text 1358642 1357730 -912 -0.1
ota-provider-app debug (read only) 1309537 1308913 -624 -0.0
(read/write) 76312 69224 -7088 -9.3
.bss 44320 37152 -7168 -16.2
.data 912 912 0 0.0
.data.rel.ro 25944 26024 80 0.3
.dynamic 592 592 0 0.0
.got 4048 4048 0 0.0
.init 27 27 0 0.0
.init_array 464 448 -16 -3.4
.rodata 114832 115024 192 0.2
.text 1094354 1093442 -912 -0.1
ota-requestor-app debug (read only) 1405977 1405353 -624 -0.0
(read/write) 80144 73056 -7088 -8.8
.bss 46752 39584 -7168 -15.3
.data 976 976 0 0.0
.data.rel.ro 27272 27352 80 0.3
.dynamic 592 592 0 0.0
.got 4032 4032 0 0.0
.init 27 27 0 0.0
.init_array 488 472 -16 -3.3
.rodata 126304 126496 192 0.2
.text 1176530 1175618 -912 -0.1
shell debug (read only) 820321 804441 -15880 -1.9
(read/write) 66936 59496 -7440 -11.1
.bss 23496 16328 -7168 -30.5
.data 338 370 32 9.5
.data.rel.ro 38560 38320 -240 -0.6
.dynamic 592 592 0 0.0
.got 3560 3504 -56 -1.6
.init 27 27 0 0.0
.init_array 360 344 -16 -4.4
.rodata 79023 79759 736 0.9
.text 634610 619362 -15248 -2.4
tv-app debug (read only) 1918385 1917697 -688 -0.0
(read/write) 320152 313032 -7120 -2.2
.bss 250232 243032 -7200 -2.9
.data 2880 2880 0 0.0
.data.rel.ro 61368 61456 88 0.1
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 632 616 -16 -2.5
.rodata 159848 159976 128 0.1
.text 1610338 1609426 -912 -0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2294736 2294888 152 0.0
.bss 181884 181564 -320 -0.2
.data 5240 5232 -8 -0.2
.heap 849320 849648 328 0.0
.text 1257336 1257488 152 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2279952 2280104 152 0.0
.bss 172492 172172 -320 -0.2
.data 5600 5592 -8 -0.1
.heap 858352 858680 328 0.0
.text 1242552 1242704 152 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2253096 2253248 152 0.0
.bss 171308 170988 -320 -0.2
.data 5584 5576 -8 -0.1
.heap 859552 859880 328 0.0
.text 1215696 1215848 152 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) 2050936 2045856 -5080 -0.2
.bss 156496 156168 -328 -0.2
.data 4984 4976 -8 -0.2
.heap 874968 875304 336 0.0
.text 1013536 1008456 -5080 -0.5
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 875499 875635 136 0.0
bss 112660 112672 12 0.0
rodata 97188 97212 24 0.0
text 590008 590124 116 0.0
nrf52840dk_nrf52840+rpc (read/write) 838075 838195 120 0.0
bss 109012 109024 12 0.0
rodata 88436 88460 24 0.0
text 564312 564424 112 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 800538 800674 136 0.0
bss 114036 114048 12 0.0
rodata 92444 92468 24 0.0
text 519472 519588 116 0.0
lock-app nrf52840dk_nrf52840 (read/write) 846427 846563 136 0.0
bss 109700 109712 12 0.0
rodata 92972 92996 24 0.0
text 568280 568396 116 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 771698 771850 152 0.0
bss 111108 111120 12 0.0
rodata 88260 88284 24 0.0
text 497832 497952 120 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) 852399 852535 136 0.0
bss 109836 109848 12 0.0
rodata 94680 94704 24 0.0
text 572324 572440 116 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 845523 845659 136 0.0
bss 109712 109724 12 0.0
rodata 92844 92868 24 0.0
text 567408 567528 120 0.0
shell nrf52840dk_nrf52840 (read/write) 778447 778599 152 0.0
bss 109180 109192 12 0.0
rodata 73084 73108 24 0.0
text 521576 521684 108 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 693482 693618 136 0.0
bss 110164 110176 12 0.0
rodata 67724 67748 24 0.0
text 442184 442296 112 0.0
p6 all-clusters-app default (read/write) 2311176 2311296 120 0.0
.bss 114688 109544 -5144 -4.5
.data 2544 2536 -8 -0.3
.heap 916112 921264 5152 0.6
.text 1269440 1269560 120 0.0
lock-app default (read/write) 2222992 2223136 144 0.0
.bss 100976 95832 -5144 -5.1
.data 2416 2408 -8 -0.3
.heap 929952 935104 5152 0.6
.text 1181256 1181400 144 0.0
qpg lighting-app qpg6100+debug (read only) 502992 503124 132 0.0
(read/write) 114144 114140 -4 -0.0
.bss 50400 50416 16 0.0
.data 1024 1020 -4 -0.4
.text 497672 497804 132 0.0
lock-app qpg6100+debug (read only) 475708 475840 132 0.0
(read/write) 114140 114144 4 0.0
.bss 49272 49288 16 0.0
.data 980 976 -4 -0.4
.text 470388 470520 132 0.0
persistent-storage-app qpg6100+debug (read only) 105424 105368 -56 -0.1
(read/write) 114138 114142 4 0.0
.bss 12002 11826 -176 -1.5
.data 276 272 -4 -1.4
.text 100104 100048 -56 -0.1
telink lighting-app tlsr9518adk80d (read/write) 777286 777446 160 0.0
bss 79236 79252 16 0.0
noinit 37160 37160 0 0.0
text 540616 540740 124 0.0

@kpschoedel
Copy link
Contributor Author

Increases above 0.2%:
p6 all-clusters-app default .heap 916112 921264 5152 0.6

This has merely moved from .bss to .heap, which I don't think is a problem.

p6 all-clusters-app default .bss 114688 109544 -5144 -4.5

@pullapprove pullapprove bot requested a review from vijs November 30, 2021 20:25
@andy31415
Copy link
Contributor

Fast track: this PR has been up for a while. It is very heavily exercised by our E2E CI (all tests will use the inet layer).

@andy31415 andy31415 merged commit fe681d9 into project-chip:master Nov 30, 2021
@kpschoedel kpschoedel deleted the x7715-inet-layer-split-1 branch December 1, 2021 14:20
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Dec 7, 2021
#### Problem

After PR project-chip#12291, `InetLayer` merely holds pointers to TCP and
UDP `EndPointManager`. Almost all uses are of `UDPEndPointManager`
only, so `InetLayer` is an unnecessary indirection.

Part of project-chip#7715 _Virtualize System and Inet interfaces_

#### Change overview

Remove the `InetLayer` class and pass or store `UDPEndPointManager`
and/or `TCPEndPointManager` directly.

(This was not included in project-chip#12291 because it touches a large number
of files with trivial changes.)

#### Testing

CI; no change to external functionality.
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Dec 7, 2021
#### Problem

After PR project-chip#12291, `InetLayer` merely holds pointers to TCP and
UDP `EndPointManager`. Almost all uses are of `UDPEndPointManager`
only, so `InetLayer` is an unnecessary indirection.

Part of project-chip#7715 _Virtualize System and Inet interfaces_

#### Change overview

Remove the `InetLayer` class and pass or store `UDPEndPointManager`
and/or `TCPEndPointManager` directly.

(This was not included in project-chip#12291 because it touches a large number
of files with trivial changes.)

#### Testing

CI; no change to external functionality.
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Dec 8, 2021
#### Problem

After PR project-chip#12291, `InetLayer` merely holds pointers to TCP and
UDP `EndPointManager`. Almost all uses are of `UDPEndPointManager`
only, so `InetLayer` is an unnecessary indirection.

Part of project-chip#7715 _Virtualize System and Inet interfaces_

#### Change overview

Remove the `InetLayer` class and pass or store `UDPEndPointManager`
and/or `TCPEndPointManager` directly.

(This was not included in project-chip#12291 because it touches a large number
of files with trivial changes.)

#### Testing

CI; no change to external functionality.
andy31415 pushed a commit that referenced this pull request Dec 9, 2021
* [Inet] Remove InetLayer class

#### Problem

After PR #12291, `InetLayer` merely holds pointers to TCP and
UDP `EndPointManager`. Almost all uses are of `UDPEndPointManager`
only, so `InetLayer` is an unnecessary indirection.

Part of #7715 _Virtualize System and Inet interfaces_

#### Change overview

Remove the `InetLayer` class and pass or store `UDPEndPointManager`
and/or `TCPEndPointManager` directly.

(This was not included in #12291 because it touches a large number
of files with trivial changes.)

#### Testing

CI; no change to external functionality.

* restyle

* remove src/inet/InetLayer.cpp

* fix merge
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