Message ID | 1469695909-24615-2-git-send-email-forrest.shi@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp738486qga; Thu, 28 Jul 2016 02:03:11 -0700 (PDT) X-Received: by 10.55.148.67 with SMTP id w64mr40736462qkd.137.1469696591232; Thu, 28 Jul 2016 02:03:11 -0700 (PDT) Return-Path: <lng-odp-bounces@lists.linaro.org> Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o10si7323043qtb.120.2016.07.28.02.03.10; Thu, 28 Jul 2016 02:03:11 -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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A737168436; Thu, 28 Jul 2016 09:03:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 55A6161601; Thu, 28 Jul 2016 09:03:05 +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 C1A6A61689; Thu, 28 Jul 2016 09:03:02 +0000 (UTC) Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0052.outbound.protection.outlook.com [104.47.41.52]) by lists.linaro.org (Postfix) with ESMTPS id 28A77615B0 for <lng-odp@lists.linaro.org>; Thu, 28 Jul 2016 09:03:01 +0000 (UTC) Received: from BLUPR0301CA0020.namprd03.prod.outlook.com (10.162.113.158) by SN2PR03MB2301.namprd03.prod.outlook.com (10.166.210.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15; Thu, 28 Jul 2016 09:02:59 +0000 Received: from BN1BFFO11FD041.protection.gbl (2a01:111:f400:7c10::1:192) by BLUPR0301CA0020.outlook.office365.com (2a01:111:e400:5259::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15 via Frontend Transport; Thu, 28 Jul 2016 09:02:58 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 192.88.168.50 as permitted sender) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD041.mail.protection.outlook.com (10.58.144.104) with Microsoft SMTP Server (TLS) id 15.1.539.16 via Frontend Transport; Thu, 28 Jul 2016 09:02:59 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u6S92sjr002412; Thu, 28 Jul 2016 02:02:57 -0700 From: <forrest.shi@linaro.org> To: <lng-odp@lists.linaro.org> Date: Thu, 28 Jul 2016 16:51:49 +0800 Message-ID: <1469695909-24615-2-git-send-email-forrest.shi@linaro.org> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1469695909-24615-1-git-send-email-forrest.shi@linaro.org> References: <1469695909-24615-1-git-send-email-forrest.shi@linaro.org> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131141701796032059; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(199003)(189002)(4326007)(106466001)(76176999)(92566002)(110136002)(105596002)(33646002)(19580405001)(7846002)(87936001)(77096005)(36756003)(97736004)(2351001)(2906002)(189998001)(8936002)(68736007)(356003)(229853001)(50986999)(5003940100001)(305945005)(104016004)(86362001)(47776003)(2876002)(48376002)(50466002)(86152002)(2950100001)(81166006)(8676002)(81156014)(19580395003)(586003)(6806005)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2301; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD041; 1:0UPbsEFmhmpcr6sB0cksGu/1i8dIBn78fF1uGwbzfSjTRf34YFRCeCX5pDqRn3SGQYIaRhtilf9QxMIRTQy+JQnJrgq78gKRo3tGEea3vy3IdOsik5b1/xVBUeypM3vBWARfS56GTu8C0TbMn8SgCTY5ofsZoRtyoTFd5JZGS4wxWxGnTbwfVdWIblHa2ScSkBzE1IkCiFqa0fV7JhZmscfX9C1DI4J90vt55Y26v27W1ecFFyufBmfMa/qbsvFTg+YVRBHweDVF2rEgpJBcmygAK8yBYkdPp2q2St0znmlEsXhQ5nWOxvMyDNahyLFXXKzyK2Xrs+6nfR/tyqh3RpfXEOBD1EMzj/2gxQatFWmyJHs7sldBXvaioVryxMmF0Ml6518ZYM/g0GeftThb39GqUgXHfow05r7bmnnd6xcU9ga8yArrJF8I7MWTitQB81GFSNoPrEaOzdKU22Mr1Ln/sXiJjJ6fzyxtV1WNPDQn8DkQfCrpjd7jeF4zCfFFa5i2fEpB2x4T0OHJ3NKU6nIXtoJpx/3wFuTltZHBc7Bg5G2VBDHmdW9oJsKRgqhdpKePb7a6EFmCRO3fgg8oAROKUYtsHhhjG83H/luTj2z4FgcxmOvBa5jC4V5a+vmT1CjFfweIAxFT6Pj6WEmadQ== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: c235ee4f-0fcb-4b93-ee3b-08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29FpuX98Vm3wAvTcWXWCEicWt6+TYJ/kR6goYcqS0m0tyiWCt6Hw9vem7fJ0yYDng7NMywUsSl+gZKrDWh6XgyxnndTWnc0rG7IfE1friGziy5ixhI6NDbfzVnllh3oN57zsMRxcqQg8M3UO5JBaQalbn+w==; 4:+FtyDZlKgTbBEtaNalXeYqttX3Lfjohcj5oSwYBBtW1hlkvuIfvUZwZnuK6XGZbHhbXa2MTdStC6uqjRE/jztHzXViEIqUDEB1OM4gD5MhTIPiaLQLZDQClwlxqMJiVI9f5G01Ha/XDIBhTuZMSR2kO5XbzV7nwV1ojOQe7oDSXxvQaD8AOWRQw7P6lNUQtcTtTGaPnNKN8vmChAwV1FHYH4gG+06LGIhyzY1WlDEA9MwwlIDqhtCAVaj185pPQmnJoc9ut+/9L3faEau3j9U7AAwbX/hkfb6UjTKFT2sHNCRz59d+PngT0OD+Y2hqALGPtB+3hb+5vjZ+80wpoKtTPo0YpXj0wSV8kOtf1Uf4+m4MpZXamwtirb+ym152n00wg0tctgAhjkiGVK0+sNrPF5NLmUI2ULfZ9TSu3RUaq6FszO2y47UVsmCPZr12N77K+wrcG/PyPJVg7+9PZrc0O71pmXHgB/LB9LHwmb3py44u9Lmen1BiV2ZMobOmPkP6tQ4I3pEVHwkiePnnaQoA== X-Microsoft-Antispam-PRVS: <SN2PR03MB23019F9F2DD0B3B935BD0B8B8E000@SN2PR03MB2301.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(36556875275162); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13024025)(13023025)(13017025)(13015025)(13018025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:SN2PR03MB2301; BCL:0; PCL:0; RULEID:(400006); SRVR:SN2PR03MB2301; X-Forefront-PRVS: 00179089FD X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2301; 23:hLTGY2/QikNiqSj9GY7AnuowQCvt3renjKKbOStu8?= =?us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utput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2016 09:02:59.4160 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB2301 X-Topics: patch Subject: [lng-odp] [PATCH 2/2] example/l3fwd: add test script X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" <lng-odp.lists.linaro.org> List-Unsubscribe: <https://lists.linaro.org/mailman/options/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=unsubscribe> List-Archive: <http://lists.linaro.org/pipermail/lng-odp/> List-Post: <mailto:lng-odp@lists.linaro.org> List-Help: <mailto:lng-odp-request@lists.linaro.org?subject=help> List-Subscribe: <https://lists.linaro.org/mailman/listinfo/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=subscribe> Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" <lng-odp-bounces@lists.linaro.org> |
diff --git a/example/l3fwd/Makefile.am b/example/l3fwd/Makefile.am index f926717..422a3bf 100644 --- a/example/l3fwd/Makefile.am +++ b/example/l3fwd/Makefile.am @@ -10,3 +10,11 @@ noinst_HEADERS = \ $(top_srcdir)/example/example_debug.h dist_odp_l3fwd_SOURCES = odp_l3fwd.c odp_l3fwd_db.c odp_l3fwd_lpm.c + +if test_example +if HAVE_PCAP +TESTS = odp_l3fwd_run.sh +endif +endif + +EXTRA_DIST = odp_l3fwd_run.sh udp64.pcap diff --git a/example/l3fwd/odp_l3fwd_run.sh b/example/l3fwd/odp_l3fwd_run.sh new file mode 100755 index 0000000..f5f371c --- /dev/null +++ b/example/l3fwd/odp_l3fwd_run.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright (c) 2016, Linaro Limited +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +PCAP_IN=`find . ${TEST_DIR} $(dirname $0) -name udp64.pcap -print -quit` +PCAP_OUT="pcapout.pcap" +PCAP_IN_SIZE=`stat -c %s ${PCAP_IN}` +echo "using PCAP_IN = ${PCAP_IN}, PCAP_OUT = ${PCAP_OUT}" + +./odp_l3fwd -i pcap:in=${PCAP_IN},pcap:out=${PCAP_OUT} -r "10.0.0.0/24,pcap:out=${PCAP_OUT}" -d 30 + +STATUS=$? +PCAP_OUT_SIZE=`stat -c %s ${PCAP_OUT}` +rm -f ${PCAP_OUT} + +if [ ${STATUS} -ne 0 ] || [ ${PCAP_IN_SIZE} -ne ${PCAP_OUT_SIZE} ]; then + echo "Error: status ${STATUS}, in:${PCAP_IN_SIZE} out:${PCAP_OUT_SIZE}" + exit 1 +fi + +echo "Pass: status ${STATUS}, in:${PCAP_IN_SIZE} out:${PCAP_OUT_SIZE}" + +exit 0