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 off per-implementation parts of InetInterface #13228

Closed

Conversation

kpschoedel
Copy link
Contributor

Problem

Part of #7715 Virtualize System and Inet interfaces

Change overview

  • Convert InterfaceId, which is relatively heavily used and stored,
    to be platform-independent. Platform-specific parts move to a
    namespace PlaformNetworkInterface (since this includes a type and
    compile-time constant, it can't practically be made an abstract class).
  • Convert InterfaceIterator and InterfaceAddressIterator to use
    abstract base classes, for mockability. At present, the concrete
    implementation is fixed at compile time under the original name.
  • Split the three implementations into separate files.

Testing

CI; no change to outside functionality.

@github-actions
Copy link

github-actions bot commented Dec 22, 2021

PR #13228: Size comparison from d023a8b to 6aed2ff

Increases above 0.2%:

platform target config section d023a8b 6aed2ff change % change
linux chip-tool-ipv6only arm64 (read/write) 325841 326881 1040 0.3
.bss 54209 54785 576 1.1
thermostat-no-ble arm64 (read/write) 143937 144961 1024 0.7
.bss 63985 64545 560 0.9
.data.rel.ro 72200 72616 416 0.6
.got 3936 3984 48 1.2
Increases (15 builds for efr32, esp32, linux, mbed, p6, telink)
platform target config section d023a8b 6aed2ff change % change
efr32 lighting-app BRD4161A (read only) 828908 828940 32 0.0
.text 828900 828932 32 0.0
BRD4161A+rpc (read only) 816552 816584 32 0.0
.text 816544 816576 32 0.0
window-app BRD4161A (read only) 802372 802404 32 0.0
.text 802364 802396 32 0.0
esp32 all-clusters-app c3devkit (read only) 882588 883092 504 0.1
(read/write) 1312402 1312506 104 0.0
.flash.rodata 176056 176160 104 0.1
.flash.text 882588 883092 504 0.1
m5stack (read only) 942807 943311 504 0.1
(read/write) 441512 441624 112 0.0
.flash.rodata 202880 202992 112 0.1
.flash.text 937423 937927 504 0.1
linux chip-tool-ipv6only arm64 (read only) 6997268 7000100 2832 0.0
(read/write) 325841 326881 1040 0.3
.bss 54209 54785 576 1.1
.data.rel.ro 210056 210472 416 0.2
.got 56776 56824 48 0.1
.rodata 383884 383900 16 0.0
.text 5920004 5921620 1616 0.0
thermostat-no-ble arm64 (read only) 2011508 2014308 2800 0.1
(read/write) 143937 144961 1024 0.7
.bss 63985 64545 560 0.9
.data.rel.ro 72200 72616 416 0.6
.got 3936 3984 48 1.2
.rodata 128468 128484 16 0.0
.text 1670512 1672096 1584 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2338880 2339240 360 0.0
.text 1301456 1301816 360 0.0
lighting-app CY8CPROTO_062_4343W+release (read/write) 2329160 2329520 360 0.0
.text 1291760 1292120 360 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2302192 2302552 360 0.0
.text 1264792 1265152 360 0.0
shell CY8CPROTO_062_4343W+release (read/write) 2053888 2054384 496 0.0
.text 1016488 1016984 496 0.0
p6 all-clusters-app default (read/write) 2390792 2391672 880 0.0
.text 1349056 1349936 880 0.1
light-app default (read/write) 2323648 2324528 880 0.0
.text 1281912 1282792 880 0.1
lock-app default (read/write) 2295864 2296744 880 0.0
.text 1254128 1255008 880 0.1
telink lighting-app tlsr9518adk80d (read/write) 831682 831990 308 0.0
text 580162 580420 258 0.0
Full report (21 builds for efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
platform target config section d023a8b 6aed2ff change % change
efr32 lighting-app BRD4161A (read only) 828908 828940 32 0.0
(read/write) 127052 127052 0 0.0
.bss 125176 125176 0 0.0
.data 1876 1876 0 0.0
.text 828900 828932 32 0.0
BRD4161A+rpc (read only) 816552 816584 32 0.0
(read/write) 143720 143720 0 0.0
.bss 141744 141744 0 0.0
.data 1976 1976 0 0.0
.text 816544 816576 32 0.0
window-app BRD4161A (read only) 802372 802404 32 0.0
(read/write) 125992 125992 0 0.0
.bss 124160 124160 0 0.0
.data 1832 1832 0 0.0
.text 802364 802396 32 0.0
esp32 all-clusters-app c3devkit (read only) 882588 883092 504 0.1
(read/write) 1312402 1312506 104 0.0
.dram0.bss 69072 69072 0 0.0
.dram0.data 14220 14220 0 0.0
.flash.rodata 176056 176160 104 0.1
.flash.text 882588 883092 504 0.1
.iram0.text 62254 62254 0 0.0
m5stack (read only) 942807 943311 504 0.1
(read/write) 441512 441624 112 0.0
.dram0.bss 73568 73568 0 0.0
.dram0.data 34056 34056 0 0.0
.flash.rodata 202880 202992 112 0.1
.flash.text 937423 937927 504 0.1
.iram0.text 122671 122671 0 0.0
k32w light k32w061+release (read/write) 647520 647520 0 0.0
.bss 76184 76184 0 0.0
.data 1904 1904 0 0.0
.text 563632 563632 0 0.0
lock k32w061+release (read/write) 632248 632248 0 0.0
.bss 75896 75896 0 0.0
.data 1860 1860 0 0.0
.text 548692 548692 0 0.0
linux chip-tool-ipv6only arm64 (read only) 6997268 7000100 2832 0.0
(read/write) 325841 326881 1040 0.3
.bss 54209 54785 576 1.1
.data 1096 1096 0 0.0
.data.rel.ro 210056 210472 416 0.2
.dynamic 560 560 0 0.0
.got 56776 56824 48 0.1
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 383884 383900 16 0.0
.text 5920004 5921620 1616 0.0
thermostat-no-ble arm64 (read only) 2011508 2014308 2800 0.1
(read/write) 143937 144961 1024 0.7
.bss 63985 64545 560 0.9
.data 880 880 0 0.0
.data.rel.ro 72200 72616 416 0.6
.dynamic 560 560 0 0.0
.got 3936 3984 48 1.2
.init 24 24 0 0.0
.init_array 296 296 0 0.0
.rodata 128468 128484 16 0.0
.text 1670512 1672096 1584 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2338880 2339240 360 0.0
.bss 188332 188332 0 0.0
.data 5272 5272 0 0.0
.text 1301456 1301816 360 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2329160 2329520 360 0.0
.bss 180608 180608 0 0.0
.data 5552 5552 0 0.0
.text 1291760 1292120 360 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2302192 2302552 360 0.0
.bss 179656 179656 0 0.0
.data 5544 5544 0 0.0
.text 1264792 1265152 360 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) 2053888 2054384 496 0.0
.bss 156972 156972 0 0.0
.data 4864 4864 0 0.0
.text 1016488 1016984 496 0.0
p6 all-clusters-app default (read/write) 2390792 2391672 880 0.0
.bss 116532 116532 0 0.0
.data 2552 2552 0 0.0
.text 1349056 1349936 880 0.1
light-app default (read/write) 2323648 2324528 880 0.0
.bss 105856 105856 0 0.0
.data 2384 2384 0 0.0
.text 1281912 1282792 880 0.1
lock-app default (read/write) 2295864 2296744 880 0.0
.bss 104736 104736 0 0.0
.data 2336 2336 0 0.0
.text 1254128 1255008 880 0.1
qpg lighting-app qpg6105+debug (read only) 531192 531192 0 0.0
(read/write) 146936 146936 0 0.0
.bss 86656 86656 0 0.0
.data 1004 1004 0 0.0
.text 525872 525872 0 0.0
lock-app qpg6105+debug (read only) 502860 502860 0 0.0
(read/write) 146940 146940 0 0.0
.bss 85792 85792 0 0.0
.data 952 952 0 0.0
.text 497540 497540 0 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) 831682 831990 308 0.0
bss 86840 86840 0 0.0
noinit 37160 37160 0 0.0
text 580162 580420 258 0.0

@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
@stale
Copy link

stale bot commented Jan 6, 2022

This stale pull request has been automatically closed. Thank you for your contributions.

@stale stale bot closed this Jan 6, 2022
@stale stale bot removed the stale Stale issue or PR label Jan 12, 2022
@stale
Copy link

stale bot commented Jan 19, 2022

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 Jan 19, 2022
@kpschoedel kpschoedel force-pushed the inet-interface-files branch from 6aed2ff to 72a7f77 Compare January 20, 2022 20:41
@stale stale bot removed the stale Stale issue or PR label Jan 20, 2022
#### Problem

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

#### Change overview

- Convert `InterfaceId`, which is relatively heavily used and stored,
  to be platform-independent. Platform-specific parts move to a
  namespace `PlaformNetworkInterface` (since this includes a type and
  compile-time constant, it can't practically be made an abstract class).
- Convert `InterfaceIterator` and `InterfaceAddressIterator` to use
  abstract base classes, for mockability. At present, the concrete
  implementation is fixed at compile time under the original name.
- Split the three implementations into separate files.

#### Testing

CI; no change to outside functionality.
@kpschoedel kpschoedel force-pushed the inet-interface-files branch from 72a7f77 to ab0c41b Compare January 20, 2022 20:42
@github-actions
Copy link

github-actions bot commented Jan 20, 2022

PR #13228: Size comparison from 4ac926a to ab0c41b

Increases above 0.2%:

platform target config section 4ac926a ab0c41b change % change
linux chip-tool-ipv6only arm64 (read/write) 388769 389793 1024 0.3
.bss 56049 56609 560 1.0
thermostat-no-ble arm64 (read/write) 145425 146465 1040 0.7
.bss 64753 65329 576 0.9
.data.rel.ro 72752 73168 416 0.6
.got 4064 4112 48 1.2
Increases (12 builds for efr32, linux, mbed, p6, telink)
platform target config section 4ac926a ab0c41b change % change
efr32 lighting-app BRD4161A+rpc (read only) 821008 821024 16 0.0
.text 821000 821016 16 0.0
window-app BRD4161A (read only) 804196 804228 32 0.0
.text 804188 804220 32 0.0
linux chip-tool-ipv6only arm64 (read only) 8425404 8428268 2864 0.0
(read/write) 388769 389793 1024 0.3
.bss 56049 56609 560 1.0
.data.rel.ro 259416 259832 416 0.2
.got 68424 68472 48 0.1
.text 7157348 7159012 1664 0.0
thermostat-no-ble arm64 (read only) 2043324 2046140 2816 0.1
(read/write) 145425 146465 1040 0.7
.bss 64753 65329 576 0.9
.data.rel.ro 72752 73168 416 0.6
.got 4064 4112 48 1.2
.rodata 130028 130044 16 0.0
.text 1699136 1700736 1600 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2349968 2350328 360 0.0
.text 1312544 1312904 360 0.0
lighting-app CY8CPROTO_062_4343W+release (read/write) 2332728 2333088 360 0.0
.text 1295328 1295688 360 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2303080 2303440 360 0.0
.text 1265680 1266040 360 0.0
shell CY8CPROTO_062_4343W+release (read/write) 2054256 2054688 432 0.0
.text 1016856 1017288 432 0.0
p6 all-clusters-app default (read/write) 2407464 2408344 880 0.0
.text 1365728 1366608 880 0.1
light-app default (read/write) 2328696 2329560 864 0.0
.text 1286960 1287824 864 0.1
lock-app default (read/write) 2297704 2298568 864 0.0
.text 1255968 1256832 864 0.1
telink lighting-app tlsr9518adk80d (read/write) 839882 840190 308 0.0
text 586962 587220 258 0.0
Full report (19 builds for efr32, k32w, linux, mbed, p6, qpg, telink)
platform target config section 4ac926a ab0c41b change % change
efr32 lighting-app BRD4161A (read only) 833628 833628 0 0.0
(read/write) 127032 127032 0 0.0
.bss 125136 125136 0 0.0
.data 1896 1896 0 0.0
.text 833620 833620 0 0.0
BRD4161A+rpc (read only) 821008 821024 16 0.0
(read/write) 143696 143696 0 0.0
.bss 141696 141696 0 0.0
.data 1996 1996 0 0.0
.text 821000 821016 16 0.0
window-app BRD4161A (read only) 804196 804228 32 0.0
(read/write) 125720 125720 0 0.0
.bss 123872 123872 0 0.0
.data 1848 1848 0 0.0
.text 804188 804220 32 0.0
k32w light k32w061+release (read/write) 658924 658924 0 0.0
.bss 76584 76584 0 0.0
.data 1864 1864 0 0.0
.text 574676 574676 0 0.0
lock k32w061+release (read/write) 659704 659704 0 0.0
.bss 76824 76824 0 0.0
.data 1884 1884 0 0.0
.text 575196 575196 0 0.0
linux chip-tool-ipv6only arm64 (read only) 8425404 8428268 2864 0.0
(read/write) 388769 389793 1024 0.3
.bss 56049 56609 560 1.0
.data 1128 1128 0 0.0
.data.rel.ro 259416 259832 416 0.2
.dynamic 560 560 0 0.0
.got 68424 68472 48 0.1
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 434308 434308 0 0.0
.text 7157348 7159012 1664 0.0
thermostat-no-ble arm64 (read only) 2043324 2046140 2816 0.1
(read/write) 145425 146465 1040 0.7
.bss 64753 65329 576 0.9
.data 904 904 0 0.0
.data.rel.ro 72752 73168 416 0.6
.dynamic 560 560 0 0.0
.got 4064 4112 48 1.2
.init 24 24 0 0.0
.init_array 312 312 0 0.0
.rodata 130028 130044 16 0.0
.text 1699136 1700736 1600 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2349968 2350328 360 0.0
.bss 189428 189428 0 0.0
.data 5296 5296 0 0.0
.text 1312544 1312904 360 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2332728 2333088 360 0.0
.bss 180936 180936 0 0.0
.data 5576 5576 0 0.0
.text 1295328 1295688 360 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2303080 2303440 360 0.0
.bss 179936 179936 0 0.0
.data 5560 5560 0 0.0
.text 1265680 1266040 360 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2054256 2054688 432 0.0
.bss 156876 156876 0 0.0
.data 4864 4864 0 0.0
.text 1016856 1017288 432 0.0
p6 all-clusters-app default (read/write) 2407464 2408344 880 0.0
.bss 117764 117764 0 0.0
.data 2576 2576 0 0.0
.text 1365728 1366608 880 0.1
light-app default (read/write) 2328696 2329560 864 0.0
.bss 105520 105520 0 0.0
.data 2408 2408 0 0.0
.text 1286960 1287824 864 0.1
lock-app default (read/write) 2297704 2298568 864 0.0
.bss 104368 104368 0 0.0
.data 2352 2352 0 0.0
.text 1255968 1256832 864 0.1
qpg lighting-app qpg6105+debug (read only) 565720 565720 0 0.0
(read/write) 146936 146936 0 0.0
.bss 89672 89672 0 0.0
.data 1060 1060 0 0.0
.text 560400 560400 0 0.0
lock-app qpg6105+debug (read only) 514212 514212 0 0.0
(read/write) 146940 146940 0 0.0
.bss 88240 88240 0 0.0
.data 984 984 0 0.0
.text 508892 508892 0 0.0
persistent-storage-app qpg6105+debug (read only) 106848 106848 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38512 38512 0 0.0
.data 288 288 0 0.0
.text 101528 101528 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 839882 840190 308 0.0
bss 87468 87468 0 0.0
noinit 37160 37160 0 0.0
text 586962 587220 258 0.0

@kpschoedel
Copy link
Contributor Author

Holding off on submitting this because virtualizing InterfaceAddressIterator is preventing dead code removal on some builds.

@stale
Copy link

stale bot commented Jan 28, 2022

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 Jan 28, 2022
@stale
Copy link

stale bot commented Feb 5, 2022

This stale pull request has been automatically closed. Thank you for your contributions.

@stale stale bot closed this Feb 5, 2022
@kpschoedel kpschoedel deleted the inet-interface-files 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.

2 participants