summaryrefslogtreecommitdiff
path: root/ubuntu/netmap-pkt-gen-multinode.yaml
blob: a892b912069ecc2205ac46f9e03591163f3b8187 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
metadata:
    format: Lava-Test Test Definition 1.0
    name: netmap-pkt-gen-multinode
    description: "The netmap-pkt-gen-multinode can be used to measure the performance of a simple l2fwd
                  application in a multinode setup. A typical setup is two machines connected back to
                  back through a pair of interfaces (usually intel server DPDK dual NICs like the 82599
                  dual port 10GB interface) where the l2fwd runs on one machine and netmap runs on the
                  other. The test launches a pkt-gen instance to send packets on one interface and another
                  one to receive packets and count them on the other interface."
    maintainer:
        - ciprian.barbu@linaro.org
    os:
        - ubuntu
    scope:
        - functional
        - performance
    devices:
        - x86


params:
    LINUX_SRC: "/usr/src/linux-source"
    NIC_PATTERN: "82599"
    TEST_TIME: "360"

install:
    deps:
        - git
        - binutils
        - gcc
        - make
        - patch
        - pciutils
        - python-numpy
        - lshw
    git-repos:
        - url: http://code.google.com/p/netmap/
          destination: netmap
          branch: master
    steps:
        - echo 'RUNNING depmod'
        - depmod
        - ifconfig -a
        - lshw -class network
        - echo 'BUILDING netmap'
        - cd netmap/LINUX
        - ./configure --kernel-dir=/lib/modules/`uname -r`/build --kernel-sources=$LINUX_SRC
        - make
        - echo 'BUILDING pkt-gen'
        - make -C ../examples pkt-gen
        - echo 'INSERTING modules'
        - rmmod ixgbe || true
        - insmod netmap.ko
        - modprobe mdio
        - lsmod | grep ixgbe && rmmod ixgbe || true
        - insmod ixgbe/ixgbe.ko
        - cd ../../
        - echo 'BRINGING UP interfaces'
        - common/scripts/netmap-pkt-gen/find_nics.sh $NIC_PATTERN
        - export IF_0=$(cat ifs | sed -n 1p)
        - export IF_1=$(cat ifs | sed -n 2p)
        - echo "IF_0=$IF_0 IF_1=$IF_1"
        - ifconfig $IF_0 up promisc
        - ifconfig $IF_1 up promisc
        - ifconfig -a
        - lshw -class network

run:
    steps:
        - set -x
        - lava-sync ready
        - export IF_0=$(cat ifs | sed -n 1p)
        - export IF_1=$(cat ifs | sed -n 2p)
        - echo 'RUNNING netmap for 360 seconds'
        - lava-test-case start-pkt-gen --shell common/scripts/netmap-pkt-gen/start-pkt-gen.sh "$IF_0" pkt-gen-tx "$IF_1" pkt-gen-rx
        - pgrep pkt-gen
        - sleep $TEST_TIME
        - echo 'KILLING pkt-gen'
        - kill -9 $(ps -ef | grep pkt-gen | grep rx | awk '{print $2}')
        - kill -9 $(ps -ef | grep pkt-gen | grep tx | awk '{print $2}')
        - cat pkt-gen-tx
        - cat pkt-gen-rx
        - lava-sync l2fwd-done
        - echo 'PARSING results'
        - lava-test-case parse-tx-rx --shell common/scripts/netmap-pkt-gen/parse-tx-rx.sh pkt-gen-tx tx_thr pkt-gen-rx rx_thr
        - ./common/scripts/min_max_avg_parse.py tx_thr "tx_throughput:" "pps"
        - ./common/scripts/min_max_avg_parse.py rx_thr "rx_throughput:" "pps"

parse:
    pattern: '^(?P<test_case_id>(rx|tx)_thr.*):\s*(?P<measurement>[0-9.]+)\s+(?P<units>\w+)\s+(?P<result>\w+)'