1 ##############################################################################
2 # Copyright (c) 2017 Nokia and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
13 # Commandline arguments
14 NUM_TRAFFIC_PORTS=${1:-1}
18 if ! lsmod | grep "uio" &> /dev/null; then
22 if ! lsmod | grep "igb_uio" &> /dev/null; then
23 insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
26 if ! lsmod | grep "rte_kni" &> /dev/null; then
27 insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/rte_kni.ko
33 chmod 777 /sys/bus/pci/drivers/virtio-pci/*
34 chmod 777 /sys/bus/pci/drivers/igb_uio/*
37 add_interface_to_dpdk(){
38 interfaces=$(lspci |grep Eth |tail -n +2 |awk '{print $1}')
39 /dpdk/usertools/dpdk-devbind.py --bind=igb_uio $interfaces &> /dev/null
44 blacklist=$(lspci |grep Eth |awk '{print $1}'|head -1)
46 if [ $NUM_TRAFFIC_PORTS -gt 1 ]; then
47 sudo ./destdir/bin/testpmd -c 0x3f -n 4 -b $blacklist -- -a --nb-cores=4 --coremask=0x3c --rxq=2 --rxd=4096 --rss-udp --txq=2 --forward-mode=rxonly
49 sudo ./destdir/bin/testpmd -c 0x0f -n 4 -b $blacklist -- -a --nb-cores=2 --coremask=0x0c --rxq=2 --rxd=4096 --rss-udp --txq=2 --forward-mode=rxonly
55 if ip a | grep eth2 >/dev/null 2>&1; then
59 if ip a | grep eth1 >/dev/null 2>&1; then