diff options
-rw-r--r-- | automated/linux/nginx-server/nginx-odp-dpdk.yaml | 15 | ||||
-rwxr-xr-x | automated/linux/nginx-server/nginx-server.sh | 32 |
2 files changed, 10 insertions, 37 deletions
diff --git a/automated/linux/nginx-server/nginx-odp-dpdk.yaml b/automated/linux/nginx-server/nginx-odp-dpdk.yaml index 35d1e3d..9f65e0b 100644 --- a/automated/linux/nginx-server/nginx-odp-dpdk.yaml +++ b/automated/linux/nginx-server/nginx-odp-dpdk.yaml @@ -1,3 +1,4 @@ +# NOTE: when calling this test, kernel-headers must have been installed metadata: name: httperf-nginx-ofp-odp-dpdk format: Lava-Test-Shell Test Definition 1.0 @@ -21,6 +22,10 @@ install: - sysstat - wget +params: + MAX_CORES: 0 + VLAND_NAME: vlan_one + run: steps: - wget -O - http://deb.opendataplane.org/odp.key|sudo apt-key add - @@ -28,15 +33,9 @@ run: - echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list - apt-get update - apt-get -t jessie-backports install -y libssl1.0.0 libssl-dev - - wget http://people.linaro.org/~anders.roxell/ubuntu-v4.4/linux-headers-4.4.0-31_4.4.0-31.50_all.deb - - dpkg -i linux-headers-4.4.0-31_4.4.0-31.50_all.deb - - wget http://people.linaro.org/~anders.roxell/x86_64-ofp-2/overlay.tar.gz - - tar xzf overlay.tar.gz -C / - - depmod -a - sysctl -w vm.nr_hugepages=1024 - modprobe uio - apt-get install -y dpdk-igb-uio-dkms dpdk pciutils - - export CONFIG_TYPE=${CONFIG_TYPE:-odp-dpdk} - - export MAX_CORES=${MAX_CORES:-0} - - export VLAND_NAME=${VLAND_NAME:-vlan_one} + - export CONFIG_TYPE=odp-dpdk + - export MAX_CORES VLAND_NAME - lava-test-case httperf-nginx-server --shell ./automated/linux/nginx-server/nginx-server.sh diff --git a/automated/linux/nginx-server/nginx-server.sh b/automated/linux/nginx-server/nginx-server.sh index 2002357..d4e39a9 100755 --- a/automated/linux/nginx-server/nginx-server.sh +++ b/automated/linux/nginx-server/nginx-server.sh @@ -23,9 +23,6 @@ SERVER_IP=${SERVER_IP:-192.168.1.4} # odp-dpdk: NGiNX with OFP+ODP+DPDK CONFIG_TYPE=${CONFIG_TYPE:-linux-ip} -# DEB_URL -DEB_URL=${DEB_URL:-http://people.linaro.org/~josep.puigdemont/debs} - function exit_error { echo "-- SERVER ERROR" journalctl -u nginx @@ -43,10 +40,8 @@ function config_linux_ip { } # Use this function to configure a device for DPDK usage -# FIXME: this should use a repository function config_dpdk_dev { local driver=${1:-igb_uio} - local DEBS="libofp-odp-dpdk0_1.1+git3+4ec95a1-0linaro1linarojessie1_amd64.deb" if ! which dpdk-devbind &>/dev/null; then echo "ERROR: dpdk not installed" @@ -62,37 +57,16 @@ function config_dpdk_dev { apt-get install -y nginx systemctl stop nginx - # we want our version of libofp, with CONFIG_WEBSERVER set - apt-get remove -y libofp-odp-dpdk0 nginx-common - mkdir ofp - cd ofp - for deb in $DEBS; do - wget -q "$DEB_URL/ofp-config-webserver/$deb" - dpkg -i "$deb" - done - cd .. + # FIXME: for now NGiNX for OFP only supports one core worker + echo "-- NOTICE: setting MAX_CORES to 1" + MAX_CORES=1 } # Callback to call before starting nginx when using OFP-DPDK # First parameter of callback is the number of cores function odp_dpdk_pre_cb { - local cores=$1 - local DEBS="nginx-common_1.9.10-1~linaro1linarojessie1_all.deb \ - nginx-full_1.9.10-1~linaro1linarojessie1_amd64.deb \ - nginx_1.9.10-1~linaro1linarojessie1_all.deb" - - apt-get remove -y nginx-common - # clean hugepages rm -rf /dev/hugepages/* - - mkdir -p "iter_${cores}" - cd "iter_${cores}" - for deb in $DEBS; do - wget -q "$DEB_URL/nginx-ofp-odp-dpdk/${cores}_queue/$deb" - dpkg --force-confold -i "$deb" - done - cd .. } function odp_dpdk_post_cb { |