“HowToInstallDpdk”的版本间差异
		
		
		
		
		
		跳到导航
		跳到搜索
		
			
		
		
	
 (创建页面,内容为“# 通过ssh或者console进入系统shell # 首先, 请确定您使用的是申威NetONE系统, 检查的方法是<source lang="bash" line> uname -a | grep swx1 #…”)  | 
			
(没有差异) 
 | 
2018年8月22日 (三) 16:56的版本
- 通过ssh或者console进入系统shell
 - 首先, 请确定您使用的是申威NetONE系统, 检查的方法是
1uname -a | grep swx1 2# 如果有如下的输出, 即表示是NetONE系统 3#Linux netone 4.4.150-swx1 #1 SMP Sat Aug 18 11:47:40 UTC 2018 sw_64 GNU/Linux
 - 然后, 请参照这里完成当前系统的升级, 确保当前系统包含所需软件包;
 - 接下来安装dpdk, 请执行: 
1ipkg-cl -f /root/ipkg.conf install dpdk # 仅仅安装内核模块, 是dpdk的最小安装 2ipkg-cl -f /root/ipkg.conf install dpdk-tools # 安装dpdk-devbind, testpmd等dpdk基本配置和测试工具 3ipkg-cl -f /root/ipkg.conf install dpdk-tests # 在/usr/local/bin/下安装dpdk examples下的部分测试程序
 - 重启
 - /usr/share/dpdk下, 可以查看setup.sh等dpdk官方工具
 
以下内容仅供参考:
- /etc/init.d/S30dpdk启动脚本
1#!/bin/sh 2 3echo "starting dpdk...." 4/bin/mkdir -p /mnt/huge 5/bin/mount -t hugetlbfs nodev /mnt/huge 6echo 2048 > /sys/kernel/mm/hugepages/hugepages-8192kB/nr_hugepages
 - /root/dpdk.sh 
1#!/bin/sh 2 3DRIVER=igb_uio 4 5# SLOTS的内容可以通过"dpdk_nic_bind --status"获取, 在本示例里面(swx1), 09:00.0对应的是eth4, 09:00.1对应的是eth5 6SLOTS="0001:2a:00.0 0001:2a:00.1" 7 8/sbin/modprobe ${DRIVER} 9for t in ${SLOTS}; do 10 dpdk_nic_bind --force --bind=${DRIVER} ${t} 11done 12dpdk_nic_bind --status
 - 进入申威系统, 运行testpmd, 进行测试