Orange-OpenSource / oko

Licence: other
Extend Open vSwitch with BPF programs at runtime

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
Roff
2310 projects
shell
77523 projects
Makefile
30231 projects
M4
1887 projects

Projects that are alternatives of or similar to oko

dovesnap
Docker OVS Network Plugin
Stars: ✭ 18 (-37.93%)
Mutual labels:  openflow, openvswitch, ovs
Npf
NPF: packet filter with stateful inspection, NAT, IP sets, etc.
Stars: ✭ 160 (+451.72%)
Mutual labels:  dpdk, bpf
sfc app
Service Function Chaining Application for Ryu SDN controller
Stars: ✭ 25 (-13.79%)
Mutual labels:  openflow, openvswitch
dpdk engineer manual
【冲破内核瓶颈,让I/O性能飙升】DPDK工程师手册,官方文档,最新视频,开源项目,实战案例,论文,大厂内部ppt,知名工程师一览表
Stars: ✭ 535 (+1744.83%)
Mutual labels:  dpdk, openvswitch
Packet Journey
DEPRECATED - Packet-journey, userland router which uses DPDK for its fastpath switching.
Stars: ✭ 200 (+589.66%)
Mutual labels:  dpdk
Fastclick
FastClick - A faster version the Click Modular Router featuring batching, advanced multi-processing and improved Netmap and DPDK support (ANCS'15). Check the metron branch for Metron specificities (NSDI'18).
Stars: ✭ 100 (+244.83%)
Mutual labels:  dpdk
Nff Go
NFF-Go -Network Function Framework for GO (former YANFF)
Stars: ✭ 1,036 (+3472.41%)
Mutual labels:  dpdk
ovs-cni
Open vSwitch CNI plugin
Stars: ✭ 176 (+506.9%)
Mutual labels:  openvswitch
Opennetvm
A high performance container-based NFV platform from GW and UCR.
Stars: ✭ 177 (+510.34%)
Mutual labels:  dpdk
Dpdk Ans
ANS(Accelerated Network Stack) on DPDK, DPDK native TCP/IP stack.
Stars: ✭ 925 (+3089.66%)
Mutual labels:  dpdk
Dpvs
DPVS is a high performance Layer-4 load balancer based on DPDK.
Stars: ✭ 2,168 (+7375.86%)
Mutual labels:  dpdk
Natasha
Natasha is a fast and scalable, DPDK powered, stateless NAT44 packet processor
Stars: ✭ 111 (+282.76%)
Mutual labels:  dpdk
Capsule
A framework for network function development. Written in Rust, inspired by NetBricks and built on DPDK.
Stars: ✭ 217 (+648.28%)
Mutual labels:  dpdk
Pcapplusplus
PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use. It provides C++ wrappers for the most popular packet processing engines such as libpcap, WinPcap, DPDK and PF_RING.
Stars: ✭ 1,322 (+4458.62%)
Mutual labels:  dpdk
dpdk doc
dpdk中文资料及会议文档ppt
Stars: ✭ 151 (+420.69%)
Mutual labels:  dpdk
Fastdns
fastDNS is an authoritative only, high performance, simple and open source name server based on DPDK and NSD server
Stars: ✭ 12 (-58.62%)
Mutual labels:  dpdk
basebox
A tiny OpenFlow controller for OF-DPA switches.
Stars: ✭ 39 (+34.48%)
Mutual labels:  openflow
Ruru
Real-time TCP latency monitoring using DPDK backend and a 3D React frontend
Stars: ✭ 155 (+434.48%)
Mutual labels:  dpdk
Lvs Dpdk
LVS on dpdk
Stars: ✭ 125 (+331.03%)
Mutual labels:  dpdk
libbpf-sys
Rust bindings to libbpf from the Linux kernel
Stars: ✭ 103 (+255.17%)
Mutual labels:  bpf

Oko

The original Open vSwitch README is available at README-original.md.

What is Oko?

Oko is an extension of Open vSwitch-DPDK that provides runtime extension with BPF programs. BPF programs act as filters over packets: they are referenced as an additional match field in the OpenFlow tables and cannot write to packets. They can however read and write to persistent maps (array or hash table) to retain information on flows.

Oko was based on Open vSwitch v2.5 (commit b63bf24) and relies on a modified version of the ubpf project to execute BPF programs.

This version of Oko is a research prototype: it almost certainly contains serious bugs and should only be used for experimentation and research purposes.

How to install?

To install Oko, you can follow the usual guidelines to install Open vSwitch-DPDK. No additional dependencies are required.

How to use?

$ ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk ofport_request=1
$ ovs-vsctl add-port br0 dpdk1 -- set Interface dpdk1 type=dpdk ofport_request=2
$ ovs-vsctl show
509b64f2-a893-490a-9fd5-7582c29e8b89
    Bridge "br0"
        Port "dpdk0"
            Interface "dpdk0"
                type: dpdk
        Port "dpdk1"
            Interface "dpdk1"
                type: dpdk
$ clang -O2 -target bpf -c examples/bpf/stateless-firewall.c -o /tmp/stateless-firewall.o
$ ovs-ofctl load-filter-prog br0 1 /tmp/stateless-firewall.o
$ ovs-ofctl add-flow br0 priority=1,in_port=1,filter_prog=1,actions=output:2
$ ovs-ofctl add-flow br0 priority=1,in_port=2,actions=output:1
$ ovs-ofctl dump-flows br0
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=103.730s, table=0, n_packets=0, n_bytes=0, idle_age=103, priority=1,in_port=1,filter_prog=1 actions=output:2
 cookie=0x0, duration=103.842s, table=0, n_packets=0, n_bytes=0, idle_age=103, in_port=2,actions=output:1
# Drop (value=1) packets destined to IP 172.16.0.14 through map 0 of filter_prog 1.
$ ovs-ofctl update-map br0 1 0 key 14 0 16 172 value 1 0 0 0
# Show the content of map 0 of filter_prog 1. Use 'hex' flag to print in hexadecimal format.
$ ovs-ofctl dump-map br0 1 0 hex
NXT_DUMP_MAP_REPLY (xid=0x4):
The map contains 1 element(s)
Key: 
0e 00 10 ac
Value: 
01 00 00 00

License

Except for the lib/bpf/lookup3.c file in the public domain, all new files introduced by Oko compared to Open vSwitch are licensed under Apache 2.0. Modified files from both Open vSwitch and ubpf are also licensed under their original license, Apache 2.0.

Modifications to source codes:

For compliance with the Apache 2.0 license, the following lists our modifications to the source codes of ubpf and Open vSwitch.

ubpf

  • Support for maps allocation (ELF parsing, memory allocation, and map relocation).
  • Support for Array, Hash table, Bloom filter, and Count-Min sketch maps.
  • Increase the stack size of the virtual machine to 512.
  • Fix warnings related to pointer arithmetic.
  • Support for LDIND* and LDABS* bytecode instructions.
  • BPF helpers to compute a hash value and retrieve the current time.
  • BPF verifier for register types and variable-sized loops.

Open vSwitch

  • New filter_prog match field in OpenFlow table.
  • New LOAD_FILTER_PROG OpenFlow message to send a BPF program to load to the switch, as an ELF file.
  • New UPDATE_MAP OpenFlow message to write entry (key-value pair) to the BPF map of the given BPF program.
  • New DUMP_MAP OpenFlow message to dump the BPF map of the given BPF program.
  • New SEND_MAPS action and message to send the content of maps to the controller.
  • New filter program chain structure in the datapath to cache a succession of BPF programs.

Contacts

Paul Chaignon <[email protected]>

Tomasz Osiński <[email protected]>

Mateusz Kossakowski <[email protected]>

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].