-
Notifications
You must be signed in to change notification settings - Fork 568
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
Is possible to encapsulate a new header in AF_XDP #415
Comments
It should be possible. The frame comes with a headroom by default (I can't be sure if it is 128B or 256B) so you can reference this by sending addr - (space for new headers) to process_packet() and fill in the new header there. |
I'm trying to capture the packet from veth and encapsulate a new eth header to send it out by a real eth nic. As far as I know, in xdp ebpf, we can use
bpf_xdp_adjust_head
to do something like this. Is possible we can do it in userspace using AF_XDP? E.g. using user head room and adjust the addr of frame desc forward when we want to encapsulate a new header.The text was updated successfully, but these errors were encountered: