Last active
March 4, 2016 16:56
-
-
Save garyachy/036502ddcef38ace74d0 to your computer and use it in GitHub Desktop.
Script to setup environment and run DPDK KNI sample application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
#setup path to DPDK | |
export RTE_SDK=/home/dpdk | |
export RTE_TARGET=x86_64-native-linuxapp-gcc | |
#setup 512 huge pages | |
mkdir -p /mnt/huge | |
umount -t hugetlbfs nodev /mnt/huge | |
mount -t hugetlbfs nodev /mnt/huge | |
echo 512 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages | |
#bind eth1 and eth2 to Linux generic UIO | |
modprobe uio_pci_generic | |
${RTE_SDK}/tools/dpdk_nic_bind.py --bind=uio_pci_generic eth1 | |
${RTE_SDK}/tools/dpdk_nic_bind.py --bind=uio_pci_generic eth2 | |
#insert KNI kernel driver | |
insmod ${RTE_SDK}/${RTE_TARGET}/kmod/rte_kni.ko | |
#start KNI sample application | |
export LD_LIBRARY_PATH=${RTE_SDK}/${RTE_TARGET}/lib/ | |
${RTE_SDK}/examples/kni/build/kni -c 0x0f -n 4 -- -P -p 0x3 --config="(0,0,1),(1,2,3)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment