- Add parameters to increase the performance of SUTs
Change-Id: Ia9c5d76639bd931d8113c26e18861648de395322
Signed-off-by: pmikus <pmikus@cisco.com>
# 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; }
# 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}
\ No newline at end of file
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; }
# 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
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
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
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"
- 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"
+sleep 10
+less -r ${TESTPMDLOG}
+