Message ID | 1472608455-31488-2-git-send-email-forrest.shi@linaro.org |
---|---|
State | Accepted |
Commit | ba2298af4f3912598043938c19bfedc5a8c89567 |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp107671qga; Tue, 30 Aug 2016 20:01:26 -0700 (PDT) X-Received: by 10.55.17.157 with SMTP id 29mr7872061qkr.259.1472612486859; Tue, 30 Aug 2016 20:01:26 -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 129si5111173qki.135.2016.08.30.20.01.23; Tue, 30 Aug 2016 20:01:26 -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 4ADCD6069A; Wed, 31 Aug 2016 03:01:23 +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_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS 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 2D08C607D8; Wed, 31 Aug 2016 03:01:06 +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 977E4607D8; Wed, 31 Aug 2016 03:01:01 +0000 (UTC) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0118.outbound.protection.outlook.com [104.47.33.118]) by lists.linaro.org (Postfix) with ESMTPS id 49D3C607D8 for <lng-odp@lists.linaro.org>; Wed, 31 Aug 2016 02:57:11 +0000 (UTC) Received: from BY2PR03CA064.namprd03.prod.outlook.com (10.141.249.37) by BY1PR0301MB1207.namprd03.prod.outlook.com (10.161.203.156) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.21; Wed, 31 Aug 2016 02:57:09 +0000 Received: from BY2FFO11FD035.protection.gbl (2a01:111:f400:7c0c::156) by BY2PR03CA064.outlook.office365.com (2a01:111:e400:2c5d::37) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9 via Frontend Transport; Wed, 31 Aug 2016 02:57:09 +0000 Received-SPF: Neutral (protection.outlook.com: 192.88.168.50 is neither permitted nor denied by domain of freescale.com) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD035.mail.protection.outlook.com (10.1.14.220) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Wed, 31 Aug 2016 02:57:09 +0000 Received: from localhost (rock.ap.freescale.net [10.193.20.106]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u7V2v75q027233; Tue, 30 Aug 2016 19:57:08 -0700 From: <forrest.shi@linaro.org> To: <maxim.uvarov@linaro.org>, <lng-odp@lists.linaro.org> Date: Wed, 31 Aug 2016 09:54:14 +0800 Message-ID: <1472608455-31488-2-git-send-email-forrest.shi@linaro.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1472608455-31488-1-git-send-email-forrest.shi@linaro.org> References: <1472608455-31488-1-git-send-email-forrest.shi@linaro.org> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(2980300002)(199003)(189002)(57986006)(189998001)(5003940100001)(76506005)(50986999)(105606002)(33646002)(2876002)(229853001)(626004)(19580405001)(97736004)(586003)(76176999)(87936001)(19580395003)(5001770100001)(68736007)(104016004)(5660300001)(7846002)(8676002)(356003)(86152002)(81166006)(81156014)(50226002)(50466002)(36756003)(8936002)(47776003)(575784001)(48376002)(106466001)(11100500001)(77096005)(4326007)(2950100001)(305945005)(92566002)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB1207; H:tx30smr01.am.freescale.net; FPR:; SPF:Neutral; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD035; 1:fQr2TQmExxzNra5D/afEjLSzD+RXZDn3d3pBFvDueBnPNbTA5zQP2bkLEJf+qRwH6yjv69dZmK2bGOuNHvKZvWRL61ONNe5SDy45LDebUguxqHr5F/hKTg9wqiYcd9YNIRVxIruibKp6dCyKb8XsxGtg0DmoC2VSK+NEYJ7qs/M9ljP58mKDv/4yXjKlT7cqUOAMDNo0vWSLTpDnGj+B47Qyuh41dNkut7K0Mx0cZp0wWghjS9nuCzIBBjE5wWeFqkJlmFRuJM5R3o8eOfF/M9FmhF8yYy0yjbwWK/1cw1brXiGBP++iXODztlKZBUCNNUblLafRlyTmI/65RuZWgyMmZiOiUrYOHawz/qw797OputI3KXcd1zPp35xDMKjIzSXwFcb1aRhWhYLKo81WdlCH0qMxd28A2F+gIqzBfiRF6YY4EJNch5b/0Qrx+bghiDhfLTBtXyM1Y403I01TC6MRXQwmKrXBWoPtinNENmdx4Fm+LGa0OHCDX7v1kyk1rj/8NcXOsh5cb9ms9E74KXDzlT5APcA5i6f7ZYfzEkDAsa4IvUmH6auB1OXTaB5fPh+RQyNXcXYg5+4cfH3jhw== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: d82b3068-4bc9-426f-930f-08d3d14a803e X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1207; 2:qKPYYVL1UvnSPc0NIJpaQHFN6+m4bqUMHDSm8MTvGWo6UztuARDnahcPflNHmrCp7HQzr90uAL3Zg2J5NTPm/G6E+812dHA3nBWvRWHk3RdvlCsWsCfUQgPmWYb6E8bqbhMQFD8Cghczjz4w8kzlQmvLauPio6d0J1jtO0ooB49p0yp2cxl3pdDAMEM6UILa; 3:MEn27AUBBQFCwHAoeZ6EdmvGI+5MV4DnSOPT36HeWsnb55NOVc1g/o5eAhkgiNFvrKVkRGMCDFhnM7OBVpsqo1wFzZyop754PdKrKfPFXhoobhe8KgfL2TxFZHmNdCMcUFUy4lI/Vk/iLRykuCnsCAhNl3h7TPEqSYTLJ0hX3awHYTJsFzTbG7ENIeVoRNa1DvYyfoY5X1M3fweSPbFdfoRLrO7SLJea3O46ClCf8JU= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1207; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1207; 25:XAmEbMMXL1A5HKmd4HOarU8UE199tqk6EtlCl1klatJUrU6onlZC2EgFF47aVb73tLE2VauZEQUDpipkioQ1A1qBq9C9i1ZQNGenHx8rSMMP321A4U8L1y/+nHNkMqgJRSZ+Xb1FZ6lyLZK5cD2WKNCh4C+EE8+JUE/mse7B8eWoN7UY45eeCZEtjm2jM1GL/hdRvYmVP0JzgoZmOhWKnL3gSrhXzYiLCHfCrz2HZstxxwlWTU3qf/Y+9qSjFlS3JM7a65c8FJptOFxVHcR/m1NP0cu27rhN+tJbKGJO50pd/bwWbPaplt+/ZcoHWLBGt3NKGneIKUKZjbHgpm7eQntjQLIUBW/hLZRaKMlBdXL71I7afJp78BHr23ak2Sq5PEmG5Jqxs5qj0nFbSlKbPlExOlLQvptXOVurMOdnZxMutpEKEJVG9RsWV6YgRuZ5DCLpXoZ2BHkacV/cOTOCqxS3OMKArVcD+LumchHOEh8xOXvF+igLD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gms3PXljSmlnn9qdE9Z+doOfdkPrEqw1P4eqALbnF12Zp8rnz60pKm3tyl/SpsXQzeDqpWKG7k88fmpCH6GjdFTvgOLrM= X-Microsoft-Antispam-PRVS: <BY1PR0301MB1207FE99BEEA9CCCD9AF47108CE30@BY1PR0301MB1207.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(36556875275162); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(13017025)(13024025)(13018025)(13015025)(13023025)(10201501046)(3002001)(6055026); SRVR:BY1PR0301MB1207; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB1207; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1207; 4:y/ERGDVUPTvJR+hjpJHRmD1qHF/6bdbx4L8Jqj1y1Qsn1YhZkn0ktHLQ34C8QlJ/8MSjlWkO+QU1IJW5k9yhiNpgMXjjih3ntofdYnPlQivsV0XNdHsf6ZhuAms6l2jHgupir6hZi8/mKjPq88gxVfC7qYUAFBrovlw5Gv6y/ReTdBHp9XgwT3tULeQ/KWUTlrgPPJa9ML69tqrimTj3eBrz1Xk0Iqj1de9O/EBHWg4U7AIGwnN6hRNam+ru8IXadlMXjcSfsYNhtzpo4W2sZBSjrICZb7ZMqdm8HXeckZcM5y+rCq0QbXMTYoAFP+pphVzobtg5VGDv0iYybYiTl4DJ/u5wqEd+oQDWdK+F5GJyvM2p4c3gsbAI20l3cxfsShxqdXUUR5m6wHDbyHm+jjDTKd8AdsjQo3ztfHM4uK5o83OiUGvkx+2Y1NLp+ZD5u9QMpnmeKR/0AZltNICmIN5gpgrLcR0XmwVUmXaJzk/W6L/C/J56aVBG7chp1UOhNLPo6g+GOSHvPNR7GiMHhBy/Qb8b81mUBeG8BlWpm/o= X-Forefront-PRVS: 00514A2FE6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0301MB1207; 23:wQUCPXnCWPWVS8HMLgfGawu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eD419/IDP2GUxGnU9X7wlVB1lwO+LriyAHqeHpyQRujt+30+0WRZ6yij5rKvuvHIOt3Kz6X7DDkFOlAfR3mVk7uYFwomVYwgPp885kx6+OgTftX62vt6OUPlbZRWic8SYQ7H7SKjqgpEQOrC0Z6mCl SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2016 02:57:09.6869 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1207 X-Topics: patch Subject: [lng-odp] [PATCH 2/3] 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..6f0b11a --- /dev/null +++ b/example/l3fwd/odp_l3fwd_run.sh @@ -0,0 +1,28 @@ +#!/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