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

feature: More public APIs for XdpContext to grow/shrink packets #948

Open
gabhijit opened this issue May 17, 2024 · 0 comments
Open

feature: More public APIs for XdpContext to grow/shrink packets #948

gabhijit opened this issue May 17, 2024 · 0 comments

Comments

@gabhijit
Copy link

Currently the APIs available for XdpContext support mainly accessing the data and data_end. It would be handy to have the APIs that allow to grow or shrink the packet as are provided by bpf_xdp_xdp_adjust_{head|tail|meta}.

Such API will be useful during actual packet processing, whenever additional headers are to be pushed to the packet etc.

Will submit a draft PR for this.

gabhijit added a commit to gabhijit/aya that referenced this issue May 17, 2024
Added new public API for the `XdpContext`:
- `adjust_head` : To grow the packet buffer at the beginning
- `adjist_tail` : To grow the packet buffer at the end
- `adjust_meta` : To grow metadata area

These API are handy for packet processing when additional headers etc.
are to be pushed to the packet.

Also added these APIs using `cargo xtask public-api --bless`

Refs: aya-rs#948
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

No branches or pull requests

1 participant