Skip to content

Conversation

@ti-mo
Copy link
Contributor

@ti-mo ti-mo commented Jan 13, 2026

Since we're introducing some breaking changes regarding XDP ELF loading in #1919, this would be a good time to get rid of some section-related tech debt.

This PR deprecates the following section prefixes, bringing us back in line with libbpf:

  • xdp.frags_devmap/
  • xdp_devmap/
  • xdp.frags_cpumap/
  • xdp_cpumap/
  • seccomp

For XDP, use the appropriate section names as documented in https://ebpf-go.dev/concepts/section-naming and https://docs.kernel.org/bpf/libbpf/program_types.html. For seccomp, change the section name to 'socket'.

ti-mo added 3 commits January 13, 2026 17:35
This was never part of libbpf and there are no records of where it originated
from or why it's still here. Migrating is quite straightforward, just change
the function's section name to 'socket'.

Signed-off-by: Timo Beckers <timo@isovalent.com>
… names

The following section prefixes are now no longer supported:
- xdp.frags_devmap/
- xdp_devmap/
- xdp.frags_cpumap/
- xdp_cpumap/

Due to XDP-related upstream changes addressed in a prior commit, now would be
a good time to let go of the unofficial backwards compat sections. This brings
ebpf-go back in line with libbpf, at least as far as XDP section names go.

Signed-off-by: Timo Beckers <timo@isovalent.com>
We want to avoid deviating from libbpf behaviour when it comes to section
naming, and the elfSectionDefs list was recently extended to ignore section
name extras for struct_ops prog sections, which is not ideal. Use an explicit
special case with a reference to the libbpf documentation instead.

Remove the internal ignoreExtra flag and related code along with the override
list. Document struct_ops.s.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo requested a review from a team as a code owner January 13, 2026 16:38
@dylandreimerink dylandreimerink merged commit 72ba074 into cilium:main Jan 14, 2026
19 checks passed
@ti-mo ti-mo deleted the fix_attach_types branch January 14, 2026 11:12
@chantra
Copy link
Contributor

chantra commented Jan 15, 2026

Thanks @ti-mo !

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.

3 participants