packetgraph
Software Defined Networking library
|
Packetgraph is a library aiming to give the user a tool to build networks graph easily, It's built upon the fast DPDK library.
The goal of this library is to provide a really EASY interface to build you own DPDK based application using Network Function Virtualization Everyone is free to use this library to build up their own network application.
Once you have created and connected all bricks in you network graph, some bricks will be able to poll a burst of packets (max 64 packets) and let the burst propagate in you graph.
Connections between bricks don't store any packets and each burst will propagate in the graph without any copy.
Each graph run on one core but you can connect different graph using Queue bricks (which are thread safe). For example, a graph can be split on demand to be run on different core or even merged.
If you want a graphical representation of a graph, you can generate a dot output.
A lot of other bricks can be created, check our wall ;)
Code Documentation: doxygen link
To build and run examples, you may first check how to build Packetgraph below and adjust your configure command before make:
To run a specific example, check run scripts in tests directories:
You will need to build DPDK before building Packetgraph.
You may adapt this depending on your Linux distribution:
Ubuntu
CentOS
Note: use T=x86_64-native-linuxapp-clang
to build with clang
Edit build/.config and be sure to set the following parameters to 'y':
If you don't want to use some special PMD in DPDK requiring kernel headers, you will have to set the following parameters to 'n':
Once your .config file is ready, you can now build dpdk as follows:
Finally, set RTE_SDK
environment variable:
## Build packetgraph
Note: to build with clang, you can use ./configure CC=clang
Note 2: You need a compiler that support C11 (gcc 4.9 or superior, or clang 3.4 or superior).
Packetgraph uses some huge pages (adjust to your needs):
/etc/sysctl.conf
and add some huge pages: /etc/fstab
: -DPG_BRICK_NO_ATOMIC_COUNT: do not use atomic variable to count packets, if you do so, you must call pg_brick_pkts_count_get
in the same thread you use to poll packets -DPG_VHOST_FASTER_YET_BROKEN_POLL: change the way vhost lock the queue so it spend less time locking/unlocking the queue, but can easily deadlock if badly use.
-DTAP_IGNORE_ERROR: when packetgrapg can't burst or poll a tap, it return 0 instead of returning an error
Packetgraph project is published under GNU GPLv3. For more information, check LICENSE file.
New to packetgraph ? Want to contribute and/or create a new brick ? Some developer guidelines are available.
Packetgraph is an open-source project, feel free to chat with us on IRC
server: irc.freenode.org
chan: #betterfly