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

Add support for program loading flags #3576

Open
mtfriesen opened this issue May 23, 2024 · 1 comment · May be fixed by #3763
Open

Add support for program loading flags #3576

mtfriesen opened this issue May 23, 2024 · 1 comment · May be fixed by #3763
Assignees
Labels
enhancement New feature or request P2 triaged Discussed in a triage meeting
Milestone

Comments

@mtfriesen
Copy link
Collaborator

mtfriesen commented May 23, 2024

Describe the feature you'd like supported

BPF on Linux can specify additional flags when loading a program, and the extension provider / hook can query those flags and alter its behavior.

An example from xdp-tools refers to a BPF_F_XDP_HAS_FRAGS flag that allows the XDP hook to infer whether the program is capable of handling discontiguous packets.

Proposed solution

These flags provide a mechanism for breaking changes to be introduced for a specific program type, and provide optional behavior in general, without needing to introduce a new program type or attach point.

Additional context

It's possible the following libbpf routines are related to this feature:

LIBBPF_API __u32 bpf_program__flags(const struct bpf_program *prog);
LIBBPF_API int bpf_program__set_flags(struct bpf_program *prog, __u32 flags);
@saxena-anurag
Copy link
Contributor

Referencing corresponding XDP issue microsoft/xdp-for-windows#517 here, as there are some discussions related to this issue in that thread.

@dahavey dahavey added triaged Discussed in a triage meeting P2 labels May 28, 2024
@dahavey dahavey added this to the 2406 milestone May 28, 2024
@shankarseal shankarseal modified the milestones: 2406, 2408 Jun 26, 2024
@Alan-Jowett Alan-Jowett modified the milestones: 2408, 2409 Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 triaged Discussed in a triage meeting
Projects
None yet
5 participants