Skip to content

Comments

sys: hint that structs require host layout#1681

Merged
lmb merged 1 commit intocilium:mainfrom
lmb:host-struct-layout
Feb 13, 2025
Merged

sys: hint that structs require host layout#1681
lmb merged 1 commit intocilium:mainfrom
lmb:host-struct-layout

Conversation

@lmb
Copy link
Contributor

@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 <[email protected]>
@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
Contributor

@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