[ovs-dev] eBPF and OVS

William Tu u9012063 at gmail.com
Fri Jun 22 01:24:14 UTC 2018

On Wed, Jun 20, 2018 at 2:38 AM, Ian Stokes <ian.stokes at intel.com> wrote:
> On 6/14/2018 11:31 PM, William Tu wrote:
>> On Thu, Jun 14, 2018 at 3:25 PM, Ben Pfaff <blp at ovn.org> wrote:
>>> On Mon, Jun 11, 2018 at 10:32:52AM +0000, Stokes, Ian wrote:
>>>> Hi all,
>>>> The recent DPDK 18.05 release provides BPF functionality for DPDK
>>>> devices.
>>>> The BPF Library provides the ability to load and execute Enhanced
>>>> Berkeley Packet Filters (eBPF) within user-space DPDK applications. It also
>>>> introduces a basic framework to load/unload BPF-based filters on Eth devices
>>>> (right now only via SW RX/TX callbacks). It also adds a dependency on
>>>> libelf.
>>>> I'm just wondering if anyone is currently looking at BPF in OVS (either
>>>> kernel or userspace). Specifically, if BPF will be supported in a future OVS
>>>> release then is there a need to coordinate on the approach of how it is
>>>> enabled?
>> Yes, we are actively working on eBPF datapath for the same features in
>> OVS kernel datapath.
> Thanks for the response William,
>> Hopefully we can get to a stable state and send an RFC patch next month.
> Great, would be interested to see this.
>> Does BPF functionality for DPDK support eBPF map and helper functions?
> I dont think it supports map, from the DPDK docs it supports the following
> functionality
> Create a new BPF execution context and load user provided eBPF code into it.
> Destroy an BPF execution context and its runtime structures and free the
> associated memory.
> Execute eBPF bytecode associated with provided input parameter.
> Provide information about natively compiled code for given BPF context.
> Load BPF program from the ELF file and install callback to execute it on
> given ethdev port/queue.
> It's missing the following currently:
> JIT for non X86_64 platforms.
> cBPF.
> tail-pointer call.
> skb.
> external function calls for 32-bit platforms.
> If these are required then it will need to be implemented in DPDK to allign
> for OVS I would think. Do you see anything in this list (besides mapping)
> that would be required?

Current we are using the following bpf helpers
vlan_push / pop
get/set tunnel key
get/set tunnel op
I will post the code soon and it will be more clear.


More information about the dev mailing list