From: Bing Zhao Subject: [PATCH] [pktgen] [PATCH v2] Fix the compiling warnings Date: Tue, 3 Apr 2018 19:43:33 +0800 Message-ID: <20180403114333.24172-1-ilovethull@163.com> Cc: Bing Zhao To: keith.wiles@intel.com, dev@dpdk.org Return-path: Received: from m50-138.163.com (m50-138.163.com [123.125.50.138]) by dpdk.org (Postfix) with ESMTP id 38E2A1B701 for ; Tue, 3 Apr 2018 13:43:38 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" AT, fix the compiling the warnings/errors in the first patch. Signed-off-by: Bing Zhao --- app/cli-functions.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/cli-functions.c b/app/cli-functions.c index 1bddbbe..486c78a 100644 --- a/app/cli-functions.c +++ b/app/cli-functions.c @@ -901,7 +901,7 @@ rte_memcpy_perf(unsigned int cnt, unsigned int kb, int flag) uint64_t start_time, total_time; uint64_t total_bits, bits_per_tick; unsigned int i; - void *(*cpy)(void *, const void *, size_t); + /* void *(*cpy)(void *, const void *, size_t); */ kb *= 1024; @@ -911,11 +911,16 @@ rte_memcpy_perf(unsigned int cnt, unsigned int kb, int flag) src = RTE_PTR_ALIGN(buf[0], RTE_CACHE_LINE_SIZE); dst = RTE_PTR_ALIGN(buf[1], RTE_CACHE_LINE_SIZE); - cpy = (flag)? rte_memcpy : memcpy; + /* cpy = (flag)? rte_memcpy : memcpy; */ start_time = rte_get_tsc_cycles(); - for(i = 0; i < cnt; i++) - cpy(dst, src, kb); + if (flag) { + for (i=0; i