标签:lis https 版本 内存 本机 pci src archive option
$ git clone git://dpdk.org/dpdk or:git clone http://dpdk.org/git/dpdk
$ git clone git://dpdk.org/apps/pktgen-dpdk or:
$ git clone http://dpdk.org/git/apps/pktgen-dpdk
$ export RTE_SDK=<DPDKInstallDir>//DPDK的安装目录
$ export RTE_TARGET=x86_64-native-linuxapp-gcc
$ cd $RTE_SDK
$ make install T=x86_64-native-linuxapp-gcc
$ cd <PktgenInstallDir>//进入pktgen的安装目录
$ make
# cd dpdk/usertools
# ./dpdk-setup.sh
修改DPDK EAL 的命令行参数
修改Pktgen的命令行参数
description = ‘A Pktgen default simple configuration‘
# Setup configuration
setup = {
‘exec‘: (
‘sudo‘,
‘-E‘
),
‘devices‘: (
‘01:00.0 01:00.1‘ //修改网卡设备PCI号,本机绑定了两张10G网卡
),
‘opts‘: (
‘-b igb_uio‘
)
}
# Run command and options
run = {
‘exec‘: (
‘sudo‘,
‘-E‘
),
# Application name and use app_path to help locate the app
‘app_name‘: ‘pktgen‘,
# using (sdk) or (target) for specific variables
# add (app_name) of the application
# Each path is tested for the application
‘app_path‘: (
‘./app/%(target)s/%(app_name)s‘,
‘%(sdk)s/%(target)s/app/%(app_name)s‘,
),
‘dpdk‘: (
‘-l 0-2‘,//使用了三个逻辑核
‘-n 2‘,//内存通道数为2
‘--proc-type auto‘,
‘--log-level 7‘,
‘--socket-mem 1024‘,//大页为1024
‘--file-prefix pg‘
),
‘blacklist‘: (
#‘-b 81:00.0 -b 81:00.1 -b 81:00.2 -b 81:00.3‘,
#‘-b 85:00.0 -b 85:00.1 -b 85:00.2 -b 85:00.3‘,
‘-b 81:00.0 -b 81:00.1‘,
‘-b 85:00.0 -b 85:00.1‘,
‘-b 83:00.0‘
),
‘app‘: (
‘-T‘,
‘-P‘,
‘--crc-strip‘,
‘-m [1].0‘,//逻辑核对1应端口号0,逻辑核0号作为主核不可绑定
‘-m [2].1‘//逻辑核对1应端口号0,逻辑核0号作为主核不可绑定
#‘-m [19:20].2‘,
#‘-m [21:22].3‘
),
‘misc‘: (
‘-f‘, ‘themes/black-yellow.theme‘
)
}
$ cd <PktgenInstallDir>/tools
$ ./run.py -s default # setup system using the cfg/default.cfg file
$ cd <PktgenInstallDir>/tools
$ run.py default
若没有出现正确的配置选项,可参照博客:
http://www.cnblogs.com/ZCplayground/p/9328735.html
https://mails.dpdk.org/archives/users/2018-July/003269.html
用网线把两个网卡接口相连,运行
显示包转发速率到了每秒千万级别,已完全达到高速发包的要求
标签:lis https 版本 内存 本机 pci src archive option
原文地址:https://www.cnblogs.com/vancasola/p/9338982.html