app/crypto-perf: overwrite mbuf when verifying
[dpdk.git] / app / test-crypto-perf / main.c
index 2322a95..ffa7180 100644 (file)
@@ -42,6 +42,7 @@
 #include "cperf_test_throughput.h"
 #include "cperf_test_latency.h"
 #include "cperf_test_verify.h"
+#include "cperf_test_pmd_cyclecount.h"
 
 #define NUM_SESSIONS 2048
 #define SESS_MEMPOOL_CACHE_SIZE 64
@@ -49,7 +50,8 @@
 const char *cperf_test_type_strs[] = {
        [CPERF_TEST_TYPE_THROUGHPUT] = "throughput",
        [CPERF_TEST_TYPE_LATENCY] = "latency",
-       [CPERF_TEST_TYPE_VERIFY] = "verify"
+       [CPERF_TEST_TYPE_VERIFY] = "verify",
+       [CPERF_TEST_TYPE_PMDCC] = "pmd-cyclecount"
 };
 
 const char *cperf_op_type_strs[] = {
@@ -75,6 +77,11 @@ const struct cperf_test cperf_testmap[] = {
                                cperf_verify_test_constructor,
                                cperf_verify_test_runner,
                                cperf_verify_test_destructor
+               },
+               [CPERF_TEST_TYPE_PMDCC] = {
+                               cperf_pmd_cyclecount_test_constructor,
+                               cperf_pmd_cyclecount_test_runner,
+                               cperf_pmd_cyclecount_test_destructor
                }
 };
 
@@ -123,7 +130,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
                };
 
                struct rte_cryptodev_qp_conf qp_conf = {
-                               .nb_descriptors = 2048
+                           .nb_descriptors = opts->nb_descriptors
                };
 
 
@@ -208,7 +215,6 @@ cperf_verify_devices_capabilities(struct cperf_options *opts,
                                        capability,
                                        opts->auth_key_sz,
                                        opts->digest_sz,
-                                       0,
                                        opts->auth_iv_sz);
                        if (ret != 0)
                                return ret;
@@ -504,7 +510,14 @@ main(int argc, char **argv)
                                ctx[cdev_id], lcore_id);
                        i++;
                }
-               rte_eal_mp_wait_lcore();
+               i = 0;
+               RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+
+                       if (i == nb_cryptodevs)
+                               break;
+                       rte_eal_wait_lcore(lcore_id);
+                       i++;
+               }
 
                /* Get next size from range or list */
                if (opts.inc_buffer_size != 0)