From 44270521c22729cf6d58ea63ba6ddd1aa535b1c5 Mon Sep 17 00:00:00 2001 From: pmikus Date: Mon, 3 Apr 2017 12:34:32 +0200 Subject: [PATCH 1/1] Apply performance options for testpmd - Add parameters to increase the performance of SUTs Change-Id: Ia9c5d76639bd931d8113c26e18861648de395322 Signed-off-by: pmikus --- dpdk-tests/dpdk_scripts/cleanup_dpdk.sh | 8 +++--- dpdk-tests/dpdk_scripts/init_dpdk.sh | 8 +++--- dpdk-tests/dpdk_scripts/install_dpdk.sh | 10 ++++---- dpdk-tests/dpdk_scripts/run_l2fwd.sh | 44 ++++++++++++++++++++++++--------- 4 files changed, 46 insertions(+), 24 deletions(-) diff --git a/dpdk-tests/dpdk_scripts/cleanup_dpdk.sh b/dpdk-tests/dpdk_scripts/cleanup_dpdk.sh index 3533a1a580..7961a5b40f 100755 --- a/dpdk-tests/dpdk_scripts/cleanup_dpdk.sh +++ b/dpdk-tests/dpdk_scripts/cleanup_dpdk.sh @@ -47,9 +47,9 @@ sudo rm -f /dev/hugepages/* # Unbind interfaces cd ${ROOTDIR}/${DPDK_VERSION}/ sudo ./usertools/dpdk-devbind.py -b ${port1_driver} ${port1_pci} || \ - echo "Unbind ${port1_pci} failed" || exit 1 + { echo "Unbind ${port1_pci} failed"; exit 1; } sudo ./usertools/dpdk-devbind.py -b ${port2_driver} ${port2_pci} || \ - echo "Unbind ${port1_pci} failed" || exit 1 + { echo "Unbind ${port1_pci} failed"; exit 1; } sleep 2 @@ -58,6 +58,6 @@ if2_name=`./usertools/dpdk-devbind.py --s | grep "${port2_pci}" | sed -n 's/.*if # Remove igb_uio driver rmmod igb_uio || \ - echo "Removing igb_uio failed" || exit 1 + { echo "Removing igb_uio failed"; exit 1; } -cd ${PWDDIR} +cd ${PWDDIR} \ No newline at end of file diff --git a/dpdk-tests/dpdk_scripts/init_dpdk.sh b/dpdk-tests/dpdk_scripts/init_dpdk.sh index 9870f49f42..20f86f335e 100755 --- a/dpdk-tests/dpdk_scripts/init_dpdk.sh +++ b/dpdk-tests/dpdk_scripts/init_dpdk.sh @@ -15,21 +15,21 @@ lsmod | grep igb_uio if [ $? -ne 1 ]; then rmmod igb_uio || \ - echo "Failed to remove igb_uio module" || exit 1 + { echo "Failed to remove igb_uio module"; exit 1; } fi lsmod | grep uio_pci_generic if [ $? -ne 1 ]; then rmmod uio_pci_generic || \ - echo "Failed to remove uio_pci_generic module" || exit 1 + { echo "Failed to remove uio_pci_generic module"; exit 1; } fi insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko || \ - echo "Failed to insert igb_uio module" || exit 1 + { echo "Failed to insert igb_uio module"; exit 1; } # Binding ./usertools/dpdk-devbind.py -b igb_uio $1 $2 || \ - echo "Failed to bind interface $1 and $2 to igb_uio" || exit 1 + { echo "Failed to bind interface $1 and $2 to igb_uio"; exit 1; } cd ${PWDDIR} diff --git a/dpdk-tests/dpdk_scripts/install_dpdk.sh b/dpdk-tests/dpdk_scripts/install_dpdk.sh index 4b4c04a727..a050eb75f7 100755 --- a/dpdk-tests/dpdk_scripts/install_dpdk.sh +++ b/dpdk-tests/dpdk_scripts/install_dpdk.sh @@ -12,14 +12,14 @@ PWDDIR=$(pwd) # Download the DPDK package cd ${ROOTDIR} wget "fast.dpdk.org/rel/${DPDK_PACKAGE}" || \ - echo "Failed to download $DPDK_PACKAGE" || exit 1 + { echo "Failed to download $DPDK_PACKAGE"; exit 1; } tar xJvf ${DPDK_PACKAGE} || \ - echo "Failed to extract $DPDK_PACKAGE" || exit 1 + { echo "Failed to extract $DPDK_PACKAGE"; exit 1; } # Compile the DPDK cd ./${DPDK_DIR} make install T=x86_64-native-linuxapp-gcc -j || \ - echo "Failed to compile $DPDK_VERSION" || exit 1 + { echo "Failed to compile $DPDK_VERSION"; exit 1; } cd ${PWDDIR} # Compile the l3fwd @@ -27,7 +27,7 @@ export RTE_SDK=${ROOTDIR}/${DPDK_DIR}/ export RTE_TARGET=x86_64-native-linuxapp-gcc cd ${RTE_SDK}/examples/l3fwd make -j || \ - echo "Failed to compile l3fwd" || exit 1 + { echo "Failed to compile l3fwd"; exit 1; } cd ${PWDDIR} # Check and setup the hugepages @@ -49,7 +49,7 @@ if [ ${SYS_HUGEPAGE} -lt 4096 ]; then echo " Mounting hugepages" sudo mkdir -p /mnt/huge sudo mount -t hugetlbfs nodev /mnt/huge/ || \ - echo "Failed to mount hugepages" || exit 1 + { echo "Failed to mount hugepages"; exit 1; } fi # Check and set the max map count diff --git a/dpdk-tests/dpdk_scripts/run_l2fwd.sh b/dpdk-tests/dpdk_scripts/run_l2fwd.sh index 80ed14a330..14c22970d7 100755 --- a/dpdk-tests/dpdk_scripts/run_l2fwd.sh +++ b/dpdk-tests/dpdk_scripts/run_l2fwd.sh @@ -49,18 +49,40 @@ sleep 2 cd ${ROOTDIR}/${DPDK_VERSION}/ rm -f ${TESTPMDLOG} if [ "$jumbo_frames" = "yes" ]; then - sudo sh -c "screen -dmSL DPDK-test ./x86_64-native-linuxapp-gcc/app/testpmd -l ${cpu_corelist} \ - -n 4 -- --numa --nb-ports=2 --portmask=0x3 --nb-cores=${nb_cores} \ - --max-pkt-len=9000 --txqflags=0 --forward-mode=io --rxq=${queue_nums} \ - --txq=${queue_nums} --auto-start" - sleep 10 - cat ${TESTPMDLOG} + sudo sh -c "screen -dmSL DPDK-test ./x86_64-native-linuxapp-gcc/app/testpmd \ + -l ${cpu_corelist} -n 4 -- \ + --numa \ + --nb-ports=2 \ + --portmask=0x3 \ + --nb-cores=${nb_cores} \ + --max-pkt-len=9000 \ + --txqflags=0 \ + --forward-mode=io \ + --rxq=${queue_nums} \ + --txq=$((${nb_cores} + 1)) \ + --burst=64 \ + --rxd=1024 \ + --txd=1024 \ + --disable-link-check \ + --auto-start" else - sudo sh -c "screen -dmSL DPDK-test ./x86_64-native-linuxapp-gcc/app/testpmd -l ${cpu_corelist} \ - -n 4 -- --numa --nb-ports=2 --portmask=0x3 --nb-cores=${nb_cores} \ - --forward-mode=io --rxq=${queue_nums} --txq=${queue_nums} --auto-start" - sleep 10 - cat ${TESTPMDLOG} + sudo sh -c "screen -dmSL DPDK-test ./x86_64-native-linuxapp-gcc/app/testpmd \ + -l ${cpu_corelist} -n 4 -- \ + --numa \ + --nb-ports=2 \ + --portmask=0x3 \ + --nb-cores=${nb_cores} \ + --forward-mode=io \ + --rxq=${queue_nums} \ + --txq=$((${nb_cores} + 1)) \ + --burst=64 \ + --rxd=1024 \ + --txd=1024 \ + --disable-link-check \ + --auto-start" fi +sleep 10 +less -r ${TESTPMDLOG} + cd ${PWDDIR} -- 2.16.6