X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-crypto-perf%2Fcperf_test_latency.c;h=62478a2df51402074094254f7fdbb9c8280216cd;hb=94a24aaf6c5bd0a03c2828e7411d30a4fc0ac075;hp=0fc3a6680c261a3d7066cdccb5633e7c5958b66e;hpb=d4ad392cbbff873dd821fa9b2681dbbccc23a6c1;p=dpdk.git diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c index 0fc3a6680c..62478a2df5 100644 --- a/app/test-crypto-perf/cperf_test_latency.c +++ b/app/test-crypto-perf/cperf_test_latency.c @@ -129,7 +129,7 @@ cperf_latency_test_runner(void *arg) uint8_t burst_size_idx = 0; uint32_t imix_idx = 0; - static int only_once; + static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0); if (ctx == NULL) return 0; @@ -311,7 +311,7 @@ cperf_latency_test_runner(void *arg) time_min = tunit*(double)(tsc_min) / tsc_hz; if (ctx->options->csv) { - if (!only_once) + if (rte_atomic16_test_and_set(&display_once)) printf("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, " "Packet Size, cycles, time (us)"); @@ -326,7 +326,6 @@ cperf_latency_test_runner(void *arg) / tsc_hz); } - only_once = 1; } else { printf("\n# Device %d on lcore %u\n", ctx->dev_id, ctx->lcore_id);