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

Move some code within src/inet files #10361

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

kpschoedel
Copy link
Contributor

Problem

Code for different Inet implementations is scattered across many #ifs.

Change overview

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

  • For the affected .cpp files, code is moved to a single #if section
    for each of the three implementations (LwIP, sockets, and Network
    Framework.) Some methods have internals split off into separate …Impl
    methods.

  • Method implementations are reordered to match their declarations.

  • Doxygen comments move to headers.

Since comparing moved code in diff format is difficult, this change
explicitly does NOT make any changes to function bodies, beyond any
necessary arguments and returns when splitting.

Testing

CI; no change to functionality.

#### Problem

Code for different Inet implementations is scattered across many `#if`s.

#### Change overview

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

- For the affected `.cpp` files, code is moved to a single `#if` section
  for each of the three implementations (LwIP, sockets, and Network
  Framework.) Some methods have internals split off into separate `…Impl`
  methods.

- Method implementations are reordered to match their declarations.

- Doxygen comments move to headers.

Since comparing moved code in diff format is difficult, this change
explicitly does NOT make any changes to function bodies, beyond any
necessary `return` when splitting.

#### Testing

CI; no change to functionality.
@kpschoedel
Copy link
Contributor Author

Note to reviewers: this PR avoids changes to moved code, since it's impractical to identify and review such changes using GitHub.

@github-actions
Copy link

github-actions bot commented Oct 8, 2021

Size increase report for "esp32-example-build" from 8a4eefb

File Section File VM
chip-all-clusters-app.elf .flash.text 244 244
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_loc,0,2928
.debug_info,0,2440
.debug_line,0,1236
.debug_str,0,1055
.debug_frame,0,548
.strtab,0,516
.debug_ranges,0,344
.flash.text,244,244
.symtab,0,128
.debug_aranges,0,120
.debug_abbrev,0,56
.riscv.attributes,0,1
[Unmapped],0,-244


@github-actions
Copy link

github-actions bot commented Oct 8, 2021

Size increase report for "nrfconnect-example-build" from 8a4eefb

File Section File VM
chip-shell.elf text 68 68
chip-shell.elf device_handles -4 -4
chip-lock.elf text 68 68
chip-lock.elf device_handles 12 12
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,1790
.debug_loc,0,1404
.debug_str,0,756
.debug_line,0,368
.strtab,0,251
.debug_frame,0,220
.debug_abbrev,0,206
.debug_ranges,0,176
.symtab,0,128
text,68,68
.debug_aranges,0,64
.shstrtab,0,-3
device_handles,-4,-4

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,1790
.debug_loc,0,1484
.debug_str,0,756
.debug_line,0,368
.strtab,0,251
.debug_frame,0,220
.debug_abbrev,0,206
.debug_ranges,0,176
.symtab,0,128
text,68,68
.debug_aranges,0,64
device_handles,12,12
.shstrtab,0,-3


@woody-apple
Copy link
Contributor

@andy31415 andy31415 merged commit dd4806b into project-chip:master Oct 13, 2021
@kpschoedel kpschoedel deleted the x7715-inet-2-move branch October 13, 2021 14:59
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.

4 participants