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

net: fix several unwraps of complex errors #1623

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

cbiffle
Copy link
Collaborator

@cbiffle cbiffle commented Feb 21, 2024

This knocks about 3.7 kiB (!) off Gimlet's netstack task size, by removing much of its dependence on the formatting machinery invoked by unwrap. (It's not all gone, because smoltcp still uses it.)

@cbiffle cbiffle requested a review from mkeeter February 21, 2024 21:13
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

@cbiffle cbiffle force-pushed the cbiffle/net-unwrap-removal branch 5 times, most recently from 1e0c58e to b043094 Compare February 27, 2024 00:39
@cbiffle cbiffle changed the title net: fix two unwraps of complex errors net: fix several unwraps of complex errors Feb 27, 2024
@cbiffle
Copy link
Collaborator Author

cbiffle commented Feb 27, 2024

The number of places where no VSC chips are used, but the VSC types appear for various reasons, has turned this into quite a game of whack-a-mole. With any luck it will pass the build eventually; I keep failing to predict which builds are affected when I test locally (e.g. the nucleo h7 build winds up depending on the VSC error types).

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

looks like CI is happy now!

@cbiffle
Copy link
Collaborator Author

cbiffle commented Feb 27, 2024

Updated numbers post-whackamole:

Gimlet E net stack: -16,388 bytes
Nucleo 743 net stack: unchanged (unwrap I removed can't actually be reached)
Monorail: -8,820 bytes
Sidecar D net stack: ...-8 bytes? something is weird in the sidecar net stack that I need to investigate. It has a very large data segment that got larger with this change.

This knocks a lot of flash off most netstack task sizes, by removing
much of its dependence on the formatting machinery invoked by unwrap.
(It's not all gone, because smoltcp still uses it.) Concretely,

- Gimlet E net: -16,388 bytes
- Monorail server: -8,820 bytes
- Sidecar D net: -8 bytes, because something is still pulling in the
  goo.
@cbiffle cbiffle enabled auto-merge (rebase) February 27, 2024 22:43
@cbiffle cbiffle merged commit 6b6faea into master Feb 27, 2024
83 checks passed
@cbiffle cbiffle deleted the cbiffle/net-unwrap-removal branch February 27, 2024 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants