* rte_eal_init only init once
*/
static int
-test_eal_init_once(__attribute__((unused)) void *arg)
+test_eal_init_once(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
}
static int
-ring_create_lookup(__attribute__((unused)) void *arg)
+ring_create_lookup(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
struct rte_ring * rp;
}
static void
-my_obj_init(struct rte_mempool *mp, __attribute__((unused)) void *arg,
+my_obj_init(struct rte_mempool *mp, __rte_unused void *arg,
void *obj, unsigned i)
{
uint32_t *objnum = obj;
}
static int
-mempool_create_lookup(__attribute__((unused)) void *arg)
+mempool_create_lookup(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
struct rte_mempool * mp;
}
static int
-hash_create_free(__attribute__((unused)) void *arg)
+hash_create_free(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
struct rte_hash *handle;
}
static int
-fbk_create_free(__attribute__((unused)) void *arg)
+fbk_create_free(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
struct rte_fbk_hash_table *handle;
}
static int
-lpm_create_free(__attribute__((unused)) void *arg)
+lpm_create_free(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
struct rte_lpm *lpm;
uint32_t case_id;
struct test_case *pt_case = NULL;
- if (rte_lcore_count() <= 1) {
- printf("Not enough lcore for testing\n");
- return -1;
+ if (rte_lcore_count() < 2) {
+ printf("Not enough cores for func_reentrancy_autotest, expecting at least 2\n");
+ return TEST_SKIPPED;
}
else if (rte_lcore_count() > MAX_LCORES)
printf("Too many lcores, some cores will be disabled\n");
- for (case_id = 0; case_id < sizeof(test_cases)/sizeof(struct test_case); case_id ++) {
+ for (case_id = 0; case_id < RTE_DIM(test_cases); case_id++) {
pt_case = &test_cases[case_id];
if (pt_case->func == NULL)
continue;