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

Receive path cleanup for PacketBufferHandle conversion #4128

Merged
merged 1 commit into from
Dec 9, 2020

Conversation

kpschoedel
Copy link
Contributor

@kpschoedel kpschoedel commented Dec 8, 2020

Problem

Code should use PacketBufferHandle rather than PacketBuffer *.

Summary of Changes

Simplify by using Create factory instead of declare-adopt-move.

Part of issue #2707 - Figure out a way to express PacketBuffer ownership in the type system

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer *`.

#### Summary of Changes

Simply by using `Create` factory instead of declare-adopt-move.

Part of issue project-chip#2707 - Figure out a way to express PacketBuffer ownership in the type system
@github-actions
Copy link

github-actions bot commented Dec 8, 2020

Size increase report for "nrfconnect-example-build" from 548b71a

File Section File VM
chip-shell.elf log_const_sections 4 4
chip-shell.elf text -4 -4
chip-lock.elf shell_root_cmds_sections 4 4
chip-lock.elf text -4 -4
chip-lighting.elf text -4 -4
chip-lighting.elf shell_root_cmds_sections -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_loc,0,64
.debug_ranges,0,8
log_const_sections,4,4
text,-4,-4
.debug_aranges,0,-8
.debug_str,0,-12
.debug_frame,0,-28
.debug_line,0,-46
.debug_info,0,-82

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

sections,vmsize,filesize
.debug_loc,0,64
.debug_ranges,0,8
shell_root_cmds_sections,4,4
text,-4,-4
.debug_aranges,0,-8
.debug_str,0,-12
.debug_frame,0,-28
.debug_line,0,-46
.debug_info,0,-82

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

sections,vmsize,filesize
.debug_loc,0,68
.debug_ranges,0,8
text,-4,-4
.debug_aranges,0,-8
.debug_str,0,-12
shell_root_cmds_sections,-12,-12
.debug_frame,0,-28
.debug_line,0,-42
.debug_info,0,-82


@github-actions
Copy link

github-actions bot commented Dec 8, 2020

Size increase report for "esp32-example-build" from 548b71a

File Section File VM
chip-all-clusters-app.elf .flash.text -16 -16
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,58
.xt.prop._ZTVN4chip11DeviceLayer37DeviceNetworkProvisioningDelegateImplE,0,2
.debug_aranges,0,-8
.debug_str,0,-12
.debug_ranges,0,-16
.flash.text,-16,-16
.debug_frame,0,-24
.debug_abbrev,0,-25
.debug_info,0,-305
.debug_line,0,-382


Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the uses here, I wonder whether Create should be named Import or something... Or whether once we are done we will have no real public uses of Adopt and can just make it private and maybe name the current Create API Adopt?

@kpschoedel
Copy link
Contributor Author

Looking at the uses here, I wonder whether Create should be named Import or something... Or whether once we are done we will have no real public uses of Adopt and can just make it private and maybe name the current Create API Adopt?

Yes, I do want to make the current Adopt() private, if not refactor it away entirely — I've already been bitten by its ref-count asymmetry (i.e. it Frees the old buffer, does not AddRef the new one).

@BroderickCarlin BroderickCarlin merged commit 59cb4f6 into project-chip:master Dec 9, 2020
@kpschoedel kpschoedel deleted the x2707-13-receive branch December 10, 2020 14:29
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