All Projects → libmoon → Libmoon

libmoon / Libmoon

Licence: mit
libmoon is a library for fast and flexible packet processing with DPDK and LuaJIT.

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Libmoon

Ruru
Real-time TCP latency monitoring using DPDK backend and a 3D React frontend
Stars: ✭ 155 (-38%)
Mutual labels:  dpdk
Luarocks
LuaRocks is the package manager for the Lua programming language.
Stars: ✭ 2,324 (+829.6%)
Mutual labels:  luajit
Lua Openssl
Openssl binding for Lua
Stars: ✭ 206 (-17.6%)
Mutual labels:  luajit
Npf
NPF: packet filter with stateful inspection, NAT, IP sets, etc.
Stars: ✭ 160 (-36%)
Mutual labels:  dpdk
Protoplug
Create audio plugins on-the-fly with LuaJIT.
Stars: ✭ 175 (-30%)
Mutual labels:  luajit
Luaver
Lua Version Manager - Managing and switching between different versions of Lua, LuaJIT and Luarocks made easy
Stars: ✭ 179 (-28.4%)
Mutual labels:  luajit
Shadows
Shädows - A Shadows & Lights engine for löve
Stars: ✭ 134 (-46.4%)
Mutual labels:  luajit
Tolua
The fastest unity lua binding solution
Stars: ✭ 2,630 (+952%)
Mutual labels:  luajit
Opennetvm
A high performance container-based NFV platform from GW and UCR.
Stars: ✭ 177 (-29.2%)
Mutual labels:  dpdk
Luject
🍹A static injector of dynamic library for application (android, iphoneos, macOS, windows, linux)
Stars: ✭ 203 (-18.8%)
Mutual labels:  luajit
Lua Resty Repl
Interactive console (REPL) for Openresty and luajit code
Stars: ✭ 165 (-34%)
Mutual labels:  luajit
Goluwa
a game framework written in luajit
Stars: ✭ 173 (-30.8%)
Mutual labels:  luajit
Lua Resty Redis Connector
Connection utilities for lua-resty-redis
Stars: ✭ 186 (-25.6%)
Mutual labels:  luajit
Dpvs
DPVS is a high performance Layer-4 load balancer based on DPDK.
Stars: ✭ 2,168 (+767.2%)
Mutual labels:  dpdk
Luvi
A project in-between luv and luvit.
Stars: ✭ 215 (-14%)
Mutual labels:  luajit
Loom
Easier to read LuaJIT dumps
Stars: ✭ 138 (-44.8%)
Mutual labels:  luajit
Mlua
High level Lua 5.4/5.3/5.2/5.1 (including LuaJIT) bindings to Rust with async/await support
Stars: ✭ 176 (-29.6%)
Mutual labels:  luajit
Sol2
Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
Stars: ✭ 2,791 (+1016.4%)
Mutual labels:  luajit
Capsule
A framework for network function development. Written in Rust, inspired by NetBricks and built on DPDK.
Stars: ✭ 217 (-13.2%)
Mutual labels:  dpdk
Packet Journey
DEPRECATED - Packet-journey, userland router which uses DPDK for its fastpath switching.
Stars: ✭ 200 (-20%)
Mutual labels:  dpdk

Abstract

LuaJIT + DPDK = fast and flexible packet processing at speeds above 100 Gbit/s.

Read and try out one of the examples to get started.

libmoon started out as the packet generator MoonGen which evolved into a more general framework for packet processing. You can read our IMC 2015 Research Paper (BibTeX) for a discussion of our architecture which remained unchanged in libmoon. Please use this paper as a canonical reference to libmoon if you are writing a paper or thesis.

The libmoon Framework

libmoon is a high-speed framework to develop DPDK applications in Lua and C/C++. Its main goal is to simplify the initial creation of new DPDK applications by providing a concise and solid framework to build upon. The core is a Lua wrapper for DPDK that simplifies operations that are typically extremely verbose in DPDK, e.g., device initialization. libmoon also simplifies protocol implementations and tests by providing an extensible packet header processing and parsing library.

Explicit multi-core support is at the heart of libmoon. Scripts define a master task that is executed on startup. This task configures devices and queues and then starts one or more slave tasks that then handle packet IO.

Note that Lua does not have any native support for multi-threading. libmoon therefore starts a new and completely independent LuaJIT VM for each task. Tasks can only share state through communication primitives provided by libmoon. The example script inter-task-communication.lua showcases the available communication methods.

Further Examples and Applications Built on libmoon

The MoonGen packet generator features user scripts that are essentially small libmoon applications. Hence, MoonGen's examples may be useful.

FlowScope is a traffic analysis tool using libmoon. It's a good example on integration libmoon with custom C++ code.

Installation

Just run build.sh, bind-interfaces.sh, and setup-hugetlbfs.sh. When using Mellanox NICs additional steps are neccessary.

# install dependencies and compile libmoon
sudo apt-get install git build-essential cmake linux-headers-`uname -r` lshw libnuma-dev
git clone https://github.com/libmoon/libmoon
cd libmoon
./build.sh
# bind all NICs that are not actively used (no IP configured) to DPDK
sudo ./bind-interfaces.sh
# configure hugetlbfs
sudo ./setup-hugetlbfs.sh
# run the hello-world example
sudo ./build/libmoon examples/hello-world.lua

Note: Use deps/dpdk/tools/dpdk-devbind.py to manage NIC drivers manually to get them back into the OS.

Dependencies

  • gcc >= 4.8
  • make
  • cmake
  • kernel headers (for the DPDK igb-uio driver)
  • lspci (for dpdk-devbind.py)
  • libnuma-dev

FAQ

Which NICs do you support?

libmoon supports all NICs supported by DPDK. Note that some NICs (e.g., Mellanox) require external components to work with DPDK. Refer to the DPDK documentation for further information. We test and develop libmoon on various NICs of the ixgbe, i40e, and igb family.

Why should I use this instead of DPDK directly?

It's easier to get started. Seriously, have you tried reading one of the DPDK examples?

Why should I use this instead of Snabb?

Snabb has a completely different approach. They build their own drivers and generally do not rely on hardware capabilities (e.g., filtering and offloading). libmoon is just a wrapper for DPDK and heavily uses hardware-specific features.

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].