-
Notifications
You must be signed in to change notification settings - Fork 13
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
Enable tunneling/encapsulation #1
Comments
Hi @mscastanho, The tunneling/encapsulation is not implemented in the current version of BPFabric, that was something planned for a future phase. However getting it implemented is probably fairly straightforward. Are you using the softswitch implementation or the DPDK implementation? In either case the easiest approach would be to define a new function available in BPF to push or pop a header from the front of the packet and then implement it in the softswitch or DPDK. In DPDK it would likely be a call to something like In the softswitch implementation the implementation would likely allocate/remove some space after/before the ethernet header (at the moment the frame is metadata + ethernet and when sending the metadata is stripped away https://github.com/UofG-netlab/BPFabric/blob/master/softswitch/main.c#L332) |
Thanks for the prompt response @simon-jouet, I'm working on the changes as of now. For now I'll be focusing on the softswitch. It took me a while to get around the code, but now I'm starting to grasp it. These are the steps I'm planning on taking to implement it: ebpf_functions.h
softswitch/main.c
A few questions, though:
Thank you again |
Hi @mscastanho
|
Hi @simon-jouet I successfully implemented the functionality, sorry for not returning earlier. I might make a pull request in the following weeks, after I test it a little bit further and make sure it is fully functional. Thank you for the help! |
That's good to hear, @mscastanho - well done! It would be good if you had any performance figures / testing of your module to feed back - e.g., any bench-marking or any comparative measurement against alternative ways of achieving the same thing. |
Hi, I wanted to use BPFabric to create a switch capable of performing encapsulation using a custom-made protocol. For this to happen, I would need to add a new protocol header between existing headers (ex. after Ethernet and before IP). But by the examples provided I'm actually having a hard time figuring out how I could accomplish that.
I know I can get the packet's length from the packet's metadata. From there, I would need to allocate a new buffer to fit the original packet + the new header (since there probably won't be enough space left in the original buffer). But from this point on, I don't see a way to pass this new buffer back to the switch so this new modified packet is sent.
Is it even possible? If so, what are my options? Could I make any changes to the source code to allow this?
Thank you in advance.
The text was updated successfully, but these errors were encountered: