On Thu, Dec 4, 2014 at 3:02 PM, Mike Holmes <[email protected]
<mailto:[email protected]>> wrote:
Signed-off-by: Mike Holmes <[email protected]
<mailto:[email protected]>>
Reviewed-by: Bill Fischofer <[email protected]
<mailto:[email protected]>>
---
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");
--
2.1.0
_______________________________________________
lng-odp mailing list
[email protected] <mailto:[email protected]>
http://lists.linaro.org/mailman/listinfo/lng-odp
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp