From patchwork Thu Dec 4 21:02:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 41951 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 B8E062486D for ; Thu, 4 Dec 2014 21:03:24 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id l18sf11421501wgh.6 for ; Thu, 04 Dec 2014 13:03:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id: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=htc49fnItU3PD5E1yYWekrLnxMTWQiYrUE4HCiO1p9c=; b=U6RXinnYg4QzG8lCOpEyfAUF/vg3o3zgOngtok0V9TU7qGgE/V7Y6DuzP62pqKyjDX mn1VmHgOCvr1wpnqFpFgMk2y156LZXSeB77poSZIPZxG73U/EoLwdzeBur0JEow2y7/x 7vdlMXcrAwNkI9pi/yPpFB9ScxKpA8GmjnulcM6qOAUH+iGAFi7BJirIzQkkEINF5hKM XdT9GcV8RDYxFMXjz26b8DX9hg1ufazjB08PgOclh56fGeC5uZLcuBu5GwJPjT/vvzoH s0xKz2DfmO0DpYRdy4ihmniUXLgLQJzHWJ1sONnOIk+RRNaMia3BBXjoH+tiNUs1mSxG 1Iaw== X-Gm-Message-State: ALoCoQlMmOJJ+hDMTZeAZr8zDOuT7Jrh81Hqc+shHzww6i42l4YsvLxNd+iKW29fHczaAHUUMUwh X-Received: by 10.112.142.36 with SMTP id rt4mr2653593lbb.3.1417727004004; Thu, 04 Dec 2014 13:03:24 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.106 with SMTP id x10ls256586laj.58.gmail; Thu, 04 Dec 2014 13:03:23 -0800 (PST) X-Received: by 10.152.25.168 with SMTP id d8mr11531669lag.41.1417727003770; Thu, 04 Dec 2014 13:03:23 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id be17si27052705lab.86.2014.12.04.13.03.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Dec 2014 13:03:23 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gm9so14959285lab.26 for ; Thu, 04 Dec 2014 13:03:23 -0800 (PST) X-Received: by 10.112.38.4 with SMTP id c4mr11564060lbk.46.1417727003685; Thu, 04 Dec 2014 13:03:23 -0800 (PST) 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.184.201 with SMTP id ew9csp110759lbc; Thu, 4 Dec 2014 13:03:22 -0800 (PST) X-Received: by 10.140.104.12 with SMTP id z12mr19552648qge.75.1417727001464; Thu, 04 Dec 2014 13:03:21 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id g5si32617500qab.87.2014.12.04.13.03.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Dec 2014 13:03:21 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XwdYU-0005Oa-GH; Thu, 04 Dec 2014 21:03:18 +0000 Received: from mail-qa0-f51.google.com ([209.85.216.51]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XwdYO-0005Lu-LW for lng-odp@lists.linaro.org; Thu, 04 Dec 2014 21:03:12 +0000 Received: by mail-qa0-f51.google.com with SMTP id k15so12647043qaq.10 for ; Thu, 04 Dec 2014 13:03:07 -0800 (PST) X-Received: by 10.229.50.135 with SMTP id z7mr19513430qcf.21.1417726984978; Thu, 04 Dec 2014 13:03:04 -0800 (PST) Received: from fedora1.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id k6sm27739932qaz.41.2014.12.04.13.03.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Dec 2014 13:03:04 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org, petri.savolainen@nsn.com Date: Thu, 4 Dec 2014 16:02:55 -0500 Message-Id: <1417726975-33909-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH] example: test: remove use of internal ODP macros X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@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.53 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: Mike Holmes Reviewed-by: Bill Fischofer --- example/packet/odp_pktio.c | 12 ++++++------ test/api_test/odp_atomic_test.c | 2 +- test/api_test/odp_ring_test.c | 2 +- test/api_test/odp_timer_ping.c | 19 +++++++++++-------- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c index 260a76d..7d51682 100644 --- a/example/packet/odp_pktio.c +++ b/example/packet/odp_pktio.c @@ -150,8 +150,8 @@ static void *pktio_queue_thread(void *arg) if (thr_args->mtu) { ret = odp_pktio_set_mtu(pktio, thr_args->mtu); if (ret != 0) - ODP_ERR("setting MTU to %d failed\n", - thr_args->mtu); + EXAMPLE_ERR("setting MTU to %d failed\n", + thr_args->mtu); } mtu = odp_pktio_mtu(pktio); @@ -159,7 +159,7 @@ static void *pktio_queue_thread(void *arg) printf("PKTIO: %d, dev %s, MTU: %d\n", pktio, thr_args->pktio_dev, mtu); else - ODP_ERR("odp_pktio_mtu: unable to get MTU\n"); + EXAMPLE_ERR("odp_pktio_mtu: unable to get MTU\n"); /* * Create and set the default INPUT queue associated with the 'pktio' @@ -278,8 +278,8 @@ static void *pktio_ifburst_thread(void *arg) if (thr_args->mtu) { ret = odp_pktio_set_mtu(pktio, thr_args->mtu); if (ret != 0) - ODP_ERR("setting MTU to %d failed\n", - thr_args->mtu); + EXAMPLE_ERR("setting MTU to %d failed\n", + thr_args->mtu); } mtu = odp_pktio_mtu(pktio); @@ -287,7 +287,7 @@ static void *pktio_ifburst_thread(void *arg) printf("PKTIO: %d, dev %s, MTU: %d\n", pktio, thr_args->pktio_dev, mtu); else - ODP_ERR("odp_pktio_mtu: unable to get mtu\n"); + EXAMPLE_ERR("odp_pktio_mtu: unable to get mtu\n"); printf(" [%02i] created pktio:%02i, burst mode\n", thr, pktio); diff --git a/test/api_test/odp_atomic_test.c b/test/api_test/odp_atomic_test.c index dcf2c59..5563606 100644 --- a/test/api_test/odp_atomic_test.c +++ b/test/api_test/odp_atomic_test.c @@ -184,7 +184,7 @@ static void *run_thread(void *arg) thr = odp_thread_id(); - ODP_DBG("Thread %i starts\n", thr); + LOG_DBG("Thread %i starts\n", thr); /* Wait here until all threads have arrived */ /* Use multiple barriers to verify that it handles wrap around and diff --git a/test/api_test/odp_ring_test.c b/test/api_test/odp_ring_test.c index a55a0cd..15a9a7d 100644 --- a/test/api_test/odp_ring_test.c +++ b/test/api_test/odp_ring_test.c @@ -406,7 +406,7 @@ static void *test_ring(void *arg) break; } - ODP_DBG("result = %d\n", result); + LOG_DBG("result = %d\n", result); if (result == 0) printf("test_ring Result:pass\n"); else diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c index 7704181..48f1885 100644 --- a/test/api_test/odp_timer_ping.c +++ b/test/api_test/odp_timer_ping.c @@ -76,17 +76,18 @@ static void dump_icmp_pkt(void *buf, int bytes, int pkt_cnt) struct iphdr *ip = buf; #ifdef PKT_SEQ_DUMP /* int i; */ - ODP_DBG("---dump icmp pkt_cnt %d------\n", pkt_cnt); + LOG_DBG("---dump icmp pkt_cnt %d------\n", pkt_cnt); for (i = 0; i < bytes; i++) { if (!(i & 15)) ODP_DBG("\n %x: ", i); ODP_DBG("%d ", ((unsigned char *)buf)[i]); } - ODP_DBG("\n"); + LOG_DBG("\n"); #endif char addrstr[INET6_ADDRSTRLEN]; inet_ntop(AF_INET, &ip->daddr, addrstr, sizeof(addrstr)); - ODP_DBG("byte %d, Ack rxvd for msg_cnt [%d] from %s\n", bytes, pkt_cnt, addrstr); + LOG_DBG("byte %d, Ack rxvd for msg_cnt [%d] from %s\n", bytes, pkt_cnt, + addrstr); } static int listen_to_pingack(void) @@ -114,7 +115,7 @@ static int listen_to_pingack(void) res = poll(&fd, 1, 1000); /* 1000 ms timeout */ if (res == 0) { - ODP_DBG(" Rx timeout msg cnt [%d]\n", i); + LOG_DBG(" Rx timeout msg cnt [%d]\n", i); err = -1; } else if (res == -1) { LOG_ERR("recvfrom error"); @@ -202,7 +203,8 @@ static int send_ping_request(struct sockaddr_in *addr) /* txmit the pkt */ if (sendto(sd, &pckt, sizeof(pckt), 0, (struct sockaddr *)addr, sizeof(*addr)) <= 0) { - LOG_ERR("sendto operation failed msg_cnt [%d]..exiting sender thread\n", i); + LOG_ERR("sendto operation failed msg_cnt [%d]..exiting" + "sender thread\n", i); err = -1; goto err; } @@ -224,7 +226,7 @@ static int send_ping_request(struct sockaddr_in *addr) */ if (ping_sync_flag) { ping_sync_flag = false; - ODP_DBG(" icmp_ack msg_cnt [%d] \n", i); + LOG_DBG(" icmp_ack msg_cnt [%d]\n", i); buf = ODP_BUFFER_INVALID; break; } @@ -232,7 +234,7 @@ static int send_ping_request(struct sockaddr_in *addr) /* free tmo_buf for timeout case */ if (buf != ODP_BUFFER_INVALID) { - ODP_DBG(" timeout msg_cnt [%i] \n", i); + LOG_DBG(" timeout msg_cnt [%i]\n", i); /* so to avoid seg fault commented */ odp_buffer_free(buf); err = -1; @@ -394,7 +396,8 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) /* Wait for worker threads to exit */ odph_linux_pthread_join(thread_tbl, PING_THRD); - ODP_DBG("ping timer test %s\n", (pingarg.result == 0) ? "passed" : "failed"); + LOG_DBG("ping timer test %s\n", (pingarg.result == 0) ? "passed" : + "failed"); printf("ODP ping timer test complete\n\n");