#include <rte_common.h>
#include <rte_memory.h>
-#include <rte_eal_memconfig.h>
#include <rte_per_lcore.h>
#include <rte_launch.h>
#include <rte_eal.h>
}
static int
-test_align_overlap_per_lcore(__attribute__((unused)) void *arg)
+test_align_overlap_per_lcore(__rte_unused void *arg)
{
const unsigned align1 = 8,
align2 = 64,
}
static int
-test_reordered_free_per_lcore(__attribute__((unused)) void *arg)
+test_reordered_free_per_lcore(__rte_unused void *arg)
{
const unsigned align1 = 8,
align2 = 64,
{"18446744073709551616", 0} /* ULLONG_MAX + 1 == out of range*/
};
unsigned i;
- for (i = 0; i < sizeof(test_values)/sizeof(test_values[0]); i++)
+ for (i = 0; i < RTE_DIM(test_values); i++)
if (rte_str_to_size(test_values[i].str) != test_values[i].value)
return -1;
return 0;
return 0;
}
-static int
-test_rte_malloc_type_limits(void)
-{
- /* The type-limits functionality is not yet implemented,
- * so always return 0 no matter what the retval.
- */
- const char *typename = "limit_test";
- rte_malloc_set_limit(typename, 64 * 1024);
- rte_malloc_dump_stats(stdout, typename);
- return 0;
-}
-
static int
test_realloc(void)
{
}
static int
-test_random_alloc_free(void *_ __attribute__((unused)))
+test_random_alloc_free(void *_ __rte_unused)
{
struct mem_list {
struct mem_list *next;
}
else printf("test_random_alloc_free() passed\n");
- /*----------------------------*/
- ret = test_rte_malloc_type_limits();
- if (ret < 0){
- printf("test_rte_malloc_type_limits() failed\n");
- return ret;
- }
- /* TODO: uncomment following line once type limits are valid */
- /*else printf("test_rte_malloc_type_limits() passed\n");*/
-
/*----------------------------*/
ret = test_rte_malloc_validate();
if (ret < 0){