app/test: use accessor to set refcnt field
authorDavid Marchand <david.marchand@6wind.com>
Mon, 18 Aug 2014 11:29:20 +0000 (13:29 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 26 Aug 2014 15:52:33 +0000 (17:52 +0200)
refcnt field can not be accessed directly as it depends on the RTE_MBUF_REFCNT
build option.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
app/test/test_distributor.c

index e7dc1fb..7648ed1 100644 (file)
@@ -282,7 +282,7 @@ sanity_test_with_mbuf_alloc(struct rte_distributor *d, struct rte_mempool *p)
                        rte_distributor_process(d, NULL, 0);
                for (j = 0; j < BURST; j++) {
                        bufs[j]->pkt.hash.rss = (i+j) << 1;
-                       bufs[j]->refcnt = 1;
+                       rte_mbuf_refcnt_set(bufs[j], 1);
                }
 
                rte_distributor_process(d, bufs, BURST);