From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A6C13A034F; Fri, 12 Nov 2021 15:01:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95B50410EA; Fri, 12 Nov 2021 15:01:38 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 3D03740692 for ; Fri, 12 Nov 2021 15:01:37 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10165"; a="319339528" X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="319339528" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2021 06:01:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="493013357" Received: from silpixa00401160.ir.intel.com ([10.55.129.96]) by orsmga007.jf.intel.com with ESMTP; 12 Nov 2021 06:01:26 -0800 From: Conor Walsh To: ferruh.yigit@intel.com, david.marchand@redhat.com, longfengx.liang@intel.com, dev@dpdk.org Cc: david.hunt@intel.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, vladimir.medvedkin@intel.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com, fiona.trahe@intel.com, john.griffin@intel.com, deepak.k.jain@intel.com, harry.van.haaren@intel.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com, sthotton@marvell.com, srinivasan@marvell.com, heinrich.kuhn@corigine.com, hkalra@marvell.com, rmody@marvell.com, dsinghrawat@marvell.com, jiawenwu@trustnetic.com, yongwang@vmware.com, john.mcnamara@intel.com, shreyansh.jain@nxp.com, santosh.shukla@caviumnetworks.com, gakhil@marvell.com, roy.fan.zhang@intel.com, arkadiuszx.kusztal@intel.com, michael.baucom@broadcom.com, venkatkumar.duvvuru@broadcom.com, lance.richardson@broadcom.com, kishore.padmanabha@broadcom.com, jerin.jacob@caviumnetworks.com, derek.chickles@caviumnetworks.com, ssrinivasan@caviumnetworks.com, mjatharakonda@oneconvergence.com, simon.horman@corigine.com, david.george@sophos.com, sony.chacko@qlogic.com, harish.patil@qlogic.com, stephen@networkplumber.org, tomaszx.kulasek@intel.com, ian.betts@intel.com, liang.j.ma@intel.com, lei.a.yao@intel.com, Conor Walsh Subject: [PATCH 1/7] app/test: fix unused but set variables Date: Fri, 12 Nov 2021 14:01:05 +0000 Message-Id: <20211112140111.922171-2-conor.walsh@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211112140111.922171-1-conor.walsh@intel.com> References: <20211112140111.922171-1-conor.walsh@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch fixes unused but set variables within the following test apps: - test distributor perf - test thash perf Bugzilla ID: 881 Fixes: c0de0eb82e40 ("distributor: switch over to new API") Fixes: 239fffe0402e ("test/thash: add performance tests for Toeplitz hash") Signed-off-by: Conor Walsh Reported-by: Liang Longfeng --- app/test/test_distributor_perf.c | 3 --- app/test/test_thash_perf.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c index fdbeae6d2f..92e330f194 100644 --- a/app/test/test_distributor_perf.c +++ b/app/test/test_distributor_perf.c @@ -108,7 +108,6 @@ static int handle_work(void *arg) { struct rte_distributor *d = arg; - unsigned int count = 0; unsigned int num = 0; int i; unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED); @@ -120,11 +119,9 @@ handle_work(void *arg) num = rte_distributor_get_pkt(d, id, buf, buf, num); while (!quit) { worker_stats[id].handled_packets += num; - count += num; num = rte_distributor_get_pkt(d, id, buf, buf, num); } worker_stats[id].handled_packets += num; - count += num; rte_distributor_return_pkt(d, id, buf, num); return 0; } diff --git a/app/test/test_thash_perf.c b/app/test/test_thash_perf.c index 7aa9360120..c95785d8bb 100644 --- a/app/test/test_thash_perf.c +++ b/app/test/test_thash_perf.c @@ -61,6 +61,8 @@ run_rss_calc(uint32_t *tuples[BATCH_SZ], enum test_rss_type type, int len, } end_tsc = rte_rdtsc_precise(); + RTE_SET_USED(hash); + return end_tsc - start_tsc; } -- 2.25.1