From patchwork Wed Apr 1 13:40:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 47082 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0191321416 for ; Sat, 11 Apr 2015 09:55:21 +0000 (UTC) Received: by wizk4 with SMTP id k4sf3948280wiz.2 for ; Sat, 11 Apr 2015 02:55:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=HyNDSMQhE1j21/jGRqb/cqxJYjGzZpykeUGAMXqAwRA=; b=d/9aWCUFjADYcL5HlHOX2G4jXy/jtiM1lmhO9QpZedy4KC/HVNfojMao3qZB00Kpz2 WXZeumBQkGvbatKz+UvJPsuDKAekKIuxs7GL4vvMDihSwUTSSd2uB7bZCcdZZE83X56+ XRl1AAIZevJM6gpgtCl2PskHsQyuGtnZSc+z5KYoAunUvJSxAbZZ1zqApEV4T+Ka5Bys e45MWri8Muf0UgKmSzvPB9cph7kwN+fD/fpTfmME3sC4tQv6SSoE7phC63Fy7puOvJkN 4jCf5tRGFSx+Wt+fKw+yeLSOz6YZEaDekG70SAA/jseyxKSx9nqtStS9MbzJ3BfVH2CE sgkw== X-Gm-Message-State: ALoCoQmvRTDiugC7iwpkI99vOqe+R4O0pBp1GRZnzQkYw1HbQkwVlV7NC6QTvTNdUnfN9S/YhVD3 X-Received: by 10.194.95.67 with SMTP id di3mr939170wjb.0.1428746120336; Sat, 11 Apr 2015 02:55:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.18.225 with SMTP id z1ls547435lad.109.gmail; Sat, 11 Apr 2015 02:55:20 -0700 (PDT) X-Received: by 10.113.11.12 with SMTP id ee12mr4959253lbd.5.1428746120025; Sat, 11 Apr 2015 02:55:20 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id rs2si3484461lbb.106.2015.04.11.02.55.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Apr 2015 02:55:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by lbbuc2 with SMTP id uc2so29127676lbb.2 for ; Sat, 11 Apr 2015 02:55:19 -0700 (PDT) X-Received: by 10.152.4.72 with SMTP id i8mr4935090lai.29.1428746119741; Sat, 11 Apr 2015 02:55:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp231232lbt; Sat, 11 Apr 2015 02:55:19 -0700 (PDT) X-Received: by 10.55.53.143 with SMTP id c137mr10878857qka.15.1428746118363; Sat, 11 Apr 2015 02:55:18 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 141si604059qhq.93.2015.04.11.02.55.17; Sat, 11 Apr 2015 02:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id A038965134; Sat, 11 Apr 2015 09:55:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 5001B6513D; Sat, 11 Apr 2015 09:52:20 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D05D564FA6; Wed, 1 Apr 2015 13:40:20 +0000 (UTC) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) by lists.linaro.org (Postfix) with ESMTPS id 327DC64FA2 for ; Wed, 1 Apr 2015 13:40:19 +0000 (UTC) Received: by lahf3 with SMTP id f3so36315413lah.2 for ; Wed, 01 Apr 2015 06:40:18 -0700 (PDT) X-Received: by 10.112.13.7 with SMTP id d7mr35956770lbc.79.1427895618162; Wed, 01 Apr 2015 06:40:18 -0700 (PDT) Received: from localhost.localdomain (ppp91-76-169-66.pppoe.mtu-net.ru. [91.76.169.66]) by mx.google.com with ESMTPSA id d10sm428461lag.29.2015.04.01.06.40.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Apr 2015 06:40:16 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Wed, 1 Apr 2015 16:40:04 +0300 Message-Id: <1427895604-15031-5-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427895604-15031-1-git-send-email-maxim.uvarov@linaro.org> References: <1427895604-15031-1-git-send-email-maxim.uvarov@linaro.org> X-Mailman-Approved-At: Wed, 01 Apr 2015 13:41:43 +0000 X-Topics: patch Cc: petri.savolainen@nokia.com Subject: [lng-odp] [PATCHv7 4/4] validation: add new test l2fwd_run X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Maxim Uvarov --- test/performance/Makefile.am | 2 +- test/performance/odp_l2fwd_run | 57 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100755 test/performance/odp_l2fwd_run diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am index b501584..63f73e0 100644 --- a/test/performance/Makefile.am +++ b/test/performance/Makefile.am @@ -6,7 +6,7 @@ EXECUTABLES = odp_atomic COMPILE_ONLY = odp_scheduling odp_l2fwd -TESTSCRIPTS = odp_scheduling_run +TESTSCRIPTS = odp_scheduling_run odp_l2fwd_run if test_perf TESTS = $(EXECUTABLES) $(TESTSCRIPTS) diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run new file mode 100755 index 0000000..72e508c --- /dev/null +++ b/test/performance/odp_l2fwd_run @@ -0,0 +1,57 @@ +#!/bin/sh +# +# Copyright (c) 2015, Linaro Limited +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +TEST_DIR=$(dirname $0) + +# exit codes expected by automake for skipped tests +TEST_SKIPPED=77 + +# Use installed pktio env or for make check take it from platform directory +if [ -f "./pktio_env" ]; then + . ./pktio_env +else if [ -f ${TEST_DIR}/../../platform/$ODP_PLATFORM/test/pktio_env ]; then + . ${TEST_DIR}/../../platform/$ODP_PLATFORM/test/pktio_env +else + echo "BUG: unable to find platform specific set up script pktio_env!" + echo "pktio_env has to be in current directory or in platform/X/test." + exit 1 + fi +fi + +run_l2fwd_example() +{ + setup_pktio_env + if [ $? -ne 0 ]; then + echo "setup_pktio_env error $?" + exit $TEST_SKIPPED + fi + + #@todo: limit odp_generator to cores + #https://bugs.linaro.org/show_bug.cgi?id=1398 + ($TEST_DIR/../../example/generator/odp_generator -I $IF0 \ + --srcmac fe:0f:97:c9:e0:44 --dstmac 32:cb:9b:27:2f:1a \ + --srcip 192.168.0.1 --dstip 192.168.0.2 -m u 2>&1 > /dev/null) \ + 2>&1 > /dev/null & + + echo "Run $TEST_DIR/../../example/l2fwd/odp_l2fwd -i $IF1,$IF2 -m 0 -t 30 -c 2" + $TEST_DIR/../../example/l2fwd/odp_l2fwd -i $IF1,$IF2 -m 0 -t 30 -c 2 + + cleanup_pktio_env + if [ $? -ne 0 ]; then + echo "cleanup_pktio_env error $?" + exit $TEST_SKIPPED + fi + + exit 0 +} + +case "$1" in + setup) setup_pktio_env ;; + cleanup) cleanup_pktio_env ;; + *) run_l2fwd_example ;; +esac