Initially, the Berkeley Packet Filter (BPF) was created to filter out or discard unwanted network packets in the kernel space instead of user space for performance reasons.
eBPF (enhanced Berkeley Packet Filter) on the other hand, extends the original BPF functionality to run sandboxed programs in a privileged context. In