X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_distributor_perf.c;h=f153bcf9bd87a2dd271032b5951b3e27a5b48f39;hb=00f75a40576b28aa5633d2cadd86f23c30c7d220;hp=f6f11394924e81298d3047ebbc730194ae88f197;hpb=e0f4a0ed4237e273b78728b7c7a3bf71d2d5218f;p=dpdk.git diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c index f6f1139492..f153bcf9bd 100644 --- a/app/test/test_distributor_perf.c +++ b/app/test/test_distributor_perf.c @@ -25,7 +25,7 @@ static volatile unsigned worker_idx; struct worker_stats { volatile unsigned handled_packets; } __rte_cache_aligned; -struct worker_stats worker_stats[RTE_MAX_LCORE]; +static struct worker_stats worker_stats[RTE_MAX_LCORE]; /* * worker thread used for testing the time to do a round-trip of a cache @@ -111,7 +111,7 @@ handle_work(void *arg) unsigned int count = 0; unsigned int num = 0; int i; - unsigned int id = __sync_fetch_and_add(&worker_idx, 1); + unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED); struct rte_mbuf *buf[8] __rte_cache_aligned; for (i = 0; i < 8; i++)