summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorCiprian Barbu <ciprian.barbu@linaro.org>2015-06-16 18:22:02 +0300
committerCiprian Barbu <ciprian.barbu@linaro.org>2015-06-25 10:41:52 +0000
commit79ca477ea1a2c7d472d082ad08c832af727b0dde (patch)
treee449aebcbc4a135cf1c7b15cf7c0a57f07261d7e /common
parent331b16ebb6005d23e5821147b86a911f7dc5e668 (diff)
ubuntu: add odp-ovs and netmap multinode tests
Change-Id: Ice78c659ec03e7bac09e4abe8dba9804b2322df5 Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
Diffstat (limited to 'common')
-rwxr-xr-xcommon/scripts/netmap-pkt-gen/find_nics.sh16
-rwxr-xr-xcommon/scripts/netmap-pkt-gen/parse-tx-rx.sh9
-rwxr-xr-xcommon/scripts/netmap-pkt-gen/start-pkt-gen.sh13
-rwxr-xr-xcommon/scripts/odp-ovs/ovs-odp-dpdk-nic-bind-82599.sh7
4 files changed, 45 insertions, 0 deletions
diff --git a/common/scripts/netmap-pkt-gen/find_nics.sh b/common/scripts/netmap-pkt-gen/find_nics.sh
new file mode 100755
index 0000000..b85b4e7
--- /dev/null
+++ b/common/scripts/netmap-pkt-gen/find_nics.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# This script looks for all network interfaces of a certain type given by
+# NIC_PATTERN. It uses lspci to get the pci ids of the matching NICs and then
+# tries to find the network interfaces (ethx) associated with them. For this
+# the appropriate drivers must be available in the system.
+
+test $# -lt 1 && echo "Please pass NIC pattern" && exit 1
+NIC=$1
+
+truncate -s 0 pci_ids
+truncate -s 0 sys_net
+truncate -s 0 ifs
+lspci -nn | grep -i $NIC | awk '{print $1}' > pci_ids
+for i in $(ls /sys/class/net/); do ln=$(readlink -f /sys/class/net/$i/device); echo $i $ln >> sys_net; done
+for i in $(cat pci_ids); do cat sys_net | grep $i | awk '{print $1}' >> ifs; done
diff --git a/common/scripts/netmap-pkt-gen/parse-tx-rx.sh b/common/scripts/netmap-pkt-gen/parse-tx-rx.sh
new file mode 100755
index 0000000..a133c81
--- /dev/null
+++ b/common/scripts/netmap-pkt-gen/parse-tx-rx.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# This script parses the output from netmap and transforms it into something
+# usable by common/script/min_max_avg_parse.py
+# Sample command: parse-tx-rx.sh tx.in tx.out rx.in rx.out
+
+test $# -lt 4 && echo "Please pass input and output files" && exit 1
+cat $1 | grep main_thread | grep pps | awk '{print "tx_throughput: " $4}' > $2
+cat $3 | grep main_thread | grep pps | awk '{print "rx_throughput: " $4}' > $4
diff --git a/common/scripts/netmap-pkt-gen/start-pkt-gen.sh b/common/scripts/netmap-pkt-gen/start-pkt-gen.sh
new file mode 100755
index 0000000..5f03a72
--- /dev/null
+++ b/common/scripts/netmap-pkt-gen/start-pkt-gen.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# This script start netmap pkt-gen on two interfaces, one used to transmit and
+# the other to receive; the output of pkt-gen is saved in files to be parsed and
+# passed to common/scripts/min_max_avg_parse.py
+# Sample command: start-pkt-gen.sh eth0 eth1 tx.out rx.out
+# where eth0 is used to send packets and eth1 to receive
+
+test $# -lt 4 && echo "Please pass interfaces and rx and tx output files" && exit 1
+
+netmap/examples/pkt-gen -i $1 -f tx -l 64 &> $2 &
+sleep 4
+netmap/examples/pkt-gen -i $3 -f rx &> $4 &
diff --git a/common/scripts/odp-ovs/ovs-odp-dpdk-nic-bind-82599.sh b/common/scripts/odp-ovs/ovs-odp-dpdk-nic-bind-82599.sh
new file mode 100755
index 0000000..33ff797
--- /dev/null
+++ b/common/scripts/odp-ovs/ovs-odp-dpdk-nic-bind-82599.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+test $# -lt 1 && echo "Please pass path to DPDK" && exit 1
+cd $1
+for n in $(./tools/dpdk_nic_bind.py --status | awk ' $2 ~ "82599" {print $1}')
+do
+ ./tools/dpdk_nic_bind.py --bind=igb_uio $n
+done