git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
power: initial import
[dpdk.git]
/
app
/
test
/
test_ring.c
diff --git
a/app/test/test_ring.c
b/app/test/test_ring.c
index
9a07479
..
2699e1e
100644
(file)
--- a/
app/test/test_ring.c
+++ b/
app/test/test_ring.c
@@
-1,7
+1,7
@@
/*-
* BSD LICENSE
*
/*-
* BSD LICENSE
*
- * Copyright(c) 2010-201
2
Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-201
3
Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@
-58,6
+58,7
@@
#include <rte_random.h>
#include <rte_common.h>
#include <rte_errno.h>
#include <rte_random.h>
#include <rte_common.h>
#include <rte_errno.h>
+#include <rte_hexdump.h>
#include <cmdline_parse.h>
#include <cmdline_parse.h>
@@
-579,7
+580,7
@@
test_set_watermark( void ){
}
count = 0;
}
count = 0;
-
setwm =
rte_ring_set_water_mark(r, count);
+ rte_ring_set_water_mark(r, count);
if (r->prod.watermark != r->prod.size) {
printf("Test failed to detect invalid watermark count value\n");
goto error;
if (r->prod.watermark != r->prod.size) {
printf("Test failed to detect invalid watermark count value\n");
goto error;
@@
-696,8
+697,8
@@
test_ring_basic(void)
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
-
test
_hexdump("src", src, cur_src - src);
-
test
_hexdump("dst", dst, cur_dst - dst);
+
rte
_hexdump("src", src, cur_src - src);
+
rte
_hexdump("dst", dst, cur_dst - dst);
printf("data after dequeue is not the same\n");
goto fail;
}
printf("data after dequeue is not the same\n");
goto fail;
}
@@
-742,8
+743,8
@@
test_ring_basic(void)
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
-
test
_hexdump("src", src, cur_src - src);
-
test
_hexdump("dst", dst, cur_dst - dst);
+
rte
_hexdump("src", src, cur_src - src);
+
rte
_hexdump("dst", dst, cur_dst - dst);
printf("data after dequeue is not the same\n");
goto fail;
}
printf("data after dequeue is not the same\n");
goto fail;
}
@@
-764,8
+765,8
@@
test_ring_basic(void)
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
-
test
_hexdump("src", src, cur_src - src);
-
test
_hexdump("dst", dst, cur_dst - dst);
+
rte
_hexdump("src", src, cur_src - src);
+
rte
_hexdump("dst", dst, cur_dst - dst);
printf("data after dequeue is not the same\n");
goto fail;
}
printf("data after dequeue is not the same\n");
goto fail;
}
@@
-810,8
+811,8
@@
test_ring_basic(void)
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
-
test
_hexdump("src", src, cur_src - src);
-
test
_hexdump("dst", dst, cur_dst - dst);
+
rte
_hexdump("src", src, cur_src - src);
+
rte
_hexdump("dst", dst, cur_dst - dst);
printf("data after dequeue is not the same\n");
goto fail;
}
printf("data after dequeue is not the same\n");
goto fail;
}
@@
-820,18
+821,13
@@
test_ring_basic(void)
cur_dst = dst;
ret = rte_ring_mp_enqueue(r, cur_src);
cur_dst = dst;
ret = rte_ring_mp_enqueue(r, cur_src);
- cur_src += 1;
if (ret != 0)
goto fail;
ret = rte_ring_mc_dequeue(r, cur_dst);
if (ret != 0)
goto fail;
ret = rte_ring_mc_dequeue(r, cur_dst);
- cur_dst += 1;
if (ret != 0)
goto fail;
if (ret != 0)
goto fail;
- cur_src = src;
- cur_dst = dst;
-
if (src)
free(src);
if (dst)
if (src)
free(src);
if (dst)
@@
-910,8
+906,8
@@
test_ring_burst_basic(void)
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
-
test
_hexdump("src", src, cur_src - src);
-
test
_hexdump("dst", dst, cur_dst - dst);
+
rte
_hexdump("src", src, cur_src - src);
+
rte
_hexdump("dst", dst, cur_dst - dst);
printf("data after dequeue is not the same\n");
goto fail;
}
printf("data after dequeue is not the same\n");
goto fail;
}
@@
-976,8
+972,8
@@
test_ring_burst_basic(void)
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
-
test
_hexdump("src", src, cur_src - src);
-
test
_hexdump("dst", dst, cur_dst - dst);
+
rte
_hexdump("src", src, cur_src - src);
+
rte
_hexdump("dst", dst, cur_dst - dst);
printf("data after dequeue is not the same\n");
goto fail;
}
printf("data after dequeue is not the same\n");
goto fail;
}
@@
-1025,8
+1021,8
@@
test_ring_burst_basic(void)
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
-
test
_hexdump("src", src, cur_src - src);
-
test
_hexdump("dst", dst, cur_dst - dst);
+
rte
_hexdump("src", src, cur_src - src);
+
rte
_hexdump("dst", dst, cur_dst - dst);
printf("data after dequeue is not the same\n");
goto fail;
}
printf("data after dequeue is not the same\n");
goto fail;
}
@@
-1048,8
+1044,8
@@
test_ring_burst_basic(void)
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
-
test
_hexdump("src", src, cur_src - src);
-
test
_hexdump("dst", dst, cur_dst - dst);
+
rte
_hexdump("src", src, cur_src - src);
+
rte
_hexdump("dst", dst, cur_dst - dst);
printf("data after dequeue is not the same\n");
goto fail;
}
printf("data after dequeue is not the same\n");
goto fail;
}
@@
-1098,8
+1094,8
@@
test_ring_burst_basic(void)
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
/* check data */
if (memcmp(src, dst, cur_dst - dst)) {
-
test
_hexdump("src", src, cur_src - src);
-
test
_hexdump("dst", dst, cur_dst - dst);
+
rte
_hexdump("src", src, cur_src - src);
+
rte
_hexdump("dst", dst, cur_dst - dst);
printf("data after dequeue is not the same\n");
goto fail;
}
printf("data after dequeue is not the same\n");
goto fail;
}