[GSoC'20] eBPF XDP hook

Ankur Kothiwal ankur at freebsd.org
Mon Aug 31 13:48:38 UTC 2020


Hi all,
Project: Implement eBPF XDP for FreeBSD by extending VirtIO ethernet
driver if_vtnet
The goal of this project is to extend an existing FreeBSD network
driver,VirtIO if_vtnet to be able to call into an eBPF program when
processing a newly received packet. The driver will perform the basic
actions of XDP like PASS and DROP the packet as specified by the
program. The aim of this project is to add new probe sites
into the kernel that will call eBPF functions.

Mentor: Ryan Stone <rstone@> and Hiroki Sato <hrs@>
Tasks completed during the GSoC:
- Implemented XDP hook to pass and drop packets
- Created a loader program to attach the eBPF program to the kernel
- A test program to DROP ICMP filter

Future Work:
- Currently we can only attach the XDP hook to PASS and DROP the
packets. The work on detaching the hook is left.
- The XDP action to “TX” and “REDIRECT” the packets

For more detailed explanation of the project please read the project
Final Report at:
https://wiki.freebsd.org/SummerOfCodeIdeas#eBPF_XDP_Hooks
Github repo including the changes :
https://github.com/Ankurk99/freebsd/tree/ebpf-import

Github Repo for the original code:
https://github.com/rysto32/freebsd/tree/ebpf-import

This GSoC has been a very fruitful experience which will definitely
help me in my career.
I learned a lot of things about the kernel and got to use the
technologies which previously I have only
studied about.
I would like to specially thank my mentor 'Ryan Stone' who was a
constant source of help in this entire journey.
I am thankful to the broader FreeBSD community for giving me this
opportunity to be a part of such an
amazing organization.
Thanks to the org-admins who made this journey a very smooth and joyful ride.

Thank you
Ankur Kothiwal


More information about the soc-status mailing list