net/hns3: fix max packet size rollback in PF
[dpdk.git] / app / test-crypto-perf / cperf_test_latency.c
index 0e4d0e1..ce49fea 100644 (file)
@@ -126,7 +126,7 @@ cperf_latency_test_runner(void *arg)
        uint8_t burst_size_idx = 0;
        uint32_t imix_idx = 0;
 
-       static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);
+       static uint16_t display_once;
 
        if (ctx == NULL)
                return 0;
@@ -200,7 +200,7 @@ cperf_latency_test_runner(void *arg)
                                        ctx->dst_buf_offset,
                                        burst_size, ctx->sess, ctx->options,
                                        ctx->test_vector, iv_offset,
-                                       &imix_idx);
+                                       &imix_idx, NULL);
 
                        tsc_start = rte_rdtsc_precise();
 
@@ -307,14 +307,16 @@ cperf_latency_test_runner(void *arg)
                time_max = tunit*(double)(tsc_max) / tsc_hz;
                time_min = tunit*(double)(tsc_min) / tsc_hz;
 
+               uint16_t exp = 0;
                if (ctx->options->csv) {
-                       if (rte_atomic16_test_and_set(&display_once))
+                       if (__atomic_compare_exchange_n(&display_once, &exp, 1, 0,
+                                       __ATOMIC_RELAXED, __ATOMIC_RELAXED))
                                printf("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, "
-                                               "Packet Size, cycles, time (us)");
+                                               "cycles, time (us)");
 
                        for (i = 0; i < ctx->options->total_ops; i++) {
 
-                               printf("\n%u;%u;%u;%"PRIu64";%"PRIu64";%.3f",
+                               printf("\n%u,%u,%u,%"PRIu64",%"PRIu64",%.3f",
                                        ctx->lcore_id, ctx->options->test_buffer_size,
                                        test_burst_size, i + 1,
                                        ctx->res[i].tsc_end - ctx->res[i].tsc_start,