/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <rte_random.h>
#include <rte_common.h>
#include <rte_errno.h>
+#include <rte_hexdump.h>
#include <cmdline_parse.h>
static int
check_live_watermark_change(__attribute__((unused)) void *dummy)
{
- uint64_t hz = rte_get_hpet_hz();
+ uint64_t hz = rte_get_timer_hz();
void *obj_table[MAX_BULK];
unsigned watermark, watermark_old = 16;
uint64_t cur_time, end_time;
/* init the object table */
memset(obj_table, 0, sizeof(obj_table));
- end_time = rte_get_hpet_cycles() + (hz * 2);
+ end_time = rte_get_timer_cycles() + (hz * 2);
/* check that bulk and watermark are 4 and 32 (respectively) */
while (diff >= 0) {
}
}
- cur_time = rte_get_hpet_cycles();
+ cur_time = rte_get_timer_cycles();
diff = end_time - cur_time;
}
}
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;
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
}
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);
- cur_dst += 1;
if (ret != 0)
goto fail;
- cur_src = src;
- cur_dst = dst;
-
if (src)
free(src);
if (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;
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
}