1 Star 0 Fork 0

missyoyo / libmoon

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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.

The MIT License (MIT) Copyright (c) 2016 Paul Emmerich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

libmoon is a library for fast and flexible packet processing with DPDK and LuaJIT.(Fork from https://github.com/libmoon/libmoon) 展开 收起
Lua
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Lua
1
https://gitee.com/missyoyo/libmoon.git
git@gitee.com:missyoyo/libmoon.git
missyoyo
libmoon
libmoon
master

搜索帮助

14c37bed 8189591 565d56ea 8189591