From patchwork Fri Sep 6 09:45:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruifeng Wang X-Patchwork-Id: 173205 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp478698ilq; Fri, 6 Sep 2019 02:46:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+43o3o3qwOR75YP+FihNsA20r/bSbNxdXv9KqEtn/ckGkFLGA2rcpuaCusYZeNpIU/oY0 X-Received: by 2002:a50:9e65:: with SMTP id z92mr8427128ede.49.1567763209051; Fri, 06 Sep 2019 02:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567763209; cv=none; d=google.com; s=arc-20160816; b=hsd0cWHOxF8PeUzAa7eP5+U9KFdNXQo0NL6BAZfpJvqnlSYi3VtmkLYtjTYSxPZgbg r0Pg6BPyJoLe1d/gBThL5fIDEY8kyQ62t5QKjwKe4X1Gth6olSAmLvHP3tv7liK6cDHs 8fgA5sQWZnMORlNSfYVTlhl30/8P8g9wXqay02m9wuufuzs9Qyqm9kEtCo0bes0oS+08 cmpdk6/dgC5YoHB9ckUBpJu2SuUdpVa6EKqxxwyTQuj2Ka8YZCSb/uKE+7FDHxBYFSJm JwN4uc+tUq/4QUgsKfebyunrKxaGyL5Co5rum+Oxl9I9Tbz7aPq2UV8xq7/gi6B0HQ4Y EOHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=tVHIb8puiB3ZH3YA6i45Io3huayXwIlb3ZA8LpmLSko=; b=p4d8F3bGe8vdTggZZmt3P85llEmAUqPX/FDJMG57jqkVVFizMvOrLKI3Apr8LkNAHu tfDxQ6jiDq0iOdI1gWdamVVq3u2v5w/QNZit86f6Rv4ptyHCmmI56m0L9nBEUDC8aK0G 5wBVdJSCUNlBW75E7cnh8TDJUZu8mcZJn5zqXSyHHzmVq2WA/Rdj3YcURXhYrJ7GnnoT erE5n27OGenwniusl9nJtKq7STAidL88Yok2KRiClRdbdkaWJWKv25+6SIEoYl9EE514 En/9sBGXgGLBW9+x3mdJAoCcXhd8rIvOGskHEd6fqWrJijcBgCQjkN9A/4d0asd7+h5C cMqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id y22si2500255ejp.52.2019.09.06.02.46.48; Fri, 06 Sep 2019 02:46:49 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D2F251F2BC; Fri, 6 Sep 2019 11:46:26 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 8F9BF1F13E; Fri, 6 Sep 2019 11:46:24 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1DC8A1570; Fri, 6 Sep 2019 02:46:24 -0700 (PDT) Received: from net-arm-c2400-02.shanghai.arm.com (net-arm-c2400-02.shanghai.arm.com [10.169.40.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9A48D3F59C; Fri, 6 Sep 2019 02:46:21 -0700 (PDT) From: Ruifeng Wang To: bruce.richardson@intel.com, vladimir.medvedkin@intel.com, olivier.matz@6wind.com Cc: dev@dpdk.org, stephen@networkplumber.org, konstantin.ananyev@intel.com, gavin.hu@arm.com, honnappa.nagarahalli@arm.com, dharmik.thakkar@arm.com, nd@arm.com, stable@dpdk.org Date: Fri, 6 Sep 2019 17:45:33 +0800 Message-Id: <20190906094534.36060-6-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190906094534.36060-1-ruifeng.wang@arm.com> References: <20190822063457.41596-1-ruifeng.wang@arm.com> <20190906094534.36060-1-ruifeng.wang@arm.com> Subject: [dpdk-dev] [PATCH v2 5/6] test/lpm: reset total time X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Honnappa Nagarahalli total_time needs to be reset to measure the cycles for delete API. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli Reviewed-by: Gavin Hu Reviewed-by: Ruifeng Wang --- app/test/test_lpm_perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c index 77eea66ad..a2578fe90 100644 --- a/app/test/test_lpm_perf.c +++ b/app/test/test_lpm_perf.c @@ -460,7 +460,7 @@ test_lpm_perf(void) (double)total_time / ((double)ITERATIONS * BATCH_SIZE), (count * 100.0) / (double)(ITERATIONS * BATCH_SIZE)); - /* Delete */ + /* Measure Delete */ status = 0; begin = rte_rdtsc(); @@ -470,7 +470,7 @@ test_lpm_perf(void) large_route_table[i].depth); } - total_time += rte_rdtsc() - begin; + total_time = rte_rdtsc() - begin; printf("Average LPM Delete: %g cycles\n", (double)total_time / NUM_ROUTE_ENTRIES);