install dpdk, pktgen-dpdk in centos76

1. in centos 7.6

yum makecache;
yum install -y gcc gcc-c++  kernel-devel kernel-headers kernel.x86_64 net-tools
yum install -y numactl-devel.x86_64 numactl-libs.x86_64
yum install -y pciutils
yum install kernel-devel-$(uname -r)

yum install -y numactl-devel gcc  readline-devel lua-devel libpcap-devel gcc-g++ net-tools numactl-devel readline epel-release

2. HugePage memory

echo 2048 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
mkdir /mnt/huge
chmod 777 /mnt/huge
vim /etc/fstab 
"
nodev /mnt/huge hugetlbfs defaults 0 0
"

3. grep -i huge /proc/meminfo

4. git clone git://dpdk.org/dpdk
   git checkout -f v19.08 -b v19.08

5. 
export RTE_SDK=/workspace/dpdk/
export RTE_TARGET=x86_64-native-linuxapp-gcc

#vim /etc/profile
    In the end of this file, append the following:
    export RTE_SDK="/workspace/dpdk/"
    export RTE_TARGET="x86_64-native-linuxapp-gcc"
#source /etc/profile

6.
make config T=x86_64-native-linuxapp-gcc 
sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config # enable pcap
config/common_base, 
CONFIG_RTE_LIBRTE_MLX5_PMD=y
make install T=x86_64-native-linuxapp-gcc 

#modprobe uio
#insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
#insmod x86_64-native-linuxapp-gcc/kmod/rte_kni.ko
NIC status and states
#./usertools/dpdk-devbind.py --status


7.
#yum install -y numactl-devel gcc  readline-devel lua-devel libpcap-devel gcc-g++ net-tools numactl-devel readline epel-release

8.
wget https://centos7.iuscommunity.org/ius-release.rpm
rpm -Uvh ius-release*rpm  
yum --enablerepo=ius-archive install lua53u*

9.
https://www.lua.org/ftp/, download 5.3.5
tar -xvf 
cd lua-5.3.5
go to http://www.linuxfromscratch.org/blfs/view/stable/general/lua.html
download http://www.linuxfromscratch.org/patches/blfs/9.1/lua-5.3.5-shared_library-1.patch
patch -p1 < lua-5.3.5-shared_library-1.patch
make linux install
make local

10.
git clone git://dpdk.org/apps/pktgen-dpdk
cd pktgen-dpdk
make -j 8
 

你可能感兴趣的:(Linux,kernel)