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

sys: hint that structs require host layout #1681

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Feb 13, 2025

Go 1.23 introduced structs.HostLayout to tell the toolchain that a struct should be laid out in memory as it is laid out in code. Add the annotation to the generated structs.

Go 1.23 introduced structs.HostLayout to tell the toolchain that
a struct should be laid out in memory as it is laid out in code.
Add the annotation to the generated structs.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb marked this pull request as ready for review February 13, 2025 18:41
@lmb lmb requested a review from a team as a code owner February 13, 2025 18:41
@lmb lmb merged commit b8bc976 into cilium:main Feb 13, 2025
18 checks passed
@lmb lmb deleted the host-struct-layout branch February 13, 2025 18:41
Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! We should probably also emit these in bpf2go types.

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.

2 participants