Apply performance options for testpmd 06/6006/6
authorpmikus <pmikus@cisco.com>
Mon, 3 Apr 2017 10:34:32 +0000 (12:34 +0200)
committerPeter Mikus <pmikus@cisco.com>
Wed, 5 Apr 2017 04:47:50 +0000 (04:47 +0000)
- Add parameters to increase the performance of SUTs

Change-Id: Ia9c5d76639bd931d8113c26e18861648de395322
Signed-off-by: pmikus <pmikus@cisco.com>
dpdk-tests/dpdk_scripts/cleanup_dpdk.sh
dpdk-tests/dpdk_scripts/init_dpdk.sh
dpdk-tests/dpdk_scripts/install_dpdk.sh
dpdk-tests/dpdk_scripts/run_l2fwd.sh

index 3533a1a..7961a5b 100755 (executable)
@@ -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} || \
 # 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} || \
 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
 
 
 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 || \
 
 # 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
index 9870f49..20f86f3 100755 (executable)
@@ -15,21 +15,21 @@ lsmod | grep igb_uio
 if [ $? -ne 1 ];
 then
     rmmod 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 || \
 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 || \
 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 || \
 
 # 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}
 
 cd ${PWDDIR}
index 4b4c04a..a050eb7 100755 (executable)
@@ -12,14 +12,14 @@ PWDDIR=$(pwd)
 # Download the DPDK package
 cd ${ROOTDIR}
 wget "fast.dpdk.org/rel/${DPDK_PACKAGE}" || \
 # 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} || \
 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 || \
 
 # 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
 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 || \
 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
 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 "  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
 fi
 
 # Check and set the max map count
index 80ed14a..14c2297 100755 (executable)
@@ -49,18 +49,40 @@ sleep 2
 cd ${ROOTDIR}/${DPDK_VERSION}/
 rm -f ${TESTPMDLOG}
 if [ "$jumbo_frames" = "yes" ]; then
 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
 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
 
 fi
 
+sleep 10
+less -r ${TESTPMDLOG}
+
 cd ${PWDDIR}
 cd ${PWDDIR}