test/distributor: fix worker notification in burst mode
[dpdk.git] / app / test-acl / main.c
index 0a5dfb6..2cb2fe2 100644 (file)
@@ -81,6 +81,14 @@ static const struct acl_alg acl_alg[] = {
                .name = "altivec",
                .alg = RTE_ACL_CLASSIFY_ALTIVEC,
        },
+       {
+               .name = "avx512x16",
+               .alg = RTE_ACL_CLASSIFY_AVX512X16,
+       },
+       {
+               .name = "avx512x32",
+               .alg = RTE_ACL_CLASSIFY_AVX512X32,
+       },
 };
 
 static struct {
@@ -862,9 +870,10 @@ search_ip5tuples(__rte_unused void *arg)
 {
        uint64_t pkt, start, tm;
        uint32_t i, lcore;
+       long double st;
 
        lcore = rte_lcore_id();
-       start = rte_rdtsc();
+       start = rte_rdtsc_precise();
        pkt = 0;
 
        for (i = 0; i != config.iter_num; i++) {
@@ -872,12 +881,16 @@ search_ip5tuples(__rte_unused void *arg)
                        config.trace_step, config.alg.name);
        }
 
-       tm = rte_rdtsc() - start;
+       tm = rte_rdtsc_precise() - start;
+
+       st = (long double)tm / rte_get_timer_hz();
        dump_verbose(DUMP_NONE, stdout,
                "%s  @lcore %u: %" PRIu32 " iterations, %" PRIu64 " pkts, %"
-               PRIu32 " categories, %" PRIu64 " cycles, %#Lf cycles/pkt\n",
-               __func__, lcore, i, pkt, config.run_categories,
-               tm, (pkt == 0) ? 0 : (long double)tm / pkt);
+               PRIu32 " categories, %" PRIu64 " cycles (%.2Lf sec), "
+               "%.2Lf cycles/pkt, %.2Lf pkt/sec\n",
+               __func__, lcore, i, pkt,
+               config.run_categories, tm, st,
+               (pkt == 0) ? 0 : (long double)tm / pkt, pkt / st);
 
        return 0;
 }
@@ -1085,7 +1098,7 @@ main(int argc, char **argv)
        if (config.trace_file != NULL)
                tracef_init();
 
-       RTE_LCORE_FOREACH_SLAVE(lcore)
+       RTE_LCORE_FOREACH_WORKER(lcore)
                 rte_eal_remote_launch(search_ip5tuples, NULL, lcore);
 
        search_ip5tuples(NULL);