Skip to content

netstack: make tcpip.Address an opaque type #8868

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

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link

netstack: make tcpip.Address an opaque type

The important change here is in tcpip/tcpip.go, where tcpip.Address is defined.
The rest is updating uses of tcpip.Address.

This is preparation for netip.Addr or []byte based addresses, which should save
us a bunch of allocations. Currently, we allocate every time we want to, say,
get a tcpip.Address from a header. This is because the header is a byte slice,
but Address is a string. Strings are immutable, so Go allocates and copies.

@copybara-service copybara-service bot added the exported Issue was exported automatically label Apr 22, 2023
@copybara-service copybara-service bot force-pushed the test/cl524474152 branch 3 times, most recently from dce3252 to fa96b66 Compare April 26, 2023 18:03
@copybara-service copybara-service bot force-pushed the test/cl524474152 branch 6 times, most recently from 2f5b459 to c889e1a Compare May 15, 2023 23:52
@copybara-service copybara-service bot closed this May 16, 2023
@copybara-service copybara-service bot deleted the test/cl524474152 branch May 16, 2023 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exported Issue was exported automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants