mengdemao / lazybsd

用户态网络库实现
https://mengdemao.github.io/lazybsd/
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link
dpdk freebsd network

lazybsd

Github Action GitHub code size in bytes GitHub all releases GitHub GitHub tag (latest by date) GitHub commit activity CodeFactor codecov Coverity Scan Build Status

freebsd网络协议栈Linux用户层移植

目录

背景

编译freebsd

$ export MAKEOBJDIRPREFIX=${PWD%/*}/build

$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=amd64 TARGET_ARCH=amd64 -n
$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=amd64 TARGET_ARCH=amd64 kernel-toolchain -s -j4
$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=amd64 TARGET_ARCH=amd64 KERNCONF=GENERIC NO_MODULES=yes buildkernel -s -j4

$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=arm64 TARGET_ARCH=aarch64 -n
$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=arm64 TARGET_ARCH=aarch64 kernel-toolchain -s -j4
$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=arm64 TARGET_ARCH=aarch64 KERNCONF=GENERIC NO_MODULES=yes buildkernel -s -j4

编译DPDK

$ sudo apt-get install build-essential
$ sudo apt install meson ninja-build
$ sudo apt install libnuma-dev

$ mkdir build
$ meson build
$ ninja -C build

安装

# 安装软件
sudo apt install doxygen graphviz python3 python3-pip libgtest-dev ninja-build

# 安装conan
pip3 install conan
export PATH=~/.local/bin/:$PATH

conan profile detect --force

conan install conanfile.txt --build=missing -s build_type=Debug
conan install conanfile.txt --build=missing -s build_type=Release

# 生成Release
cmake --preset conan-release

# 配置编译
cmake -B build -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="build/Release/generators/conan_toolchain.cmake" -DCMAKE_BUILD_TYPE="Release"

# 执行编译
cmake --build build --config  Release/Debug/RelWithDebInfo

# 执行测试
ctest -C Release/Debug/RelWithDebInfo

使用

API

贡献

See the contributing file!

许可证

BSD 3-Clause License