DPVS-1:编译安装DPVS (ubuntu22.04)

操作系统

root@ubuntu22:~# lsb_release  -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
root@ubuntu22:~# 

前置软件准备

apt install git
apt install meson
apt install gcc
apt install pkg-config
apt install libnuma-dev
apt install libssl-dev
 
apt install automake autoconf
apt install libtool
apt install libpopt-dev

DPDK编译安装

下载DPVS

git clone https://github.com/iqiyi/dpvs.git
cd dpvs

下载DPDK20.11

在dpvs目录下下载dpdk,方便后续操作

root@ubuntu22:~/dpvs# wget https://fast.dpdk.org/rel/dpdk-20.11.10.tar.xz 
--2025-02-20 15:16:23--  https://fast.dpdk.org/rel/dpdk-20.11.10.tar.xz
Resolving fast.dpdk.org (fast.dpdk.org)... 151.101.130.49, 151.101.66.49, 151.101.2.49, ...
Connecting to fast.dpdk.org (fast.dpdk.org)|151.101.130.49|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14047916 (13M) [application/octet-stream]
Saving to: ‘dpdk-20.11.10.tar.xz’

dpdk-20.11.10.tar.xz              100%[============================================================>]  13.40M  6.96MB/s    in 1.9s    

2025-02-20 15:16:26 (6.96 MB/s) - ‘dpdk-20.11.10.tar.xz’ saved [14047916/14047916]

root@ubuntu22:~/dpvs# 
root@ubuntu22:~/dpvs# tar xf dpdk-20.11.10.tar.xz 

打PATCH

root@ubuntu22:~/dpvs# cp patch/dpdk-stable-20.11.10/* dpdk-stable-20.11.10/
root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# patch -p1 < 0001-kni-use-netlink-event-for-multicast-driver-part.patch 
patching file kernel/linux/kni/kni_net.c
root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# patch -p1 < 0002-pdump-change-dpdk-pdump-tool-for-dpvs.patch 
patching file app/pdump/main.c
patching file lib/librte_pdump/rte_pdump.c
patching file lib/librte_pdump/rte_pdump.h
root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# patch -p1 < 0003-debug-enable-dpdk-eal-memory-debug.patch 
patching file lib/librte_eal/common/rte_malloc.c
patching file lib/librte_eal/include/rte_malloc.h
root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# patch -p1 < 0004-ixgbe_flow-patch-ixgbe-fdir-rte_flow-for-dpvs.patch 
patching file drivers/net/ixgbe/ixgbe_flow.c
root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# patch -p1 < 0005
-bash: 0005: No such file or directory
root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# patch -p1 < 0005-bonding-allow-slaves-from-different-numa-nodes.patch 
patching file drivers/net/bonding/rte_eth_bond_pmd.c
root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# patch -p1 < 0006-bonding-fix-problem-in-mode-4-dropping-multicast-pac.patch 
patching file drivers/net/bonding/rte_eth_bond_pmd.c
root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# patch -p1 < 0007-bonding-device-sends-packets-with-user-specified-sal.patch 
patching file drivers/net/bonding/rte_eth_bond_pmd.c
patching file lib/librte_mbuf/rte_mbuf.h

编译

在dpdkbuild中编译,安装在dpdklib中,后续指定 pkg-config目录到

root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# mkdir dpdklib 
root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# mkdir dpdkbuild
root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# meson -Denable_kmods=true -Dprefix=/root/dpvs/dpdk-stable-20.11.10/dpdklib dpdkbuild

root@ubuntu22:~/dpvs/dpdk-stable-20.11.10# ninja -C dpdkbuild/
ninja: Entering directory `dpdkbuild/'
[2419/2421] Generating kernel/linux/kni/rte_kni with a custom command
make: Entering directory '/usr/src/linux-headers-6.2.0-26-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-11 (Ubuntu 11.3.0-1ubuntu1~22.04.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值