From patchwork Mon Apr 13 08:52:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 47100 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A97A020553 for ; Mon, 13 Apr 2015 08:54:33 +0000 (UTC) Received: by wgiv13 with SMTP id v13sf15957221wgi.3 for ; Mon, 13 Apr 2015 01:54:33 -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: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=gP9vdQghcmByhbXrmox3VI+MU4HPzA1mCH784kg+6kI=; b=m4L6tPMrwd6NfeWmvPzU+5eOhNrJeGm7f8dkM1dE/ga/ZsLE5DwJKzBEmdMjNChdQH kr6ex4wSnVxj2usdeAAK0kpPnN54rMhlJMjTxOrwjWzRaKrRPFPicHECmHIaL0ll6YOw wMVCqsoFgXYIeqe0UDPLPJnLvTquSmbpZ8S31Ik5HOO+69VPm6mUSzcLRrhQAzEkQ//a K8Xp59/8e3dp8EQ1yVN4YgdRDhVvKrAKGf/z3ksffgFQ35mpWeRdetKZY5zBi0dXYYvv m0uwcOvIDOf+87rmp7WNmX4iur7eOid8nrT8X0UR6IWRuOzWuRd8UxaTPHOITUAe8DfL M+dg== X-Gm-Message-State: ALoCoQkpnaNVM89Hcws3HPzootWKwCT5CaSvljyFeVlcZmYa6iVm9iHvGKTNRvHIQcJpNsXGHwms X-Received: by 10.112.122.39 with SMTP id lp7mr1954982lbb.5.1428915273002; Mon, 13 Apr 2015 01:54:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.66 with SMTP id i2ls697493lah.19.gmail; Mon, 13 Apr 2015 01:54:32 -0700 (PDT) X-Received: by 10.152.1.70 with SMTP id 6mr12293643lak.83.1428915272730; Mon, 13 Apr 2015 01:54:32 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id ao1si7865023lbd.172.2015.04.13.01.54.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Apr 2015 01:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbbqq2 with SMTP id qq2so53326801lbb.3 for ; Mon, 13 Apr 2015 01:54:32 -0700 (PDT) X-Received: by 10.112.16.196 with SMTP id i4mr12177126lbd.72.1428915272249; Mon, 13 Apr 2015 01:54:32 -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 l1csp1077547lbt; Mon, 13 Apr 2015 01:54:31 -0700 (PDT) X-Received: by 10.55.52.129 with SMTP id b123mr19096142qka.34.1428915270719; Mon, 13 Apr 2015 01:54:30 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 22si9261081qhr.81.2015.04.13.01.54.30; Mon, 13 Apr 2015 01:54:30 -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 0E83761CDF; Mon, 13 Apr 2015 08:54:30 +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=ham 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 CBC5D61B1E; Mon, 13 Apr 2015 08:53:18 +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 DFA1761CDD; Mon, 13 Apr 2015 08:53:11 +0000 (UTC) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) by lists.linaro.org (Postfix) with ESMTPS id 2197661CBF for ; Mon, 13 Apr 2015 08:52:44 +0000 (UTC) Received: by layy10 with SMTP id y10so52018887lay.0 for ; Mon, 13 Apr 2015 01:52:42 -0700 (PDT) X-Received: by 10.152.23.70 with SMTP id k6mr12069934laf.76.1428915162698; Mon, 13 Apr 2015 01:52:42 -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 lf12sm1495061lac.38.2015.04.13.01.52.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Apr 2015 01:52:41 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Mon, 13 Apr 2015 11:52:25 +0300 Message-Id: <1428915147-14871-4-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1428915147-14871-1-git-send-email-maxim.uvarov@linaro.org> References: <1428915147-14871-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv14 3/5] validation: move l2fwd from example to performance tests 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.181 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 Signed-off-by: Ciprian Barbu Reviewed-by: Anders Roxell Reviewed-by: Mike Holmes --- configure.ac | 1 - example/Makefile.am | 2 +- example/l2fwd/.gitignore | 1 - example/l2fwd/Makefile.am | 10 ---------- test/performance/.gitignore | 3 ++- test/performance/Makefile.am | 4 ++-- {example/l2fwd => test/performance}/odp_l2fwd.c | 26 ++++++++++++------------- 7 files changed, 18 insertions(+), 29 deletions(-) delete mode 100644 example/l2fwd/.gitignore delete mode 100644 example/l2fwd/Makefile.am rename {example/l2fwd => test/performance}/odp_l2fwd.c (96%) diff --git a/configure.ac b/configure.ac index 3eab18e..6f39a68 100644 --- a/configure.ac +++ b/configure.ac @@ -264,7 +264,6 @@ AC_CONFIG_FILES([Makefile example/Makefile example/generator/Makefile example/ipsec/Makefile - example/l2fwd/Makefile example/packet/Makefile example/timer/Makefile pkgconfig/libodp.pc diff --git a/example/Makefile.am b/example/Makefile.am index 3021571..6bb4f5c 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -1 +1 @@ -SUBDIRS = generator ipsec l2fwd packet timer +SUBDIRS = generator ipsec packet timer diff --git a/example/l2fwd/.gitignore b/example/l2fwd/.gitignore deleted file mode 100644 index 8563319..0000000 --- a/example/l2fwd/.gitignore +++ /dev/null @@ -1 +0,0 @@ -odp_l2fwd diff --git a/example/l2fwd/Makefile.am b/example/l2fwd/Makefile.am deleted file mode 100644 index feced2a..0000000 --- a/example/l2fwd/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -include $(top_srcdir)/example/Makefile.inc - -bin_PROGRAMS = odp_l2fwd -odp_l2fwd_LDFLAGS = $(AM_LDFLAGS) -static -odp_l2fwd_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example - -noinst_HEADERS = \ - $(top_srcdir)/example/example_debug.h - -dist_odp_l2fwd_SOURCES = odp_l2fwd.c diff --git a/test/performance/.gitignore b/test/performance/.gitignore index 1bdb90d..d41d1e1 100644 --- a/test/performance/.gitignore +++ b/test/performance/.gitignore @@ -1,4 +1,5 @@ *.log *.trs -odp_scheduling odp_atomic +odp_l2fwd +odp_scheduling diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am index b0f7457..b501584 100644 --- a/test/performance/Makefile.am +++ b/test/performance/Makefile.am @@ -1,10 +1,10 @@ include $(top_srcdir)/test/Makefile.inc -TESTS_ENVIRONMENT = TEST_DIR=${builddir} +TESTS_ENVIRONMENT = TEST_DIR=${builddir} ODP_PLATFORM=${with_platform} EXECUTABLES = odp_atomic -COMPILE_ONLY = odp_scheduling +COMPILE_ONLY = odp_scheduling odp_l2fwd TESTSCRIPTS = odp_scheduling_run diff --git a/example/l2fwd/odp_l2fwd.c b/test/performance/odp_l2fwd.c similarity index 96% rename from example/l2fwd/odp_l2fwd.c rename to test/performance/odp_l2fwd.c index 4a49008..5d4b833 100644 --- a/example/l2fwd/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include @@ -176,7 +176,7 @@ static inline odp_queue_t lookup_dest_q(odp_packet_t pkt) src_idx = i; if (src_idx == -1) - EXAMPLE_ABORT("Failed to determine pktio input\n"); + LOG_ABORT("Failed to determine pktio input\n"); dst_idx = (src_idx % 2 == 0) ? src_idx+1 : src_idx-1; pktio_dst = gbl_args->pktios[dst_idx]; @@ -261,7 +261,7 @@ static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool, pktio = odp_pktio_open(dev, pool); if (pktio == ODP_PKTIO_INVALID) { - EXAMPLE_ERR("Error: failed to open %s\n", dev); + LOG_ERR("Error: failed to open %s\n", dev); return ODP_PKTIO_INVALID; } @@ -281,13 +281,13 @@ static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool, inq_def = odp_queue_create(inq_name, ODP_QUEUE_TYPE_PKTIN, &qparam); if (inq_def == ODP_QUEUE_INVALID) { - EXAMPLE_ERR("Error: pktio queue creation failed\n"); + LOG_ERR("Error: pktio queue creation failed\n"); return ODP_PKTIO_INVALID; } ret = odp_pktio_inq_setdef(pktio, inq_def); if (ret != 0) { - EXAMPLE_ERR("Error: default input-Q setup\n"); + LOG_ERR("Error: default input-Q setup\n"); return ODP_PKTIO_INVALID; } @@ -354,13 +354,13 @@ int main(int argc, char *argv[]) /* Init ODP before calling anything else */ if (odp_init_global(NULL, NULL)) { - EXAMPLE_ERR("Error: ODP global init failed.\n"); + LOG_ERR("Error: ODP global init failed.\n"); exit(EXIT_FAILURE); } /* Init this thread */ if (odp_init_local()) { - EXAMPLE_ERR("Error: ODP local init failed.\n"); + LOG_ERR("Error: ODP local init failed.\n"); exit(EXIT_FAILURE); } @@ -370,7 +370,7 @@ int main(int argc, char *argv[]) gbl_args = odp_shm_addr(shm); if (gbl_args == NULL) { - EXAMPLE_ERR("Error: shared mem alloc failed.\n"); + LOG_ERR("Error: shared mem alloc failed.\n"); exit(EXIT_FAILURE); } memset(gbl_args, 0, sizeof(*gbl_args)); @@ -398,13 +398,13 @@ int main(int argc, char *argv[]) printf("cpu mask: %s\n", cpumaskstr); if (num_workers < gbl_args->appl.if_count) { - EXAMPLE_ERR("Error: CPU count %d less than interface count\n", - num_workers); + LOG_ERR("Error: CPU count %d less than interface count\n", + num_workers); exit(EXIT_FAILURE); } if (gbl_args->appl.if_count % 2 != 0) { - EXAMPLE_ERR("Error: interface count %d is odd in fwd appl.\n", - gbl_args->appl.if_count); + LOG_ERR("Error: interface count %d is odd in fwd appl.\n", + gbl_args->appl.if_count); exit(EXIT_FAILURE); } @@ -418,7 +418,7 @@ int main(int argc, char *argv[]) pool = odp_pool_create("packet pool", ODP_SHM_NULL, ¶ms); if (pool == ODP_POOL_INVALID) { - EXAMPLE_ERR("Error: packet pool create failed.\n"); + LOG_ERR("Error: packet pool create failed.\n"); exit(EXIT_FAILURE); } odp_pool_print(pool);