From patchwork Thu Apr 2 19:03:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 46736 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 4E3B7215A9 for ; Thu, 2 Apr 2015 19:05:22 +0000 (UTC) Received: by wixm2 with SMTP id m2sf20846492wix.0 for ; Thu, 02 Apr 2015 12:05:21 -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=7roj7jb2PHIPOo6XoBILuL3wfriqQH9UsSbaDasph5g=; b=WPHFJ9Q3BTEwNpx0LcJndG69JYLlQfE+GYU033ccc3/rvPbv+SZUuaWGHXBBEdlGFo ZdVCAtV2PjLod9+auepZzxi+PwQZ5Xo4ie+sfKarfXJWiupZgRncuoj5czxaP+DTsVqF R/MzTh+S+ADtoRz7OiI3YmPSeBfW4ft+GeXfxGk33LZMQxFlkhRb0GmRR10phq6Izh2U bKSqUn68gyj1u0Od6OskzG6VUDcmCR3ksBdOcVZfrf2+IPluGrpbzx4xdfGMrEnJTmUx eTYu2KgDXKG1pXkVjRGUvv7puqSE4UF/tDVar8QD7elYejiUhmyb72Gx72sQ0sTrp0hv eLig== X-Gm-Message-State: ALoCoQmtuj2MGl3JniKE58jwzJqjL8d8kK6hvXrs3Fg94MfgDipxn5QQz9QvJE0Qrs2jY9ip9XyU X-Received: by 10.180.80.132 with SMTP id r4mr673385wix.4.1428001521613; Thu, 02 Apr 2015 12:05:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.66 with SMTP id i2ls252825lah.21.gmail; Thu, 02 Apr 2015 12:05:21 -0700 (PDT) X-Received: by 10.152.37.202 with SMTP id a10mr43101829lak.0.1428001521444; Thu, 02 Apr 2015 12:05:21 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id r2si2258346lbf.41.2015.04.02.12.05.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2015 12:05:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lahf3 with SMTP id f3so66211597lah.2 for ; Thu, 02 Apr 2015 12:05:21 -0700 (PDT) X-Received: by 10.152.234.169 with SMTP id uf9mr3792907lac.88.1428001521337; Thu, 02 Apr 2015 12:05:21 -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.57.201 with SMTP id k9csp1532545lbq; Thu, 2 Apr 2015 12:05:20 -0700 (PDT) X-Received: by 10.140.233.3 with SMTP id e3mr66390579qhc.94.1428001519937; Thu, 02 Apr 2015 12:05:19 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k35si5915173qkh.63.2015.04.02.12.05.19; Thu, 02 Apr 2015 12:05:19 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 203E6650D4; Thu, 2 Apr 2015 19:05:19 +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 D9820650CF; Thu, 2 Apr 2015 19:04: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 9B438650CF; Thu, 2 Apr 2015 19:04:01 +0000 (UTC) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by lists.linaro.org (Postfix) with ESMTPS id F39A7650CF for ; Thu, 2 Apr 2015 19:03:44 +0000 (UTC) Received: by labe2 with SMTP id e2so66824039lab.3 for ; Thu, 02 Apr 2015 12:03:43 -0700 (PDT) X-Received: by 10.112.17.68 with SMTP id m4mr41844569lbd.50.1428001423752; Thu, 02 Apr 2015 12:03:43 -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 jp18sm1084259lab.34.2015.04.02.12.03.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Apr 2015 12:03:42 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 2 Apr 2015 22:03:32 +0300 Message-Id: <1428001414-7018-3-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1428001414-7018-1-git-send-email-maxim.uvarov@linaro.org> References: <1428001414-7018-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv9 2/4] 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.215.47 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 --- 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 57054c5..0ec83f2 100644 --- a/configure.ac +++ b/configure.ac @@ -252,7 +252,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);