X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=blobdiff_plain;f=app%2Ftest%2Ftest_mbuf.c;h=2a97afe2044a3e0ff490c3e6540593d7fb234e37;hp=030385ec59644c7eb41b709316d48b020bca1cb7;hb=e0f4a0ed4237e273b78728b7c7a3bf71d2d5218f;hpb=ce33e2eaff61ca89c64d04e1775cc8b29f11c2e6 diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 030385ec59..2a97afe204 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -753,18 +753,17 @@ static int test_refcnt_mbuf(void) { #ifdef RTE_MBUF_REFCNT_ATOMIC - unsigned lnum, master, slave, tref; + unsigned int master, slave, tref; int ret = -1; struct rte_mempool *refcnt_pool = NULL; struct rte_ring *refcnt_mbuf_ring = NULL; - if ((lnum = rte_lcore_count()) == 1) { - printf("skipping %s, number of lcores: %u is not enough\n", - __func__, lnum); - return 0; + if (rte_lcore_count() < 2) { + printf("Not enough cores for test_refcnt_mbuf, expecting at least 2\n"); + return TEST_SKIPPED; } - printf("starting %s, at %u lcores\n", __func__, lnum); + printf("starting %s, at %u lcores\n", __func__, rte_lcore_count()); /* create refcnt pool & ring if they don't exist */ @@ -1206,7 +1205,7 @@ test_mbuf(void) goto err; } - if (test_refcnt_mbuf()<0){ + if (test_refcnt_mbuf() < 0) { printf("test_refcnt_mbuf() failed \n"); goto err; }